iOS 访问模拟器数据

1. 如果文件隐藏,进入命令行,输入: defaults write com.apple.finder AppleShowAllFiles -bool true

 

2. 进入 Finder,shift + command + g,然后输入以下路径:

  对于 7.1 及以前的版本: ~/Library/Application Support/iPhone Simulator/[OS version]/Applications/[appGUID]/

 

  从 8.0 开始,~/Library/Developer/CoreSimulator/Devices/1A8DF360-B0A6-4815-95F3-68A6AB0BCC78/data/Container/Data/Application/    

 

  具体路径请在项目里打印输出。方法:

NSArray * paths = NSSearchPathForDirectoriesInDomains(NSDocumentationDirectory,NSUserDomainMask,YES);
NSString * documentDirectory = [paths objectAtIndex:0];

 

注意:打印出来的如果开头是 /Users/admin//Library 尽量换为 ~/Library

posted @ 2014-11-25 02:14  davesuen  阅读(225)  评论(0编辑  收藏  举报