iPhone: Where NSUserDefaults get stored?

故事扮演 提交于 2019-12-29 07:27:28

问题


I am able to store, retrieve, and remove values using NSUserDefaults. I couldn't succeed to find out where NSUserDefaults getting stored physically on iPhone? I guess it should be plist file but not sure. Does anyone know if its possible to see this values on iPhone physically?

Thanks.


回答1:


  • Connect Your device to Xcode.
  • Select Windows -> Organiser.
  • Select your device.
  • Click on your application.
  • Click the gear icon and Download Container….
  • Select the downloaded .xcappdata file, right click and select Show Package Contents.
  • Open the AppData folder.
  • Navigate to Library -> Preferences -> appbundlename.plist.



回答2:


The physical path is rootOfApplication/Library/Preferences/com.yourcompany.appName.plist you can see there if you test it in simulator



来源:https://stackoverflow.com/questions/6662679/iphone-where-nsuserdefaults-get-stored

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