#app審核悲劇# 2.23: Apps must follow the iOS Data Storage Guidelines or they will be rejected

2.23:?Apps?must?follow?the?iOS?Data?Storage?Guidelines?or?they?will?be?rejected

In?particular,?we?found?that?on?content?download,?your?app?stores?100+?mb?of?data.?To?check?how?much?data?your?app?is?storing:

-?Install?and?launch?your?app

-?Download?dictionaries

-?Go?to?Settings?>?iCloud?>?Storage?&?Backup?>?Manage?Storage

-?If?necessary,?tap?"Show?all?apps"

-?Check?your?app's?storage

The?iOS?Data?Storage?Guidelines?indicate?that?only?content?that?the?user?creates?using?your?app,?e.g.,?documents,?new?files,?edits,?etc.,?should?be?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.

Data?that?can?be?recreated?but?must?persist?for?proper?functioning?of?your?app?-?or?because?customers?expect?it?to?be?available?for?offline?use?-?should?be?marked?with?the?"do?not?back?up"?attribute.?For?NSURL?objects,?add?the?NSURLIsExcludedFromBackupKey?attribute?to?prevent?the?corresponding?file?from?being?backed?up.?For?CFURLRef?objects,?use?the?corresponding?kCFURLIsExcludedFromBackupKey?attribute.

For?more?information,?please?see?Technical?Q&A?1719:?How?do?I?prevent?files?from?being?backed?up?to?iCloud?and?iTunes?.

It?is?necessary?to?revise?your?app?to?meet?the?requirements?of?the?iOS?Data?Storage?Guidelines.

審核被拒了,原因是上面的,我估計(jì)是Documents文件夾下面有個(gè)文件夾有圖片、html、js等的原因。

其中有人回答如下,記錄一下

You should store any large sized data that is created while your app is running or when it starts for the first time in the /cache directory and not in the /documents directory (e.g. database files). You may save smaller files in the /documents directory though (e.g. settings or a configuration file which is just a few KBytes large).

在iCloud容器中存儲數(shù)據(jù)

從iOS 5開始,每種設(shè)備上的Settings應(yīng)用都有一個(gè)iCloud部分,可以讓用戶看到iClound中有多少數(shù)據(jù)用于備份,有多少數(shù)據(jù)用于應(yīng)用的同步。當(dāng)文件存儲在iCloud容器中,用戶看到的就是一大塊數(shù)據(jù);而當(dāng)存儲在Documents目錄下,用戶能看到獨(dú)立的文件以及大小。Documents目錄下的文件可以挨個(gè)兒刪除,但沒有存儲在這個(gè)目錄下的數(shù)據(jù)看起來就是一大塊,只能同時(shí)刪除。為避免混淆并方便操作,應(yīng)該把所有用戶生成的文件存儲在Documents目錄下,而把不想讓用戶看到的繁雜的元數(shù)據(jù)存儲在這個(gè)目錄之外。

?關(guān)于iCloud備份的一些信息

在iOS 5以前,當(dāng)設(shè)備跟iTunes同步時(shí),應(yīng)用的Documents文件夾下的內(nèi)容會自動備份。在iOS 5及后續(xù)版本的設(shè)備上,這些內(nèi)容會備份到iCloud,但開發(fā)者手動保存在iCloud的Documents中的數(shù)據(jù)不會包括在備份中(因?yàn)樗鼈円呀?jīng)在iCloud中了)。要注意這個(gè)自動備份和iCloud同步是不同的。備份文檔被當(dāng)做不透明的數(shù)據(jù),只能用來完全恢復(fù)一個(gè)iOS設(shè)備。而無論是通過編程還是用戶,都無法訪問單個(gè)文件。

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

推薦閱讀更多精彩內(nèi)容