怎么把一个resource文件放到app的cache目录下?

我的一个游戏被reject了,说是Document下面有一个文件会上传到iCloud里。

解决的办法是https://developer.apple.com/library/ios/#qa/qa1719/_index.html

我想用最简单的这种,也就是把文件放到Cache目录中,问题是,怎么放?

NSArray* cachePathArray = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);

NSString* cachePath = ;

NSString* source= pathForResource:@"pl_part1" ofType:@"txt"];

copyItemAtPath:source toPath:cachePath error:&error];

直接使用NSFileManager就可了

copyItemAtPath:source toPath:cachePath error:&error];