iOS模拟器的应用沙盒在MAC中的位置


每个iOS应用都有自己专属的应用沙盒。分别为

应用程序包 Documents/ Library/Caches/ Library/Preferences/ tmp/

当运行模拟时,在MAC下找到对应路径的规则随XCode的版本会有不同,在XCode6下的路径为

应用程序包 ~Library/Developer/CoreSimulator/Devices/<模拟器设备id>/data/Containers/Bundle/Application/<应用id>

其中模拟器设备id可以在XCode - Windows - Devices - 选取模拟器 - Device Information - Identifier中找到。
Documents/

~/Library/Developer/CoreSimulator/Devices/<模拟器设备id>/data/Containers/Containers/Data/Application/<应用id>/Documents

注意:此处的<应用id>和应用程序包里的并不一致,即使是同一个应用,也不一定相同。因此像定位到指定应用的id很麻烦,如果刚刚修改了某应用下的文件,可以在Application下使用命令

find . -mtime -1 -ls |sort -r

找到刚刚修改过的文件,进而定位到应用id
Library/Caches/

~/Library/Developer/CoreSimulator/Devices/<模拟器设备id>/data/Containers/Containers/Data/Application/<应用id>/Library/Caches
Library/Preferences/

~/Library/Developer/CoreSimulator/Devices/<模拟器设备id>/data/Containers/Containers/Data/Application/<应用id>/Library/Preferences
tmp/

~/Library/Developer/CoreSimulator/Devices/<模拟器设备id>/data/Containers/Containers/Data/Application/<应用id>/tmp

 

 

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM