0

I have app in that i am using coredata. And when i install the app three files are getting created in the document directory called “test.sqlite, test.sqlite-shm and test.sqlite-wal". And now in second app i copy the test.sqlite in the folder and i want to access the database and tables but i got error like this "no such table found". Is there any issue that i create the database with coredata? please help me.

5
  • why are you copying the test.sqlite to your second app? As it is saving values in the first app.You can't use the database of one app into another.
    – Kundan
    Mar 21, 2014 at 6:46
  • @Stark I have to apps first app i use coredata for item list and. And other app i want to show the records of item in the second app so i call the other app in my first app.
    – Hitendra
    Mar 21, 2014 at 6:49
  • Its looking all messed up you can save and show your records in one app alone then why using two apps?
    – Kundan
    Mar 21, 2014 at 6:50
  • @Stark In first app i load item list from webservice and store in to coredata.And when i call second app from my first app it also load item list from the webservice. But second time i dont want to call webservice and load datafrom the test.sqlite database.
    – Hitendra
    Mar 21, 2014 at 6:55
  • Will you please explain it in more detail with your code? just edit your question, So we can help you.
    – Kundan
    Mar 21, 2014 at 6:58

1 Answer 1

0

You either need to:

  1. send all of the sqlite* files that Core Data creates
  2. export the content from the data store, format it and send that

Option 1 should work and be fast to implement, but it isn't very future proof. Option 2 will take longer but is a much better solution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.