HOME > SqliteのDBファイル保存+レビュー却下
SqliteのDBファイル保存+レビュー却下
2回既にレビューを通過していたアプリが、バイナリレビューで却下されてしまいました。理由は、2.23 Details On launch and content download, your app stores 26.48MB on the user's iCloud, which does not comply with the iOS Data Storage となっていてSQLiteで利用していたSqliteファイルがiCouldに保存される量にしては多いから管理してください、といった旨の内容でした。別に却下理由に難癖つけるつもりではないのですが、最初のレビュー時にいってほしい。。。
参考:App Storeの審査経過報告[iCloud対応]
参考:iCloudのバックアップ問題でiPhoneアプリが却下されてしまいました。
参考:2.23 Apps must follow the iOS Data Storage Guidelines or they will be rejected【iOS】【リジェクト】
参考:Swift Boolean Literals (Obj-C @YES @NO equivalent)
以下却下理由の全文です
差出人: Apple
2.23 - Apps must follow the iOS Data Storage Guidelines
or they will be rejected
2.23 Details
On launch and content download, your app stores 26.48MB
on the user's iCloud, which does not comply with the iOS Data Storage Guidelines.
Next Steps
Please verify that only the content that the user creates using your app,
e.g., documents, new files, edits, etc. is backed up by iCloud as required
by the iOS Data Storage Guidelines. Also, check that any temporary files used
by your app are only stored in the /tmp directory; please remember to remove or
delete the files stored in this location when it is determined they are no longer needed.
Data that can be recreated but must persist for proper functioning of your app -
or because users 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 kCRUFLIsExcludedFromBackupKey attribute.
Resources
To check how much data your app is storing:
- Install and launch your app
- Go to Settings > iCloud > Storage > Manage Storage
- Select your device
- If necessary, tap "Show all apps"
- Check your app's storage
要は、iCloudに大型サイズのデータがアプリインストールだけで保存されてしまうので、 iCloud保存させないように設定してください、とのことのようでした。さて、既にコピーされているデータの属性を変えられる方法があるのでしょうか。
やってみた
どうやらNSURLクラスのNSURLIsExcludedFromBackupKeyを利用するとバックアップを防げるようです。調査してみます。
参考:Using NSNumber numberWithBool in Swift
参考:Prevent app from backing up documents folder?
参考:Exclude from iCloud backup: NSURLIsExcludedFromBackupKey
参考:http://blog.naotokui.net/page/2
Swiftの例があまり見当たりません。NSURLのメソッドsetResourceValueを利用して属性を変更するようです。
func addSkipBackupAttributeToItemAtURL(URL: NSURL!) -> Bool{
assert(NSFileManager.defaultManager().fileExistsAtPath(URL.path!))
var err : NSError? = nil
var success : Bool! = URL.setResourceValue(NSNumber(bool: true), forKey: NSURLIsExcludedFromBackupKey, error: &err);
if(!success){
println("Error excluding \(URL.lastPathComponent) from backup\(err) ")
}
return success
}
さて、これを既存のアプリに反映させて申請が通るかトライしてみます、、、、(8/17)
まとめ
リジェクト内容が担当者によって違う結果が出てくるので困ります。
↓こんな記事もありますよ!
![]() | カスタムクラスを作成時いつも忘れる。継承クラス作成時のメモカスタムクラスを作成する時いつもUIViewを継承する際のrequired Initの箇所でハマってしまうので覚書です。 |
![]() | UIToolBar画面の端っこに追加できるツールバーコントロール。アプリにピリッとアクセントを付けます。機能を追加したい時に便利です |
![]() | willsetとdidsetでプロパティを監視。意味あるのか???クラスのプロパティにはWillsetとdidsetという監視用の関数があると聞いたのですが、用途は分かるにしても メリットとしてはどういうものなのかなと、うーん、と考えていました。調べていると海外のサイトでは同じように疑問にもつ質問があがっていました。 getとsetで同じことができるのでは?との私と同じスタンスです。解決されていましたので、順に説明していきます。 |
Tweet
![]() |
|||
|