久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

iOS 5 不允許將下載的數據存儲在 Documents 目錄中

iOS 5 does not allow to store downloaded data in Documents directory?(iOS 5 不允許將下載的數據存儲在 Documents 目錄中?)
本文介紹了iOS 5 不允許將下載的數據存儲在 Documents 目錄中?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

限時送ChatGPT賬號..

我通過將目標 iOS 設置為 4 為我的客戶創建了一個應用程序.
但由于應用程序仍未提交到 Apple Store,我的客戶計劃將其升級到 iOS 5.0.

I have made an application for my client by keeping target iOS as 4.
But since the application still not submitted to Apple store, my client is planning to upgrade it for iOS 5.0.

為此,我閱讀了 Apple 的 指南,發現僅用戶生成的數據或應用程序無法重新創建的數據,應存儲在/Documents 目錄中,其余數據應存儲在/Library/Caches 目錄中"

For this I read the guideline from Apple and found that "Only user-generated data or that cannot otherwise be recreated by your application, should be stored in the /Documents directory and rest should be stored to /Library/Caches directory"

在我的應用程序中,我將應用內購買的服務器模型用于非消耗性產品.為此,我將所有下載的數據(基本上是書籍或雜志)存儲到 Documents 目錄中.數據庫也存在于同一目錄中,其中包含有關下載產品的詳細信息.

In my application, I am using server model of in-app purchase for non-consumable product. For this I am storing all my downloaded data (which are basically books or magazines) to Documents directory. The Database is also present in the same directory which contains the details about the downloaded products.

我的問題是,
1. 我是否必須更改代碼以將下載的數據存儲到 Library/Caches 目錄而不是 Documents 目錄?
2. 我的數據庫文件應該放在哪里(文檔或緩存)?

My question is,
1. Should I have to change my code to store the downloaded data to Library/Caches directory instead of to the Documents directory?
2. Where should my database file be placed (to Documents or Caches)?

如果我把它放在緩存中,那么我也必須改變檢索的邏輯,因為如果數據庫中存在記錄,則不需要更改文件的存在,它直接打開它用戶點擊雜志.

If I put it products in the Caches then I have to change the logic of retrieval also, since it is considered that if record is present in database, there is no need change the existence of the file and it directly opens it when user clicks on the magazine.

請在這個問題上指導我.
提前致謝.

Kindly guide me on this issue.
Thanks in advance.

更新:
我正在為那些仍然不確定這個問題的人更新這個.
使用接受答案的指導方針,我已經在我的 2 個應用程序中實現了這一點,并將它們提交到 Apple Store.兩者都在審查中獲得批準.
這可能會促進接受的答案中建議的解決方案是正確的.

UPDATED:
I am updating this for those who are still not sure about this problem.
Using the guideline of accepted answer, I have implemented this in 2 of my applications and submitted them to Apple Store. Both were approved in review.
This may promote that the solution suggested in the accepted answer is correct.

推薦答案

以下是取舍:

  • 如果您將文件放在 Documents 目錄中,那么它們會被備份到 iTunes 或 iCloud,但如果它們太大并且可以再次下載文件,那么 Apple 可能會拒絕您的應用
  • 如果您將文件放在緩存目錄中,那么它們不會被備份,Apple 也不會拒絕您的應用.但是,當 iOS 5 空間不足時,它可能會刪除其中的所有文件.
  • If you put your files in the Documents directory then they are backed up to iTunes or iCloud but if they are too big and it's possible to download the files again then Apple may reject your app
  • If you put your files in the Cache directory then they won't be backed up and Apple won't reject your app. However, when iOS 5 gets low on space it may delete all the files in there.

但是,對于 iOS 5.0.1,還有第三種選擇:

However, with iOS 5.0.1 there is a third option:

  • 將文件放在 Documents 中,但對其進行標記,以免備份.有一個技術說明 (QA1719)如何做到這一點.
  • Put files in Documents but flag them so that they are not backed up. There's a technote (QA1719) on how to do this.

我認為這可能是最適合你的答案.

I think this is probably the best answer for you.

這篇關于iOS 5 不允許將下載的數據存儲在 Documents 目錄中?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

KIF: How to auto-run/stress test an iOS app to find the cause of a rare UI bug?(KIF:如何自動運行/壓力測試 iOS 應用程序以找出罕見 UI 錯誤的原因?)
Can#39;t change target membership visibility in Xcode 4.5(無法更改 Xcode 4.5 中的目標成員身份可見性)
UITableView: Handle cell selection in a mixed cell table view static and dynamic cells(UITableView:在混合單元格表視圖靜態和動態單元格中處理單元格選擇)
How to remove Address Bar in Safari in iOS?(如何在 iOS 中刪除 Safari 中的地址欄?)
iOS 5 SDK is gone after upgrade to Xcode 4.5(升級到 Xcode 4.5 后,iOS 5 SDK 消失了)
Having trouble creating UIImage from CIImage in iOS5(在 iOS5 中從 CIImage 創建 UIImage 時遇到問題)
主站蜘蛛池模板: 欧美一二三区 | 麻豆精品一区二区三区在线观看 | 日本午夜在线视频 | 亚洲成人观看 | 夜夜摸夜夜操 | 欧美精品一 | 农村真人裸体丰满少妇毛片 | 国产一区二区三区 | 国产欧美一区二区三区在线看蜜臀 | 国产精品久久久亚洲 | 精品国产乱码久久久久久图片 | 国产一区二区影院 | 综合久久99 | 国产免费视频 | 久久精品国产久精国产 | 91精品中文字幕一区二区三区 | 国产一区亚洲 | 成人免费网视频 | 欧美日韩在线不卡 | 黄频免费 | 国产综合久久 | 91黄在线观看 | 国产精品成av人在线视午夜片 | 先锋资源站 | 成人免费一区二区三区视频网站 | 看一级毛片视频 | 97免费在线观看视频 | 欧美日韩午夜精品 | 精品国产aⅴ | 中文字幕国 | 色.com | 欧美小视频在线观看 | 在线日韩精品视频 | 国产成人免费视频网站视频社区 | 99久久久国产精品 | 国产aⅴ | 久久国产福利 | 久久香焦 | 精品久久久久久久久亚洲 | 国产精品美女在线观看 | 国产一区二区三区在线视频 |