在 Xcode 6 中存储 NSUserDefaults 的 plist 文件在哪里 [英] Where is plist file storing NSUserDefaults in Xcode 6

查看:28
本文介绍了在 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.

这篇关于在 Xcode 6 中存储 NSUserDefaults 的 plist 文件在哪里的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆