关于 Details On launch and content download, your app stores 15.83MB on the user's iCloud被拒问题
2015-12-14 12:34
639 查看
由于朋友遇到appstore上架问题2.23 Details On launch and content download, your app stores 15.83MB on the user's iCloud, which does not comply with the iOS Data Storage被拒。
解决方法1:就是不让iCoud备份数据,跳过ICloud的备份
Object C代码:
ios5.1 later
使用方法:
附录:获取url的路径的方法(其实就是你文件的路径):
Swift代码:
解决方法二:就是不让打的重用的数据放到Documents文件夹下
图片的缓存可以放到/tmp文件夹下会
下载可以重用的东西放/Library/Caches
2.23 Details On launch and content download, your app stores 15.83MB on the user's iCloud, which does not comply with the iOS Data Storage这是由于把大量的数据存放在documents下的问题,appStore 的iCloud备份这里面的数据
解决方法1:就是不让iCoud备份数据,跳过ICloud的备份
Object C代码:
ios5.1 later
- (BOOL)addSkipBackupAttributeToItemAtURL:(NSURL *)URL { assert([[NSFileManager defaultManager] fileExistsAtPath: [URL path]]); NSError *error = nil; BOOL success = [URL setResourceValue: [NSNumber numberWithBool: YES] forKey: NSURLIsExcludedFromBackupKey error: &error]; if(!success){ NSLog(@"Error excluding %@ from backup %@", [URL lastPathComponent], error); } return success; }
使用方法:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [self addSkipBackupAttributeToItemAtURL:[NSURL URLWithString:@"<myApplication>/Library/Caches"]]; }
附录:获取url的路径的方法(其实就是你文件的路径):
NSArray * arrayOfURLs = [[NSFileManager defaultManager] URLsForDirectory:NSCachesDirectory inDomains:NSUserDomainMask]; // make certain there's at least one file url returned by the above call if([arrayOfURLs count] > 0) { // and this would just be the URL to the cache directory... NSURL * cacheDirectoryPath = [arrayOfURLs objectAtIndex: 0]; // ... to create a file url to your actual dictionary, you'd need to add a // filename or path component. // Assuming you save this as a property within your object self.cacheFileURL = [cacheDirectoryPath URLByAppendingPathComponent: @"myDatabase.db"]; }
Swift代码:
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); });
解决方法二:就是不让打的重用的数据放到Documents文件夹下
图片的缓存可以放到/tmp文件夹下会
下载可以重用的东西放/Library/Caches
相关文章推荐
- 上拉刷新 下拉加载更多-PullToRefreshListView的简介
- android_studio多渠道打包
- Android编程之json解析实例详解
- 解决android有的手机拍照后上传图片被旋转的问题
- Android EditText 不弹出软键盘
- Android测试工具详解
- foundation的使用——NSDate
- 15款优秀移动APP产品原型设计工具
- 安卓开发之安卓反编译
- android-Computation(RenderScript)
- iOS 页面跳转动画CATransition详细分析
- 《Android群英传》读书笔记(1)第三章:Android控件与自定义控件详解
- Unity3D研究院之主角面朝方向一定区域内对象角度计算(四十五)
- 微信支付趟过的坑
- Android Notification I-创建和使用方法
- Java中Object类hashCode的实现
- 向Android源码目录添加新的git目录
- iOS8 用AVAudioPlayer播放音乐(Swift)
- Android Studio 工程依赖问题
- 美团Android资源混淆保护实践 - 美团技术团队