提交遊戲到AppStore被打回

https://developer.apple.com/icloud/documentation/data-storage/index.html

《iOS Data Storage Guidelines

Overview
iCloud includes Backup, which automatically backs up a user’s iOS device daily over Wi-Fi. Everything in your app’s home directory is backed up, with the exception of the application bundle itself, the caches directory, and temp directory. Purchased music, apps, books, the Camera Roll, device settings, home screen and app organization, messages, and ringtones are backed up as well. Because backups are done wirelessly and stored in iCloud for each user, it’s best to minimize the amount of data that’s stored for your app. Large files will lengthen the time it takes to perform a backup and consume more of a user’s available iCloud storage.

Storing Your App’s Data Efficiently
To ensure that backups are as efficient as possible, store your app’s data according to the following guidelines:

1.Only documents and other data that is user-generated, or that cannot otherwise be recreated by your application, should be stored in the <Application_Home>/Documents directory and will be automatically backed up by iCloud.

2.Data that can be downloaded again or regenerated should be stored in the <Application_Home>/Library/Caches directory. Examples of files you should put in the Caches directory include database cache files and downloadable content, such as that used by magazine, newspaper, and map applications.

3.Data that is used only temporarily should be stored in the <Application_Home>/tmp directory. Although these files are not backed up to iCloud, remember to delete those files when you are done with them so that they do not continue to consume space on the user’s device.

4.Use the "do not back up" attribute for specifying files that should remain on device, even in low storage situations. Use this attribute with data that can be recreated but needs to persist even in low storage situations for proper functioning of your app or because customers expect it to be available during offline use. This attribute works on marked files regardless of what directory they are in, including the Documents directory. These files will not be purged and will not be included in the user's iCloud or iTunes backup. Because these files do use on-device storage space, your app is responsible for monitoring and purging these files periodically.


《iOS Documents、Library和tmp的作用
http://blog.csdn.net/x1135768777/article/details/8864284
1.Documents:
只有用戶生成的文件、其他數據及其他程序不能重新創建的文件,應該保存在<Application_Home>/Documents 目錄下面,並將通過iCloud自動備份。
2.Library:
可以重新下載或者重新生成的數據應該保存在 <Application_Home>/Library/Caches 目錄下面。舉個例子,比如雜誌、新聞、地圖應用使用的數據庫緩存文件和可下載內容應該保存到這個文件夾。
3.tmp:
只是臨時使用的數據應該保存到 <Application_Home>/tmp 文件夾。儘管 iCloud 不會備份這些文件,但在應用在使用完這些數據之後要注意隨時刪除,避免佔用用戶設備的空間


《獲取iphone 手機的Documents 和Library/Caches 目錄
http://blog.sina.com.cn/s/blog_8087a53501012x2n.html
NSSearchPathDomainMask(NSHomeDirectory(),NSUserDomainMask,YES);
NSSearchPathDomainMask(NSCachesDirectory(),NSUserDomainMask,YES);

發佈了231 篇原創文章 · 獲贊 26 · 訪問量 262萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章