I would like to assign the boolean value of the plist file entry. I do the following:
NSString *aBool = realBoolValue ? @"YES" : @"NO"; [myplist setValue: aBool forKey:@"boolKey"]; [myplist writeToFile: [NSHomeDirectory() stringByAppendingPathComponent: plistFilePath] atomically:NO];
But an appointment is never required. I am doing this because the following does not work:
[myplist setValue: realBoolValue forKey:@"boolKey"];
It gives an incompatible type error. What am I doing wrong?
- EDIT ---
plistFilePath is initialized as
plistFilePath = [NSHomeDirectory() stringByAppendingPathComponent: @"Library/Preferences/myfile.plist"];
source share