Quote:
Originally Posted by isaaclimdc
My app uses writeToFile:atomically: to write an NSMutableDictionary of strings to a plist and reads it at several places. The whole app was working perfectly until round about after I compiled and prepared it for ad-hoc distribution.
Now when I test the app, the data refuses to be saved. When I add a new entry, it is not written into the plist. I tried swapping to using NSUserDefaults (which is a little easier), but that also doesn't work.
What could have gone wrong during the process of packaging it for distribution??
|
NSUserDefaults and writeToFile:atomically: both require that the entire "object graph" you are writing contain only "plist objects."
Plist objects are NSData, NSDate, NSNumber, NSString, NSArray, or NSDictionary. If you have ANY objects in your list of objects that are not one of these types, the call will fail.
I'm guessing that you added something new to the data you were trying to save that is not one of these types.