Reputation: 4287
I am using following code to read the details of the plist,
NSString *plistPath = @"~/Library/Preferences/com.apple.desktop.plist";
NSDictionary *plistData = [NSDictionary dictionaryWithContentsOfFile:plistPath];
But plistData has no entries.
Is there something wrong in above code?
Upvotes: 1
Views: 108
Reputation: 69047
You need expanding the tilde. Try this:
NSString * plistPath = [@"~/Library/Preferences/com.apple.desktop.plist" stringByExpandingTildeInPath];
Upvotes: 2