iOS|iOS 获取模拟器上的沙盒下载路径

在工程里写上如下代码,打印出来

NSString *caches = [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) lastObject]; NSLog(@"caches:%@",caches); //会得到如下路径: //caches:/Users/soulkey/Library/Developer/CoreSimulator/Devices/E40580E3-1130-4B02-B4E4-6AFE0BBAFAB9/data/Containers/Data/Application/70E0BD51-A687-4B9C-A5CC-F88DC3AE98D4/Library/Caches

【iOS|iOS 获取模拟器上的沙盒下载路径】在Finder里选择前往文件夹,把library之前的路径粘贴进去就可以了

    推荐阅读