views:

37

answers:

2

I'm developing an iPhone application using Core Data. I had everything working and had to make an adjustment to the database schema and change the relationships through the xcdatamodel file. I deleted the my project's sqlite file in Library/Application Support/iPhone Simulator/3.1.3//Documents. Build and run the application, it creates the sqlite file, but its empty with a file size of 0 KB. At a minimum the table information should be in there.

There are no errors/warning in the console.

Anyone have an idea what is wrong?

A: 

Nothing is wrong, the table structures will be created upon the saving of the first object.

Update

Depends on how you are pre-populating the database. If you are doing it in code, go ahead. The tables will be created as soon as you save the first entity to disk and it is completely transparent to you.

If you are not, then explain how you intend to pre-populate the database and I can assist from there.

Marcus S. Zarra
If that's the case, what is the best way to pre-populate the database? Going through tutorials using the book iPhone SDK Development, the database always was created with tables before I inserted my first object.In order to solve my current problem, I had to recreate the application and everything worked (I still haven't saved the data yet). Are there other actions that would force the tables to be created besides the first save?
Tots