Subscribe ( )

iPhone Programming Tutorials


 

Forum

You must be logged in to post Login Register

Search 

sql writable database file

User Post

2:53 pm
August 27, 2008


robertpgg

Noob

posts 2

1

Hi!

I was reading over the SQLite tutorial. I was wondering if anyone knew where the writable version of the database gets placed when running the iPhone simulator?

It is the database that gets copied in the delegate function: createEditableCopyOfDatabaseIfNeeded()

I had changed my database structure a bit and noticed that it was still using the old one because it was still finding the old writable file. I just renamed my database to get it to change, but I'd like to just delete the old one.

I see i can use the filemanager function removeItemAtPath, but I'd like to know where it lives on disk so I don't have to write code to do it for me.

Thanks!

3:56 pm
August 27, 2008


Admin

brandontreb

posts 88

2

I ran into this same problem while learning SQLite stuff and it appears to me that the only fix for this is to uninstall the app from the simulator.  This is done similarly to how you uninstall apps from your iphone.  Just click and hold at the home screen and the icons will shake.  Then, click the (x) next to the app to uninstall it.  The next time you build it should reinstall it with the new copy of the database.

If debugging is the process of removing bugs, then programming must be the process of putting them in.
-Edsger Dijkstra

6:07 pm
August 27, 2008


robertpgg

Noob

posts 2

3

Cool, that should work for me :) Thanks!!

9:47 am
September 11, 2008


Dajad

iCoder

Dajad

posts 10

4

The bigger question that I don't need to know the answer to now but will at some point is how to update databases on the iPhone as we kick out new versions of the app.

In my case, my app will have one large pre-defined tables and 3 smaller user generated tables.

The first time my users install the app, there will be no problems. But, when I bring out updates, I'll need a way to keep the 3 smaller user-generated tables on the iPhone while replacing the pre-defined table. If the 3-user generated table were wiped out in a software upgrade, my users would freak! All the customizations they did would disappear.

I'm a long way from having to worry about that, but if anyone has ideas on how to accomplish this or can point to info on the topic, that would be very handy for future reference.

…Dale

My Blog: http://www.daleisphere.com

Search 

About the iCodeBlog forum

Most Users Ever Online:

44


Currently Online:

4 Guests

Forum Stats:

Groups: 2

Forums: 6

Topics: 419

Posts: 893

Membership:

There are 934 Members

There has been 1 Guest

There are 2 Admins

There is 1 Moderator

Top Posters:

bobcubsfan – 54

crazyiez – 30

Uhu – 17

AdeC – 17

Nick – 15

jitesh61 – 12

Administrators: Brandon (88 Posts), Collin (0 Posts)

Moderators: VertigoSol (26 Posts)



©   

  • Posted by on 6 Aug 2008 in Uncategorized
  •   |  
  •   |  
  •   |  
  • Comments Off

Comments are closed.