iOS应用抑制由于2.23 - iOS设备数据存储指南 [英] iOS App Rejection due to 2.23 - iOS Data Storage Guidelines

查看:138
本文介绍了iOS应用抑制由于2.23 - iOS设备数据存储指南的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

下面的消息来自苹果拒绝有关:

Here's message from Apple about rejection :

2.23 - 应用程序必须遵循的iOS数据存储的准则,否则将被拒绝
  详情2.23

2.23 - Apps must follow the iOS Data Storage Guidelines or they will be rejected 2.23 Details

在发射和内容下载,你的应用程序商店6.5 MB,这不
  符合iOS的数据存储的准则。

On launch and content download, your app stores 6.5 MB, which does not comply with the iOS Data Storage Guidelines.

下一步

请核实,只有用户创建的使用内容
  应用程序,例如,文件,新文件,编辑等通过iCloud的备份为
  通过iOS的数据存储要求的准则。此外,检查任何
  通过您的应用程序使用的临时文件只存放在/ tmp
  目录;请记住,移除或删除存储在文件
  此位置当确定它们不再需要。

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.

数据可以重建,但必须持续的正常运作
  您的应用程序 - 或者是因为用户希望它是可以脱机使用
   - 应标有不备份属性。对于NSURL对象,添加NSURLIsExcludedFromBackupKey属性prevent的
  从正在备份相应的文件。对于CFURLRef对象,请使用
  相应kCRUFLIsExcludedFromBackupKey属性。

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.

我检查了我的应用程序的数据文件都为设备和模拟器。我发现,如果应用程序使用了一段时间,这是总的应用数据可以存储5-6 MB,上发射。但我卸载并重新安装应用程序,并再次检查,我看〜3MB的数据存储在启动应用程序。

I checked out the data files of my application both for device and simulator. I found that if app has used for a while, it's total app data could store 5-6 MB, on launch. But I uninstalled and re-installed app and checked again, I see ~3MB data store on launch of app.

我不存储任何数据的核心数据库或任何其他数据库文件。但我已经意识到的谷歌分析和谷歌代码管理商店这条道路上的一些sqlite的数据:应用程序数据/库。我的意思是没有这条道路上存储应用程序数据/资料库/高速缓存。这会让适用于iOS数据存储的准则有什么区别?

I'm not storing any Core Data databases or any other database files. But I've realized that Google Analytics and Google Tag Manager stores some sqlite data on this path : "AppData/Library". I mean it does NOT store on this path : "AppData/Library/Caches". Does it make any difference for iOS Data Storage Guidelines?

顺便说一句, iCloud中是应用程序禁用。

By the way, iCloud is disabled for application.

另外我使用的 SDWebImage 下载图像,它的推出几乎存储3 MB的图像并存储这条道路上的图像数据:应用程序数据/资料库/高速缓存

Also I'm using SDWebImage for downloading images and it stores almost 3 MB images on the launch and it stores image data on this path : "AppData/Library/Caches"

你有什么想法,我应该怎么做来处理这个问题呢?

Do you have any idea that what should I do to handle this issue?

推荐答案

我刚刚得到了相同的拒绝消息昨天。

I just got the same rejection message yesterday.

我用应用以下code中:didFinishLaunchingWithOptions:来看看我的应用程序的文件夹中,什么是对的iCloud备份每个项目的权限

I use the following code in application:didFinishLaunchingWithOptions: to see what my application has inside the documents folder and what is the permission of each item about iCloud backup:

NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *basePath = ([paths count] > 0) ? [paths objectAtIndex:0] : nil;
NSArray *documents = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:basePath error:nil];
NSURL *URL;
NSString *completeFilePath;
for (NSString *file in documents) {
    completeFilePath = [NSString stringWithFormat:@"%@/%@", basePath, file];
    URL = [NSURL fileURLWithPath:completeFilePath];
    NSLog(@"File %@  is excluded from backup %@", file, [URL resourceValuesForKeys:[NSArray arrayWithObject:NSURLIsExcludedFromBackupKey] error:nil]);
}

我有这样的文件夹里面的一些文件用的iCloud同步。因此,而不是保存在其他地方的文件,我设置设置为 NSURLIsExcludedFromBackupKey 键资源价值YES 排除那些从文件中被备份iCloud的通过,是这样的:

I had some files inside that folder that were synchronising with iCloud. So instead of saving those files in another place I set the resource value for the NSURLIsExcludedFromBackupKey key set to YES to exclude those files from being backed up by iCloud, like this:

NSURL *URL = [NSURL fileURLWithPath:photoPath];
[URL setResourceValue:@(YES) forKey:NSURLIsExcludedFromBackupKey error:nil];

我今天再次送我的应用程序,看是否工作。

I'm sending my app again today to see if works.

希望这有助于。

这篇关于iOS应用抑制由于2.23 - iOS设备数据存储指南的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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