我的 iphone 应用程序因此被拒绝“我们发现您的应用程序不遵循 iOS 数据存储指南,......" [英] My iphone App got rejected with this reason "We found that your app does not follow the iOS Data Storage Guidelines,..."

查看:22
本文介绍了我的 iphone 应用程序因此被拒绝“我们发现您的应用程序不遵循 iOS 数据存储指南,......"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 iphone 应用最近被拒绝了 &原因如下:

My iphone app has got rejected recently & with below mentioned reason :

我们发现您的应用未遵循 iOS 数据存储指南,这不符合 App Store 审核指南."

"We found that your app does not follow the iOS Data Storage Guidelines, which is not in compliance with the App Store Review Guidelines."

对于这个应用程序,我将数据库(sqlite 文件)存储在 iOS 5.0.1 & 的/Documents/目录中上面&适用于 iOS 5.0 和以下版本我使用 Library/Cache 目录.

对于其他数据,如 PDF 和我从服务器下载的艺术品图像我遵循与上述相同的方法,例如:iOS 5.0.1 &后来: 将这些数据保存到/Documents/目录中iOS 5.0 &早期版本: 将数据保存到 Library/Cache 目录.

For other data like PDF & artwork images which I was downloading from server I followed the same approach as above like: iOS 5.0.1 & Later: Saved these data into /Documents/ directory iOS 5.0 & earlier versions: Saved data to Library/Cache directory.

这种方法正确吗?

根据 Apple 指南:重要提示:新的不备份"属性仅适用于 iOS 5.0.1 或更高版本.在 iOS 5.0 和更早版本上,应用程序需要将其数据存储在/Library/Caches 中以避免备份.由于此属性在旧系统上会被忽略,因此您需要确保您的应用在您的应用支持的所有 iOS 版本上都符合 iOS 数据存储指南.

As per Apple guideline: Important: The new "do not back up" attribute will only be used by iOS 5.0.1 or later. On iOS 5.0 and earlier, applications will need to store their data in /Library/Caches to avoid having it backed up. Since this attribute is ignored on older systems, you will need to insure your app complies with the iOS Data Storage Guidelines on all versions of iOS that your application supports.

对于为 iOS 5.0.1 & 存储的数据的不备份"属性分配也很困惑.之后.我需要为哪些文件分配这个标志?我可以将它用于数据库吗?.

Also very confused about that "do not back up" attribute assignment for the data stored for iOS 5.0.1 & later. For which files i need to assign this flag ? Can i use it for database?.

需要摆脱这些拒绝,因为它已经发生了两次.请为我的应用程序存储数据提供一些指导.提前致谢.期待积极的回应.

Need to get rid of these rejection as it has happened twice. Please provide some guidance for storing the data for my app. Thanks in advance. Looking forward for positive response.

推荐答案

检查https://developer.apple.com/icloud/documentation/data-storage/

具体来说:

将此属性用于可以重新创建但需要重新创建的数据即使在存储空间不足的情况下也能保持您的正常运行应用程序或因为客户希望它在离线使用期间可用.此属性适用于标记的文件,无论它们位于哪个目录都在,包括 Documents 目录.

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.

将 SQLite db 存储在 caches 文件夹中并设置 donotbackup 标志,这将阻止文件被缓存清理系统删除

Store the SQLite db in the caches folder and set the donotbackup flag, which will stop the file being deleted by the cache clean system

- (BOOL)addSkipBackupAttributeToItemAtURL:(NSURL *)URL
{
    const char* filePath = [[URL path] fileSystemRepresentation];

    const char* attrName = "com.apple.MobileBackup";
    u_int8_t attrValue = 1;

    int result = setxattr(filePath, attrName, &attrValue, sizeof(attrValue), 0, 0);
    return result == 0;
}

我在我的应用程序中使用数据库并将其存储在缓存文件夹中(设置了上述标志)并且刚刚获得批准没问题.

I use a database in my app and store it in the cache folder (with the above flag set) and just got approved no problem.

此外,您可以将数据存储在文档目录的子文件夹中,我相信不会备份,但会保留.

In addition you can store your data in a subfolder of the documents directory, which I believe won't get backed up, but will persist.

这篇关于我的 iphone 应用程序因此被拒绝“我们发现您的应用程序不遵循 iOS 数据存储指南,......"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆