I have a .plist file containing a dictionary item, something like this:
<dict>
<dict>
<key>Key one</key>
<string>string</string>
...
</dict>
...
</dict>
How can I edit the string of Key one?
I’m stuck here:
NSString *pathVibrate = [NSString stringWithString:@"plist path"
NSMutableDictionary *plistDict = [[NSMutableDictionary alloc] initWithContentsOfFile:pathVibrate];
EDIT.
The plist is like this :S
<dict>
<key>Key One</key>
<dict>
<key>Key one</key>
<string>string</string>
...
</dict>
<key>Key Two</key>
<dict>
<key>Key one</key>
<string>string</string>
...
</dict>
</dict>
Saving a plist is easy, simply use
The atomically basically tells it not to overwrite any previous file until this file has been succesfully written – that way if the app crashes, or there is a problem with the write the old file that was there previously will still exist.
If you aren’t familiar with the NSDictionary and NSArray classes it’s worth reading through the documentation on them. I can also recommend a good book called iPhone 3 Development by Apress which is a good beginners introduction (it’s what I started with a few years ago and I’m sure there be a 4.x update by now).