12312312
12312312
  • 发布:2015-04-30 12:58
  • 更新:2015-04-30 18:28
  • 阅读:2673

ios如何防止iCloud备份?

分类:Native.js

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 10.13 MB, 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  

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

If you have difficulty reproducing a reported issue, please try testing the workflow described in Technical Q&A QA1764: How to reproduce bugs reported against App Store submissions.

If you have code-level questions after utilizing the above resources, you may wish to consult with Apple Developer Technical Support. When the DTS engineer follows up with you, please be ready to provide:

  • complete details of your rejection issue(s)
  • screenshots
  • steps to reproduce the issue(s)
  • symbolicated crash logs - if your issue results in a crash log

这意思是说我的离线文件不符合规范,要设置一个不备份到iCloud的属性,请问如何如何设置?

我的app中有zip类型的下载资源,下载完成后解压到了documents目录中。在上线的时候苹果商店说不符合规范,查资料说要设置一个不备份的属性。

2015-04-30 12:58 负责人:无 分享
已邀请:
DCloud_IOS_XTY

DCloud_IOS_XTY

JS层还不能控制是否进行备份

  1. 现在runtime不备份www,后续版本会把runtime创建的根目录设置为不备份,并提供API进行控制是否备份
  2. 可以尝试使用NJS进行控制是否备份
DCloud_IOS_XTY

DCloud_IOS_XTY

下边是NJS设置应用私有document不备份的示例

plus.io.requestFileSystem(plus.io.PRIVATE_DOC, function(fs){  
        var NSURL = plus.ios.import("NSURL");  
        var NSNumber = plus.ios.import("NSNumber");  
        var url = NSURL.fileURLWithPath(fs.root.fullPath);  
        var backup = NSNumber.numberWithBool(true);  
        url.setResourceValueforKeyerror(backup,"NSURLIsExcludedFromBackupKey", null);  
        plus.ios.deleteObject(url);  
        plus.ios.deleteObject(backup);  
});
  • 12312312 (作者)

    已设置成功,万分感谢。不过还是期待新版本,免去设置这个步骤

    2015-05-08 17:47

12312312

12312312 (作者)

各位大神,没有人知道吗?

该问题目前已经被锁定, 无法添加新回复