search

Home  >  Q&A  >  body text

objective-c - iOS NSUserDefault 的位置

NSUserDefault存放的少量数据的plist文件在xcode6沙盒目录下的那个位置?
谢谢

迷茫迷茫2886 days ago696

reply all(3)I'll reply

  • 巴扎黑

    巴扎黑2017-04-24 09:13:36

    Excerpted from http://zhanbus.com/a/mdev/ios/2015/0106/1445.html

    Before Xcode5, we knew that if you use the simulator to run the APP, you would like to know that the plist storage path of NSUserDefault is like this: /Users/username/Library/Application Support/iPhone Simulator/Simulator Version/Applications/UDID/Library In the Preferences folder, name your program .plist

    In Xcode6, the program changed the location of the plist file created using the NSUserDefault method. The specific path is: /Users/username/Library/Developer/CoreSimulator/Devices/simulator UDID/data/Library, under the Preferences folder. As shown below:

    reply
    0
  • PHP中文网

    PHP中文网2017-04-24 09:13:36

    Library/Preferences

    I recommend you another good thing: http://simpholders.com/

    reply
    0
  • PHPz

    PHPz2017-04-24 09:13:36

    NSLog(@"%@",NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)[0]);

    Use this to print the address

    reply
    0
  • Cancelreply