[2014-06-01][转]apps须遵循iOS数…
来源:互联网 发布:淘宝的港货可以买吗? 编辑:程序博客网 时间:2024/04/30 15:20
2.23 Apps must follow the iOS Data StorageGuidelines or they will be rejected
苹果审核折腾人啊,这次是数据存储的事
2.23
2.23应用程序必须遵循iOS数据存储指南,否则他们将被拒绝
We found that your app does not follow the iOS Data StorageGuidelines, which is required per the App Store ReviewGuidelines.
我们发现你的应用程序没有遵循iOS数据存储的指导方针,
In particular, we found that on launch and/or content download,your app stores 7.38MB. To check how much data your app isstoring:
特别是,我们发现在启动或内容下载,你的应用程序商店7.38 mb。检查你的程序是多少数据存储:
- Install and launch your app
- Go to Settings > iCloud > Storage & Backup > ManageStorage
- If necessary, tap "Show all apps"
- Check your app's storage
——你的应用程序安装和启动
——去设置>
——如果有必要的话,点击“显示所有应用程序”
你的应用程序的存储——检查
The iOS Data Storage Guidelines indicate that only content that theuser creates using your app, e.g., documents, new files, edits,etc., should be backed up by iCloud.
iOS数据存储指南表明,只有内容,使用你的应用程序的用户创建,例如文档、新文件,编辑等,应由iCloud备份。
Temporary files used by your app should only be stored in the /tmpdirectory; please remember to delete the files stored in thislocation when the user exits the app.
临时文件所使用的应用程序应该只被存储在/ tmp目录;请记住删除在这个位置的文件存储,当用户退出应用程序时。
Data that can be recreated but must persist for proper functioningof your app - or because customers expect it to be available foroffline use - should be marked with the "do not back up" attribute.For NSURL objects, add the NSURLIsExcludedFromBacku
数据,可以重新创建但是必须持续正常运行你的应用程序——或因为客户期望它能离线使用,应该被标上“不支持”属性。对于NSURL对象,添加NSURLIsExcludedFromBacku
For more information, pleasesee
有关更多信息,请见技术问答1719:我如何防止文件备份到iCloud和iTunes ?。
It is necessary to revise your app to meet the requirements of theiOS Data Storage Guidelines.
For discrete code-level questions, you may wish to consult withApple Developer Technical Support. Please be sure to:
- include the complete details of your rejection issues
- prepare any symbolicated crash logs, screenshots, and steps toreproduce the issues for when the DTS engineer follows up.
有必要修改您的应用程序以满足需求的iOS数据存储指南。
对离散代码级问题,你可能会希望咨询苹果开发者技术支持。请务必:
——包括完整的细节,你的排斥问题
——准备任何symbolicated崩溃记录,截屏和步骤来再现问题当DTS工程师跟踪。
For information on how to symbolicate and read a crash log, pleasesee Tech Note TN2151 Understanding and Analyzing iPhone OSApplication Crash Reports.
If you have difficulty reproducing this issue, please try testingthe workflow as described in Testing Workflow with Xcode's Archivefeature".
关于如何symbolicate和读一个崩溃的日志,请见技术注意TN2151理解和分析iPhone OS应用程序崩溃报告。
如果你很难繁殖这个问题,请尝试测试工作流中描述的
<https://developer.apple.com/library/ios/qa/qa1764/
Technical Q&A 1719: How do I prevent files from beingbacked up to iCloud and iTunes?.
https://developer.apple.com/library/ios/#qa/qa1719/_index.html
Technical Q&A QA1764:Testing Workflow with Xcode'sArchive feature
http://developer.apple.com/library/ios/#qa/qa1764/_index.html
https://developer.apple.com/library/ios/#technotes/tn2008/tn2151.html
Technical Q&A QA1719
Howdo I prevent files from being backed up to iCloud andiTunes?Q:A: On iOS, apps are responsible for ensuring that only user dataand not application data is backed up to iCloud and iTunes. Theexact steps necessary vary between iOS version, so this QA willdescribe the process for each version of iOS. For more informationon exactly what data should or should not be backed up, seethe
答:关于iOS,应用程序负责确保只有用户数据,而不是应用程序数据备份到iCloud和iTunes。确切的必要步骤不同iOS版本,所以这QA将描述这个过程对于每个版本的iOS。更多信息正是数据应该或不应该备份,请参阅应用程序备份的最佳实践部分的iOS应用程序编程指南<http://developer.apple.com/library/ios/
Important:
重要:应用程序应该避免混合应用程序数据和用户数据在同一个文件中。这样做将增加不必要的备份大小,可以被看作是违反了iOS数据存储指南。
iOS5.1 and laterStarting in iOS 5.1, apps can useeither
在iOS 5.1开始,应用程序可以使用<http://developer.apple.com/library/ios/
Listing 1
排除一个文件备份
Back to Top
iOS 5.0.1
If your app must support iOS 5.0.1, you can use the followingmethod to set the "do not back up" extended attribute. Whenever youcreate a file or folder that should not be backed up, write thedata to the file and then call this method, passing in a URL to thefile.
如果你的应用程序必须支持iOS5.0.1,您可以使用以下方法来设置“不支持“扩展属性。当你创建一个文件或文件夹,不应该备份,将数据写入文件,然后调用这个方法,传入一个URL到文件。
Warning: The code that follows has been deprecated and should onlybe used on iOS 5.0.1 or earlier. When running in iOS 5.1, appsshould use the NSURL and CFURL keys described above.
Listing 2 Setting the Extended Attribute on iOS 5.0.1
警告:后面的代码已经被弃用,只应该用于iOS 5.0.1或更早。在iOS 5.1运行时,应用程序应该使用上面描述CFURLNSURL和钥匙。
清单2设置扩展属性在iOS 5.0.1
#import
-
{
assert([[NSFileManager defaultManager]fileExistsAtPath:
const char* filePath =
const char* attrName=
u_int8_t attrValue = 1;
int result = setxattr(filePath,attrName,
return result == 0;
}
Back to Top
It is not possible to exclude data from backups on iOS 5.0. If yourapp must support iOS 5.0, then you will need to store your app datain Caches to avoid that data being backed up. iOS will delete yourfiles from the Cachesdirectory when necessary, so your app willneed to degrade gracefully if it's data files are deleted.
Back to Top
它不可能排除在iOS 5.0的数据备份。如果你的应用程序必须支持iOS5.0,那么您将需要存储应用程序数据缓存来避免数据备份。iOS将会删除你的文件从缓存目录在必要的时候,所以你的应用程序将需要完全降低如果它的数据文件被删除。
解决办法:
程序数据和图片、sqlite数据库---不需要云备份,(离线看需要本地数据)
用户数据(用户浏览的食谱图片、胎教音乐)---需要云备份
有临时文件就设置在
我也遇到过,之前把所有数据都存在Documents下了,改了目录就通过了
数据的问题: 1-1,只有用户产生的数据应该放到/Documents里,你app产生的不要放1-2,下载可以重用的东西放/Library/Caches 1-3,临时的放/tmp,不用的时候记得删掉 1-4,用"do notbackup"标记需要留在设备上的数据,那些没联网也可以保证使app运行的数据(别因为连不上网拿不到数据app运行不了)
- [2014-06-01][转]apps须遵循iOS数…
- apps须遵循iOS数据存储指南
- apps须遵循iOS数据存储指南
- Flash IOS APPs Cookbook
- iOS Apps核心对象
- Open-Source iOS Apps
- Start Developing iOS Apps Today
- Localization of Xcode iOS Apps
- Start Developing iOS Apps Today
- Start Developing iOS Apps Today
- HowTo: iOS Apps - Static analysis
- Start Developing iOS Apps Today
- start developing ios apps today
- iOS Apps间分享数据
- Websites for iOS apps and OS X apps
- ios 删掉archive 里的iOS Apps
- About Table Views in iOS Apps
- Sharing Data Locally Between iOS Apps
- [2014-04-16]Pod::Executable&nbsp…
- [2014-04-20]ios获取数据中去掉htm…
- [2014-04-21]解决uitableviewcell…
- iOS 开发者必知的 75&nb…
- ios支付宝Demo报错(Linker co…
- [2014-06-01][转]apps须遵循iOS数…
- [2014-09-25]对于Xcode6里面反射(p…
- [2014-10-09]Xcode6更新之后的一些…
- [2014-10-20]XCode6编译问题:fata…
- XCode报错 has been&nbs…
- [转]UISearchbar去除背景色的方法…
- [2014-10-18]iOS8开发错误整理(持…
- 程序员应该关注的一些事儿
- [2014-11-25]友盟分享错误汇总