Updating apps without deleting documents

Discussion in 'iOS Programming' started by caldwelljason, Sep 18, 2008.

  1. caldwelljason macrumors member

    Jul 9, 2008
    I am ready to deploy my first update to an app I wrote. But when I deploy it to my test units using Organizer, it removes everything and reinstalls. So the sqlite database that stores the user's data is removed and copied over by a blank version.

    How can I prevent that from happening? Is it happening because I'm in a dev environment? Can I test my deployment some other way?

    Any help would be appreciated.
  2. Aranince macrumors 65816

    Apr 18, 2007
    I know nothing about iPhone development or Mac development, but are you including the blank sqlite db in the update?
  3. caldwelljason thread starter macrumors member

    Jul 9, 2008
    Distributing the DB

    I am including the DB as a resource. Then when the app runs, it checks for the existence of the database in the user's directory. If it doesn't find it, it copies it from the resources.
  4. caldwelljason thread starter macrumors member

    Jul 9, 2008

    Turns out iTunes was removing the app when I plugged in the device. My subsequent install installed a fresh copy and we started over.

    I stopped the iTunesHelper application on my Mac and the problem cleared itself right up!

Share This Page