lundi 29 juin 2015

Xcode deletes all tables in SQLite database: no such table

I want to access my db in my iOS app. I had a database that worked fine, but I needed more columns so I made a new database and changed the path in xcode to the new .db file. However, now I get an error saying that the tables don't exist (no such table), and when I look at the .db file (which is indeed there) in the simulator there are 0 tables. But when I look at the .db file that I originally loaded into the project there are several tables so the .db file was created successfully. The .db file is in the copy bundle resources in the project's copy bundle resources. I haven't made a typo when writing the db file's name.

Why do you think Xcode can't see the tables?

Aucun commentaire:

Enregistrer un commentaire