Gen*_*ode -5 directory document ios-simulator xcode9
它在哪里?我尝试了XCode 8的旧答案,它不在那里.为什么Apple让我们很难在模拟器中看到我们的应用程序的沙箱?
Cha*_*ish 26
我发现它在以下路径中.
~/Library/Developer/CoreSimulator/Devices/(SIMULATORID)/data/Containers/Data/Application/(APPLICATIONID)
Run Code Online (Sandbox Code Playgroud)
您还可以查看此应用程序以获取更多详细信息.
可在以下路径中找到模拟器设备列表:
~/Library/Developer/CoreSimulator/Devices/
Run Code Online (Sandbox Code Playgroud)
下面的文件有模拟器信息:
~/Library/Developer/CoreSimulator/Devices/{UUID}/device.plist
Run Code Online (Sandbox Code Playgroud)
rus*_*hop 14
simctl是官方支持的工具,可以做你想要的.它可以创建,删除和重启设备.它还可以安装,卸载和启动应用程序.
xcrun simctl get_app_container booted <BundleID> data 将获取给定BundleID的数据容器的路径.
要查看命令运行的完整帮助xcrun simctl help get_app_container.
小智 8
当你得到如下文件目录时,我会建议你打印文件路径
let dirPathNoScheme = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true)[0] as String
print(dirPathNoScheme)// then you can just control + shift + G or Go->Go to Folder and paste "~/Library/Developer/CoreSimulator/Devices/53AS028-BBE4-40D3-BC1A-60C2DSDFE0B3/data/Containers/Data/Application/A94SERF7-9191-4B1D-AAA5-BASFE654ED78/Documents"
Run Code Online (Sandbox Code Playgroud)
对象-C:
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSLog(@"PATH=%@",paths);
Run Code Online (Sandbox Code Playgroud)
就是这样