i try to encode an array with UIImages.
Then i call “save” function
NSString *filePath = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0] stringByAppendingPathComponent:@"SavedUserData"];
[NSKeyedArchiver archiveRootObject: self toFile:filePath];
i get exception for line
[encoder encodeObject:recipePhotoList forKey:@"recipePhotoList"]; //array with images
-[UIImage encodeWithCoder:]: unrecognized selector sent to instance 0x1b1380
2012-03-23 11:59:43.694 fishmarket[261:1a0f] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIImage encodeWithCoder:]: unrecognized selector sent to instance 0x1b1380'
On 5+ iOS its working perfectly, on 4.3 i have this problem.
some alternative to encode/decode UIIMage for iOS < 5.0
hope its help somebody.