问题
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.
来源:https://stackoverflow.com/questions/7836527/rhomobile-initial-database