Storing Your App’s Data Efficiently

https://developer.apple.com/icloud/documentation/data-storage/index.html

总结: 用户产生的: 存储在Documents, 会被备份到iCloud

程序产生的:  如数据库, 下载的缓存图片, 存储在 Library/Caches

临时的文件: 存储再Temp目录, 用完记得删

To ensure that backups are as efficient as possible, store your app’s data according to the following guidelines:

  1. Only documents and other data that is user-generated, or that cannot otherwise be recreated by your application, should be stored in the <Application_Home>/Documents directory and will be automatically backed up by iCloud.
  2. Data that can be downloaded again or regenerated should be stored in the <Application_Home>/Library/Caches directory. Examples of files you should put in the Caches directory include database cache files and downloadable content, such as that used by magazine, newspaper, and map applications.
  3. Data that is used only temporarily should be stored in the <Application_Home>/tmp directory. Although these files are not backed up to iCloud, remember to delete those files when you are done with them so that they do not continue to consume space on the user’s device.
  4. Use the "do not back up" attribute for specifying files that should remain on device, even in low storage situations. 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. These files will not be purged and will not be included in the user's iCloud or iTunes backup. Because these files do use on-device storage space, your app is responsible for monitoring and purging these files periodically.

iOS文件存储路径规定的更多相关文章

  1. unity中的文件存储路径与各平台(Android,iOS)的关系

    原文链接:unity中的文件存储路径与各平台(Android,iOS)的关系 主要是这个问题困扰我了一阵子,所以特写写... unity中的的各种存储方法的对应关系(直接上截图吧) 重点说的是Appl ...

  2. 截取linux文件存储路径方法

    1.截取linux文件存储路径方法 package com.tydic.eshop.action.freemarker; public class dddd { public static void ...

  3. 转:Android文件存储路径getFilesDir()与getExternalFilesDir的区别

    作为一个开发者,我们经常需要通过缓存一些文件到SD卡中,常见的方式就是,通过: File sdCard = Environment.getExternalStorageDirectory(); 获取S ...

  4. 修改Jupyter Notebook默认文件存储路径(已安装Anaconda)

    https://blog.csdn.net/weixin_44799144/article/details/91823079 修改Jupyter Notebook默认文件存储路径首先,安装好Anaco ...

  5. 【HANA系列】SAP HANA的ini文件存储路径

    公众号:SAP Technical 本文作者:matinal 原文出处:http://www.cnblogs.com/SAPmatinal/ 原文链接:[HANA系列]SAP HANA的ini文件存储 ...

  6. IOS文件存储小结

    转自:http://tyragain.lofter.com/post/84706_c1503 首选项设置存储 NSUserDefaults 以及通过它控制的SettingBundle  NSUserD ...

  7. up6-自定义文件存储路径

    在up6.2中有两种保存模式,一种是md5一种是uuid. md5由PathMd5Builder生成存储路径.md5主要提供给文件使用,可在服务器端保存唯一的文件,有效避免重复文件. uuid由Pat ...

  8. iOS 5 does not allow to store downloaded data in Documents directory? ios5.0及以后的版本对于下载的文件存储路径有了改变

    I have made an application for my client by keeping target iOS as 4. But since the application still ...

  9. Outlook IMAP 修改PST文件存储路径

    IMAP类型的账户修改PST文件位置方法: 对于IMAP类型账户的PST文件,既没有“修改文件夹”的选项,也无法按OFFICE官方操作指南中的操作.因为每次Outlook只要检测到默认路径下的PST文 ...

随机推荐

  1. 迅雷首席架构师刘智聪:微信小程序的架构与系统设计的几点观感

    笔者注:本文来自于迅雷首席工程师刘智聪的个人分享,他毕业于南昌大学化学系,加入迅雷后设计开发了多款迅雷核心产品,凭借“大规模网络流媒体服务关键支撑技术”项目获得2015年国家科学技术进步奖二等奖,同时 ...

  2. [BZOJ 3038]上帝造题的7分钟2(树状数组)

    分析:http://www.lydsy.com:808/JudgeOnline/problem.php?id=3038 这题看起来没办法做……但是注意到1e12只要开方8次就能到1……所以直接暴力就行 ...

  3. Coding the Matrix (0):映射、复数和域

    1. 非常好的 Python 教程 <深入 Python 3.0> 以及 IBM 开发社区的博客探索 Python. 2. 子集: s 是 S 的子集 >>>S = {2 ...

  4. WCF 入门(15)

    前言 度过了一个阳光明媚的周末. 一个阴霾的周日夜晚. 第15集 WCF里面的异常处理(1)  Exception handling in WCF 大致看了一下,这个WCF视频里面总共有6集,这个是第 ...

  5. window下为apache配置ssl证书

    转载自 子非鱼 的博客稍作修改 第一步:依赖 配置Apache服务器支持https协议和SSL证书,最基本的要求是Apache包含openssl模块.还好apache/bin目录下有libeay32. ...

  6. myeclipse 配置weblogic

    1.打开myeclipse,选择Window -> Preferences--->MyEclipse--->servers 2.点击servers---->weblogic-- ...

  7. 5.Android之image控件学习

    Android中经常用到图片,比如图片浏览.图标等等,今天学习下image控件,image控件主要有ImageButton和ImageView两种. (1)ImageButton 在布局文件增加: & ...

  8. 中间件、MetaQ入门学习

    目录 . 中间件技术 . MetaQ中间件 . MetaQ编程实践 1. 中间件技术 0x1: 中间件简介 中间件(Middleware)是提供系统软件和应用软件之间连接的软件,以便于软件各部件之间的 ...

  9. Record is locked by another user --Oracle行锁解锁

    Oracle修改表中记录时出现record is locked by another user的问题 在操作表时没有commit,导致表被锁,只要执行下面两行语句,就可以了将行锁解锁了. 1.     ...

  10. Java 对象的串行化(Serialization)

    1.什么是串行化 对象的寿命通常随着生成该对象的程序的终止而终止.有时候,可能需要将对象的状态保存下来,在需要时再将对象恢复.我们把对象的这种能记录自己的状态以便将来再生的能力.叫作对象的持续性(pe ...