1.DerivedData
位置:/Users/xingyang/Library/Developer/Xcode/DerivedData
描述:
2.沙盒
真机沙盒路径:/var/mobile/Applications/AD0AB40B-72B2-4FD3-8B5B-1F955839D1D9
这里我从越狱后的设备看,还有另一个目录private/var/mobile/Applications/AD0AB40B-72B2-4FD3-8B5B-1F955839D1D9,这两个目录在运行后没发现有什么区别.
模拟器沙盒路径:/Users/xingyang/Library/Developer/CoreSimulator/Devices/B0274BE8-2D0C-4670-B645-5FD956F9542B/data/Containers/Data/Application/632018E8-DB71-4992-ABF9-4FBBCD482FDD
获得该目录:NSHomeDirectory()
B0274BE8-2D0C-4670-B645-5FD956F9542B是模拟器的UDID;
沙盒中子目录:
/var/mobile/Applications/015515E2-460F-4838-ACD7-80D8C89A5F18/AppName.app
/var/mobile/Applications/015515E2-460F-4838-ACD7-80D8C89A5F18/Documents获得该目录:
- (NSString *) getDocumentDirectory {
return [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];
}
/var/mobile/Applications/015515E2-460F-4838-ACD7-80D8C89A5F18/Documents/Inbox
/var/mobile/Applications/351AE908-785A-41C1-BF48-425C12B1E097/Library
获得该目录:
- (NSString *) getLibraryDirectory {
return [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES) objectAtIndex:0];
}
/var/mobile/Applications/679A70A4-7650-4D53-9278-1F72B671EEF0/Library/Caches
获得该目录:
- (NSString *) getLibraryCachesDirectory {
return [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) objectAtIndex:0];
}
/var/mobile/Applications/A3F2CA34-08A9-4D00-8B0B-CE2B5F991E6E/Library/Application Support
获得该目录:
- (NSString *) getLibraryApplicationSupportDirectory {
return [NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES) objectAtIndex:0];
}
/private/var/mobile/Applications/7CC9BD45-7C66-406C-8B3D-84D943BE8363/tmp/
获得该目录:
NSTemporaryDirectory()
各目录的介绍:http://blog.csdn.net/wuming22222/article/details/44066283
文件操作参考:http://www.uml.org.cn/mobiledev/201209211.asp
4.当我们安装了了mobileprovision文件后,文件到哪里了呢?
位置:/Users/jathy/Library/MobileDevice/Provisioning Profiles/ 当我们删除掉这些文件后,若想要在添加可以到Xcode-->Preferences-->Accounts 点击相应的AppleID 然后view Details-->点击刷新按钮 即可将对应的Apple ID 的.mobileprovision文件安装好。