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. 简述WebService的使用(二)

    上集回顾 上一篇我简单的介绍了一下整个WebService建立和后端访问的过程,如果感兴趣可以看一看:简述WebService的使用(一) //如有不懂请留言,觉得有用请点赞 内容提要 这一篇主要介绍 ...

  2. Git.Framework 框架随手记--ORM查询数据集合 一

    本文记录Git.Framework之ORM中最为浓墨重彩的一篇,查询集合.根据自己做的项目统计这个是使用频率最高的一个. 一. 查询集合方法简介 (1)List<T> GetList(); ...

  3. Mac 下安装tomcat

    一. 下载tomcat 首先要到tomcat官网去下载安装包,官网下载地址如下:http://tomcat.apache.org/download-70.cgi , 注意请下载飞windows版本.和 ...

  4. (旧)子数涵数·PS——冷色调与LOMO

    一.准备素材(我是从百度图库里下载的) 二.打开PS和素材 三.复制图层,快捷键Ctrl+J,并把原图层隐藏,只在副本上编辑(好习惯) 四.使用"匹配颜色"命令,增加"明 ...

  5. express 笔记 app.helpers 和 app.locals

    app.helpers 和app.dynamicHelpers 是express2.X使用的 分别为静态/动态 视图助手通过其注册函数, 例如 app.helpers({ <span style ...

  6. Daily Scrum – 1/18

    Meeting Minutes 完成了User Course, 与 Tips 的设计; 修复了一系列Bug; 完成了夜间模式: Burndown Progress part 组员 今日工作 Time ...

  7. java中的字符串简介,字符串的优化以及如何高效率的使用字符串

    简介 String最为java中最重要的数据类型.字符串是软件开发中最重要的对象之一,通常,字符串对象在内存中总是占据着最大的空间块.所以,高效处理字符串,将提高系统的整个性能. 在java语言中,S ...

  8. JDK的目录

    要想深入了解Java必须对JDK的组成, 本文对JDK6里的目录做了基本的介绍,主要还是讲解 了下JDK里的各种可执行程序或工具的用途 Java(TM) 有两个平台 JRE 运行平台,包括Java虚拟 ...

  9. 【HDU 2546】饭卡(DP+贪心)

    贪心:最贵的留到最后买.状态转移方程:dp[j]=dp[j+a[i]]|dp[j],dp[i]表示余下i元. 原来就不足5元,那就不能买啦. #include<cstdio> #inclu ...

  10. BZOJ-2875 随机数生成器 矩阵乘法快速幂+快速乘

    题目没给全,吃X了... 2875: [Noi2012]随机数生成器 Time Limit: 10 Sec Memory Limit: 512 MB Submit: 1479 Solved: 829 ...