RhoMobile initial database

2019-09-06 05:14发布

问题:

Is there a way to setup initial data in a database when using RhoMobile framework? It is using sqlite database as I see. Is there a way to add a preset sqlite file to the project and make it built in the application bundle?

回答1:

You can seed the database with a flat file containing the initial data, through the use of the Rho::RhoUtils.load_offline_data method. Full documentation here.