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

查看:153
本文介绍了我的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&以下版本我使用了库/缓存目录。

对于其他数据,如PDF&我从服务器下载的艺术作品图片我采用了与上述相同的方法:
iOS 5.0.1&稍后:将这些数据保存到/ Documents /目录
iOS 5.0&早期版本:将数据保存到库/缓存目录。

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/

具体:


将此属性与可以重新创建的数据一起使用,但即使在低存储情况下也需要
,以确保正常运行
app或因为客户希望它在离线使用时可用。
此属性适用于标记文件,无论它们是
所在的目录,包括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数据库存储在缓存文件夹中并设置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天全站免登陆