我开发了一个应用程序,可以从网上下载 mp3 文件(大小接近 6 到 8 mb)并存储在 NSDocumentDirectory 中。我的应用程序今天被拒绝并说
"Apps must follow the iOS Data Storage Guidelines or they will be rejected"
We found that your app does not follow the iOS Data Storage Guidelines, which is
required per the App Store Review Guidelines. The iOS Data Storage Guidelines
indicate that only content that the user creates using your app, e.g., documents,
new files, edits, etc., may be stored in the /Documents directory - and backed up
by iCloud.
Temporary files used by your app should only be stored in the /tmp directory;
please remember to delete the files stored in this location when the user exits
the app. "
我曾经将音乐文件存储在 NSDocumentDirectory 中。所以,这是我第一次这样做,我无法弄清楚实际问题。我应该怎么做才能重新提交我的应用程序以供接受。
这是我的代码
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectoryPath = [[paths objectAtIndex:0]stringByAppendingPathComponent:[NSString stringWithFormat:@"psalmsMusic%d.mp3",i]];
NSLog(@"ddddddd psalmsMusic%d.mp3",i);
i++;
NSLog(@"path %@",documentsDirectoryPath);
[receivedData writeToFile:documentsDirectoryPath atomically:YES];
真的需要一些帮助。