0

I created an app for iOS 3.2 for the first version 1.0.

Recently I created an updated app for iOS 4.2 with print feature etc. for the second version.

My problem is that, the users are not able to update the app from appstore.

They are facing issues like data loss of version 1.0 app, crashing etc.

Can someone explain me what can be the reason for this?

And, how can I test this thing on my device, as I am not having the version 1.0 app from appstore, but the code for both versions.

iPhoneDev
  • 1,547
  • 2
  • 13
  • 36

2 Answers2

1

Delete your new one on your test device and install the old one. Then build and debug the new one line by line. I had lots of trouble my first time through due to confusion over the update/migration process of core data. If you use core data, chances are your existing customers have an out of date store DB that your new code is crashing on. The store doesn't get wiped in an update if it's in your user's document directory... Only the one in the app bundle. You'll need to handle that reset or tell core data to migrate it to the new model. Of course, all this is speculation since you've given almost no details about the problem, frameworks used, log files, etc.

Greg Combs
  • 4,252
  • 3
  • 33
  • 47
  • my first version was on 3.2 and the updated version is on 4.2. I want to keep the database of version 3.2 intact for version 4.2 .If the user has created any file in v1 then it should be intact in v2.I am also using Core Data. Also, I am copying my sqlite file to the documents directory if it is not existing there.Please help. – iPhoneDev Mar 07 '11 at 05:04
  • Then if you've changed *anything* in your data model you're probably not migrating the database properly. See the apple docs on core data migration. aside from that, there's not much more I can do without more info, logs, etc – Greg Combs Mar 07 '11 at 05:26
  • Please answer my this question. I am not making any changes to my database structure. So , is the Core data migration needed in this case as well.Thanks for ur guidance. – iPhoneDev Mar 07 '11 at 05:42
  • Maybe. I can't say more until I get some info. Like I've been asking for since the beginning. You're giving me nothing and expecting me to solve your problem. Have you done as I suggested in the beginning? Delete, reinstall old app from sources. Run it to change data as user would. Now, build and install new version onto old one and debug the startup. Looks for the crash in the core data initialization code. Alternatively, copy the user data store from the old app user directory and put it into the new one (for simulator runs). Now debug. – Greg Combs Mar 07 '11 at 05:53
0

During a normal install process, data should not be overwritten. NSUserDefaults and files should remain during an upgrade, as long as the user doesn't delete the app first. I assume the crashing occurs after the new version is installed?

FreeAsInBeer
  • 12,937
  • 5
  • 50
  • 82
  • Yes, the crashing occurs after the new version installation.But I have applied checks in my app delegate for the data persistence. – iPhoneDev Mar 07 '11 at 04:51