With Volt MX Iris, you can bundle a SQLite database into an app so that the data in the database is always available locally on whatever device the app is installed on. This capability can be used to store something as simple as a collection of web site favorites to more complex data, such as a product catalog.
Notes: Any file type can be added to the folder where the database resides.
- You must ensure that the size of the database, in addition to all the other assets of your app, do not exceed the app size limit for a given platform’s application store.
To add a SQLite database to an app, do the following:
- Using your computer’s folder browser, navigate to the files and folders you want to add to your Volt MX Iris project.
- In Volt MX Iris, on the Project Explorer, on the Assets tab, expand the channel that you want to add the SQLite database to, whether Common (to be available to all channels), Desktop, Mobile, Tablet, or Watch.
- Expand the environment that you want the SQLite database to be accessible to, whether Common (to be available to all environments), Native, or Web.
- If you selected the Native environment, expand the platform that you want the SQLite database to be accessible to, whether Common (to be available to all platforms), Android, iOS, or Windows.
Once the node is fully expanded, a raw folder is visible.
- Click the context menu arrow of the raw folder, and then click Resource Location. The folder opens in a new window of your computer’s folder browser.
Switch to the folder browser window that contains the files and folders you want to add to your Volt MX Iris project, select them, and then copy them.
Important: If you are copying the files to a raw folder for the Android platform, be aware that Android only supports file names that contain letters, numbers, periods (.), and underscores ( _ ). The presence of other characters in a file name invalidate that file for inclusion in the compiled Android app.
- Switch to the folder browser window for the raw folder, and then paste the files you copied.
- To see the added files reflected in Volt MX Iris, on the Project menu in Volt MX Iris), click Refresh.
The folder path where you store a SQLite database in a Volt MX Iris project varies, depending on the channel, environment, and platform. Any file type can be added to these folders.
Note: Files in the platform-specific folders whose file names are identical to files in the Common folder take precedence and override the Common folder versions of those files.
Common (located under the Mobile channel)
Common (located under the Tablet channel)