Please do not post the same thing multiple times. The board software automatically flags certain posts as needing moderator attention. This happens the most often for new users. I'm pretty sure this is made clear at the time you attempt to post. Posting the same thing over and over again just makes that many more posts the moderators have to weed through later. This makes us sad. Don't make us sad. If your post/thread doesn't appear, just wait a while. Don't post it again. If it hasn't shown up by the next day, then you can try again. I normally go through posts in the mornings, and try to check a few times throughout the day, but I'm not here 24/7. There will typically be a significant delay before posts are approved. Just be patient.
Hello froum I create an application that have a core data database but i want to archive and share my app with data in database, to iPhone device but when i archive project database and create ipa file and install on iPhone all data was lose. what can i do to archive and share my application with all data added in my database?
Hello froum I create an application that have a core data database but i want to archive and share my app with data in database, to iPhone device but when i archive project database and create ipa file and install on iPhone all data was lose. what can i do to archive and share my application with all data added in my database?
What I've done is to write code that checks at launch to see if the core Data database exists in the documents directory (now, with iCloud, it should probably be in application support, but anyway...). If the file doesn't exist, I copy it out of the bundle into the target directory.
Then I drop into the code that opens the database.
I then run the app on the simulator, populate the database in the app, stop the app, find the database file in the finder and drag the database with contents into the project.
Regards,
Duncan C WareTo
Animated GIF created with Face Dancer, available for free in the app store.
What I've done is to write code that checks at launch to see if the core Data database exists in the documents directory (now, with iCloud, it should probably be in application support, but anyway...). If the file doesn't exist, I copy it out of the bundle into the target directory.
Then I drop into the code that opens the database.
I then run the app on the simulator, populate the database in the app, stop the app, find the database file in the finder and drag the database with contents into the project.
hi Duncan C, I know , I can update or get data from internet with icloud or webservice or ... but in my country (iran) , many of people can't access easily to internet , and programmer must be release all application with record on database, I create resturant app and i get data from webservice to add on my core data entity , It's work very good but my data lose when I install ipa file on iphone and users must be connect to internet and then try to download data from cloud , but I need to release ipa file with all data . in Iphone , my application is works very good and i can download data from internet and sync data to my core data entity but it's not good for iranians users , iranians users need data in first lunch application.
hi Duncan C, I know , I can update or get data from internet with icloud or webservice or ... but in my country (iran) , many of people can't access easily to internet , and programmer must be release all application with record on database, I create resturant app and i get data from webservice to add on my core data entity , It's work very good but my data lose when I install ipa file on iphone and users must be connect to internet and then try to download data from cloud , but I need to release ipa file with all data . in Iphone , my application is works very good and i can download data from internet and sync data to my core data entity but it's not good for iranians users , iranians users need data in first lunch application.
Ok, do what I said. Get your database populated with the data that you want in it, and then make your applicationDidFinishLaunching method check to see if there is a database file already. If not, copy it from the bundle into the directory where your code is set up to open it.
That way, on first launch, your code will copy a database into place that already has data in it. Once you've done that, the program will open the database and start using it, and will save any additional data into it.
On all launches after first launch, the database file will already be in place, and your program will just open it.
Regards,
Duncan C WareTo
Animated GIF created with Face Dancer, available for free in the app store.
Ok, do what I said. Get your database populated with the data that you want in it, and then make your applicationDidFinishLaunching method check to see if there is a database file already. If not, copy it from the bundle into the directory where your code is set up to open it.
That way, on first launch, your code will copy a database into place that already has data in it. Once you've done that, the program will open the database and start using it, and will save any additional data into it.
On all launches after first launch, the database file will already be in place, and your program will just open it.
thanx Duncan C but I don't know how can i do that . can you attach sample code ?
Replies
Then I drop into the code that opens the database.
I then run the app on the simulator, populate the database in the app, stop the app, find the database file in the finder and drag the database with contents into the project.
Duncan C
WareTo
Animated GIF created with Face Dancer, available for free in the app store.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeI know , I can update or get data from internet with icloud or webservice or ... but in my country (iran) , many of people can't access easily to internet , and programmer must be release all application with record on database,
I create resturant app and i get data from webservice to add on my core data entity , It's work very good but my data lose when I install ipa file on iphone and users must be connect to internet and then try to download data from cloud , but I need to release ipa file with all data . in Iphone , my application is works very good and i can download data from internet and sync data to my core data entity but it's not good for iranians users , iranians users need data in first lunch application.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeThat way, on first launch, your code will copy a database into place that already has data in it.
Once you've done that, the program will open the database and start using it, and will save any additional data into it.
On all launches after first launch, the database file will already be in place, and your program will just open it.
Duncan C
WareTo
Animated GIF created with Face Dancer, available for free in the app store.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesomebut I don't know how can i do that . can you attach sample code ?
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesomei have successfully copy sqlite from simulator file to my project but it has very large ( 30 MB) , but my data has 2 MB
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome