Andre Reese
Andre Reese

Reputation: 11

Iphone SQLite problems

I'm developing an iphone application that read data through the sqlite. I created a database through Terminal and added to the Xcode project.

I went back to the terminal and includes a new table in the file. sql. The problem is because my new queries do not see the new tables. This is kind a cache? How do i solve this problem?

Upvotes: 1

Views: 135

Answers (3)

ldav1s
ldav1s

Reputation: 16305

You might try uninstalling your app from the simulator (or device) and reinstalling the app presumably with the new SQLite database. There's a few ways to get the old database in this situation.

Upvotes: 0

Jeff Kelley
Jeff Kelley

Reputation: 19071

Where is the SQLite file? Is it in your application bundle? Make sure you modify the version that's been copied to your iPhone Simulator folder (~/Library/Application Support/iPhone Simulator/) if you’re trying to modify the version running in the simulator.

Upvotes: 1

Josh
Josh

Reputation: 12566

What code do you use to create the database? Are you checking to see if it exists before copying it to your documents folder? If so, it exists and won't be copied.

Upvotes: 0

Related Questions