Sam B Sam B - 1 year ago 121
iOS Question

Where is plist file storing NSUserDefaults in Xcode 6

I have saved a bunch of NSUserDefaults in my app and now I am trying to find out where in the world is the plist file for for my app in Xcode 6. Here is the path for my apps document dir.

/Users/xxx/Library/Developer/CoreSimulator/Devices/676A8C61-67E4-43E0-A051-DA8BD84A84F5/data/Containers/Data/Application/B2E3C89C-48B7-4429-BBE3-FB830CD040F2/Documents


I have searched everywhere in the folder but I couldn't find where the plist file is? Is it located somewhere else? I need to manually edit a NSUserDefaults in it.

[[NSUserDefaults standardUserDefaults] setObject:@"1" forKey:@"firstTimeLaunch1257"];
[[NSUserDefaults standardUserDefaults] synchronize];

Answer Source

The NSUserDefaults plist file is in the CoreSimulator/Devices/<device id>/data/Library/Preferences folder.

This folder contains the NSUserDefaults files for all apps installed in that simulator.

The name of the plist file will match your app's bundle id.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download