iPhone: Where NSUserDefaults get stored?
I am able to store, retrieve, and remove values using NSUserDefaults. I couldn't succeed to find out wh开发者_开发知识库ere 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.
- 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 selectShow Package Contents
. - Open the
AppData
folder. - Navigate to
Library
->Preferences
->appbundlename.plist
.
The physical path is rootOfApplication/Library/Preferences/com.yourcompany.appName.plist you can see there if you test it in simulator
I use SimSim. It's a free menu bar app that gives you access to all simulator folders. There are other solutions, but this is a basic tool I use all the time. https://github.com/dsmelov/simsim
精彩评论