ドキュメント ディレクトリに移動する必要があるアプリ リソース バンドルに JavaScript ファイルを追加しましたが、パスのコピーを開始すると null が返されます。
コード:
NSString *jsPath = [[NSBundle mainBundle] pathForResource:@"jsFile" ofType:@"js"];
NSString *copyPath = [path stringByAppendingString:@"/jsFile.js"]; //path is the documents dir
NSLog(@"%@", jsPath); //Output of this is (null)
if ([[NSFileManager defaultManager] fileExistsAtPath:jsPath]) //returns false
[[NSFileManager defaultManager] copyItemAtPath:jsPath toPath:copyPath error:nil];
誰もこれに非常に遭遇したことがありますか?