1>//获取沙盒路径
NSArray*path =NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask,YES);
//Users/ZZ_running/Library/Developer/CoreSimulator/Devices/B9F35720-6386-445A-A0DA-0D911BFA64C3/data/Containers/Data/Application/176DA32A-E007-42F5-8716-3BBD80FFAB4F/Library/Documents;
在iOS8之前,我们获取到沙盒中的document、cache、tmp之后,下一次模拟器或真机无论重启多少次,这具体的路径是固定的,可是iOS8 之后,你要是在按原来的路径去找你想要的东西,我想它会把你坑的很惨.下面我就来说说自己的此次爬坑总结;
2>获取png所在沙盒路径Bundle路径
NSString *path = [[NSBundle mainBundle] pathForResource: ofType:@"toolview_camera_btn_normal@2x.png" ofType:@"resourceType"];
//[self.player setPlayerOptionValue:@"color=gray@0.6:180x50 [c]; [in][c] overlay=main_w-200:100" forKey:@"vf0"];
//NSString *path_str= [[NSBundle mainBundle] pathForResource:@"toolview_camera_btn_normal@2x" ofType:@"png"];
//NSString * filter = [NSString stringWithFormat:@"movie=%@ [watermark]; [in][watermark] overlay=10:10" , path_str];
self.currentPlayUrl = [[NSBundle mainBundle] pathForResource:@"list" ofType:@"ffconcat"];