I need to prepare my IOS application with a Pre-filled DB. I’m wondering whether my technique is good of if it leaks in something:
- At the first App launch: Call a function that fill data in DB, only if field “DB_filled” in property list is equal to “NO”.
- When function completes and data is stored in DB: setup plist with “DB_filled” => YES.
- At the next App launch: DB_filled is equal to YES, thus, no other attempts to pre fill Db are done.
I’m not sure this’s the correct technique. What do you think?
This is most common scenario for first-launch app setup except for variances in key name (firstLaunch, FirstLaunch or SetupDone, or, in your case, DB_filled). Check this question too.