The issue is that your application is attempting to write the plist into its own bundle. Your plist should be stored in the User's Library. However, if you are storing a user's credentials for a service, you really aught to use the Mac OS X Keychain services to store that information.
We are logging the path to console, in order to be able to find it in the Finder. Copy the path from the console to the clipboard. Then in the Finder chooose "Go To Folder..." from the Go menu. Paste the path into the dialog box and the folder where the plist is will be opened. Then you can examine it and make sure that everything works as it should.
Note that dictionary must contain plist objects (instances of NSData, NSDate, NSNumber, NSString, NSArray, or NSDictionary). And dictionary keys must be NSString objects
Make sure the pList file you are writing to is located in a legal place to edit it, for example Documents in the apps sandbox.
Then find the path to that location (if there is an existing pList file, it will overwrite), and use:
[myDictionary writeToFile:path atomically:YES];
Write how far you are in the process, and maybe some code / error-message...
The issue is that your application is attempting to write the plist into its own bundle. Your plist should be stored in the User's Library. However, if you are storing a user's credentials for a service, you really aught to use the Mac OS X Keychain services to store that information.
Note that dictionary must contain plist objects (instances of
NSData
,NSDate
,NSNumber
,NSString
,NSArray
, orNSDictionary
). And dictionary keys must beNSString
objectsMake sure the pList file you are writing to is located in a legal place to edit it, for example Documents in the apps sandbox. Then find the path to that location (if there is an existing pList file, it will overwrite), and use:
Write how far you are in the process, and maybe some code / error-message...