System variables are values calculated by the app runtime, covering things like current app version or screen width. They are automatically kept up-to-date, so e.g. resizing your screen will affect systemVars.dimensions.window, and rotating your phone will update systemVars.orientation.
They can be accessed in formula functions under the systemVars namespace. This means that e.g. os below is found under systemVars.os.
Build type. selector means the AppGyver app used to view and develop your apps.
none, cellurar, wifi, unknown
Network status. If there is no network, or the app is running with the web runtime, then none is returned.
If your app was launched from external URL that URL is registered intoinitialUrlsystem variable.
This variable represent url your app can be launched from external tool i.e. mobile browser.
The systemVars.filesystem object contains information about the file system of the device the app is currently running.
This information is only available on native apps, not when running on web.
Common base directories
The systemVars.filesystem.directories object contains the base directory paths available on the device. Flow functions that deal with files work with absolute paths, so a pattern you will encounter is using these at the beginning of a file path constructed with a formula, e.g. systemVars.filesystem.directories.cache + "/myTempFile.jpg".
The following directories are available on both iOS and Android.
Local file system path to the document directory. This directory will only be emptied when the app is uninstalled, so it can be used to safely store files your app needs to function.
For example, /data/user/0/com.appgyver.agclient.debug/files.
Under the hood on iOS, the NSDocumentDirectory API is used. On Android, the getDataDirectory API is used.
Local file system path to the cache directory for the app. This directory can be emptied by the operating system, so it should only be used to store temporary files.
For example, /data/user/0/com.appgyver.agclient.debug/cache.
On iOS, the NSCachesDirectory is used. On Android, the getCacheDir API is used on the app context.
The directories below are only available when the app is running on an iOS device.
Local file system path to the main bundle directory, which contains files embedded in the iOS binary. This directory is read-only.
The directories below are only available when the app is running on an Android device.
Local filesystem path to the Digital Camera Images (DCIM) directory.