Where are user defaults plist files stored in iOS8?

痴心易碎 提交于 2020-01-31 09:30:19

问题


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 Simulator


回答1:


The folder hierarchy has changed under iOS8.

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


来源:https://stackoverflow.com/questions/25340485/where-are-user-defaults-plist-files-stored-in-ios8

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!