This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v20 R7
MOBILE APP REFRESH SESSIONS
|
MOBILE APP REFRESH SESSIONS | ||||||||
Does not require any parameters | ||||||||
The MOBILE APP REFRESH SESSIONS command checks all mobile application session files located in the MobileApps folder of the server, and updates existing session contents in memory for any edited files.
This command is designed to be used by 4D for iOS and 4D for Android developers to "force" the reload of user session information after their local files have been edited. For example, if a session needs to be reset, you can remove the session file and then call MOBILE APP REFRESH SESSIONS. For more information about mobile app sessions, please refer to the Go Mobile documentation.
The command checks the compliance of each session file in the MobileApps folder (json syntax, json schema, session data). If the file is compliant and has been modified, the corresponding session is refreshed in memory (if it already exists) with edited contents.
If a session file is not valid or has been deleted, the corresponding session is removed from memory.
The command can return one of the following errors, that can be handled through ON ERR CALL and GET LAST ERROR STACK commands:
Component name | Error code | Description |
mobi | 1 | The json file location does not match its content |
mobi | 2 | The json file is not correctly formed |
mobi | 3 | The json file does not validate the json schema |
mobi | 4 | Connection token is not compliant with the current information |
You want to reset all current sessions for all mobile applications:
C_TEXT($sessionsPath)
$sessionsPath:=Get 4D folder(MobileApps folder)
DELETE FOLDER($sessionsPath;Delete with contents)
MOBILE APP REFRESH SESSIONS
Product: 4D
Theme: Tools
Number:
1596
Created: 4D v17 R2
4D Language Reference ( 4D v20 R7)