I am updating a plist file using an iphone app but when i check that plist file in XCode it contains the same data. plist file in XCode i开发者_如何学Gos different from that of iphone?
The file that is attached with the project is bundled with the app as a resource file. You can not change it through the app. If you want to write a file, it will be stored in the document directory.
I can think of two reasons.
One is already described by taskinoor.
Another reason could be that you are trying to write custom objects (subclasses of NSObject, for instance). They could be contained in an array or dictionary you are trying to write. I believe the writeToFile:atomically: will fail silently then.
精彩评论