Reputation: 177
I am creating iphone app and requirement is as follows
1.i have fixed data base which have to be retain with the app not to create if it not exists.
2. i am using FM data base and i dont know how to make to keep data base with app .
Till now i use to use create if not exist query . It creates data base to particular path followed by and stores there. But will it retain data base with app even though running app in iphone rather than simulator.
Please make me to come out of this confusion.
Upvotes: 0
Views: 78
Reputation: 69027
It creates data base to particular path followed by and stores there. But will it retain data base with app even though running app in iphone rather than simulator.
If you create the data base at runtime, then it will be stored in some user directory. This is intrinsically tied to the device where the app runs. Specifically, if you run your app in the simulator, then the DB will be created in the simulator OS filesystem (vs. the device filesystem if you run the app on the device). Then, when you run the app on your device, a new DB will be created there.
In this case, there is no relationship between the two. If you need that different devices share some information, you might use syncing, possibly using iCloud, to do that.
If your DB is static, as you seem to state, and you can create it before the first run of the app, then you could include it in the app bundle. This way, it would be tied to the app and it would be available on each device where the app is installed on to.
Upvotes: 1