Reputation: 5657
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?
Upvotes: 0
Views: 72
Reputation: 4792
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.
Upvotes: 1