在 Xcode 6 中存储 NSUserDefaults 的 plist 文件在哪里

问题描述:

我在我的应用程序中保存了一堆 NSUserDefaults,现在我试图找出世界上什么地方是我的应用程序在 Xcode 6 中的 plist 文件.这是我的应用程序文档目录的路径.

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

我在文件夹中到处搜索,但找不到 plist 文件在哪里?它位于其他地方吗?我需要在其中手动编辑 NSUserDefaults.

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];

NSUserDefaults plist 文件位于 CoreSimulator/Devices//data/Library/Preferences 文件夹.

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

此文件夹包含安装在该模拟器中的所有应用程序的 NSUserDefaults 文件.

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

plist 文件的名称将与您的应用程序包 ID 匹配.

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