用户默认存储在iOS8中的plist文件在哪里? [英] Where are user defaults plist files stored in iOS8?

查看:403
本文介绍了用户默认存储在iOS8中的plist文件在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我找不到首选项.plist文件,因为Preferences文件夹为空。
要获取我使用的Library文件夹:

I can't find preferences .plist file, because Preferences folder is empty. To get Library folder I use:

println(NSSearchPathForDirectoriesInDomains(.LibraryDirectory, .UserDomainMask, true)[0])

Xcode 6 beta 5,iOS模拟器

Xcode 6 beta 5, iOS Simulator

推荐答案

iOS8下的文件夹层次结构发生了变化。

The folder hierarchy has changed under iOS8.

所有首选项现在都存储在公共 /下库/首选项文件夹。请注意,这不是应用程序容器下的 Library 文件夹,而是一般 Library 文件夹。

All preferences are now stored under the common /Library/Preferences folder. Notice, this is not the Library folder under your app's container, it's the general Library folder.

对于模拟器,确切的文件夹是:

For the simulator, the exact folder is:

~/Library/Developer/CoreSimulator/Devices/<Unique Simulator ID>/data/Library/Preferences

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

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