0

My application have several classes that implemented NSCoding protocol. And the app save instances of these classes to the file system

In near future I will publish a new version of my application. This app will include the changed logic of - (void) encodeWithCoder:(NSCoder *)coder and - (id) initWithCoder:(NSCoder *)aDecoder methods.

Question is: What is general approach to test that app after a update works good?

CAMOBAP
  • 5,523
  • 8
  • 58
  • 93
  • You could install the App Store version and fill it with data. After that, install the update through Xcode. Make sure you are using the release config and that the bundle identifier is the same. The app should install right over the existing one. – Martijn Feb 22 '14 at 14:20
  • In [this](https://developer.apple.com/library/ios/technotes/tn2285/_index.html) technical notes guys from apple not recommend to update app via `XCode` – CAMOBAP Feb 22 '14 at 14:23
  • You can test it using ad-hoc distribution which you can generate from the same archive you want to publish. You can simulate an update with iTunes using the ad-hoc signed ipa. – Calin Chitu Feb 22 '14 at 16:15

1 Answers1

1

so, to my understanding you are asking , How to make sure that my app works correct or not with the updated code.

Which means, when the app after updating is run for the first time, will the encoded instances can be decoded and reused perfectly?.

If this is the case, for the new updated app - in the initWithEncoder method add a version key. If version is not present then those encoded files are of old version and write your code accordingly, if present then init the object as usual.

This is according to apple recommendation.

santhu
  • 4,796
  • 1
  • 21
  • 29