问题
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
.xcappdatafile, right click and selectShow Package Contents. - Open the
AppDatafolder. - 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