作者whitefur (白毛)
看板MacDev
标题Re: [问题] ios存图片到ipad中
时间Mon Jun 9 23:10:08 2014
可以参考一下介绍file system的官方文件
https://developer.apple.com/library/ios/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/FileSystemOverview/FileSystemOverview.html#//apple_ref/doc/uid/TP40010672-CH2-SW28
上面有写各个资料夹是用来放什麽东西的
像是你存图片的话
可以存在这两个地方
<Application_Home>/Documents/
(NSDocumentDirectory)
Use this directory to store critical user documents and app data files. Critical data is any data that cannot be recreated by your app, such as user-generated content.
The contents of this directory can be made available to the user through file sharing. The contents of this directory are backed up by iTunes.
<Application_Home>/Library/Application Support
(NSApplicationSupportDirectory)
Use this directory to store all app data files except those associated with the user’s documents. For example, you might use this directory to store app-created data files, configuration files, templates, or other fixed or modifiable resources that are managed by the app. An app might use this directory to store a modifiable copy of resources contained initially in the app’s bundle. A game might use this directory to store new levels purchased by the user and downloaded from a server.
All content in this directory should be placed in a custom subdirectory whose name is that of your app’s bundle identifier or your company.
In iOS, the contents of this directory are backed up by iTunes.
其实也不限定要存在哪
最主要的差别就是会不会被备份
To prevent the syncing and backup processes on iOS devices from taking a long
time, be selective about where you place files inside your app’s home
directory.
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 111.240.160.91
※ 文章网址: http://webptt.com/cn.aspx?n=bbs/MacDev/M.1402326612.A.ABD.html
※ 编辑: whitefur (111.240.160.91), 06/09/2014 23:12:07
1F:推 gagalucia:曾经因为档案存错位置 review 被 rejected.. QQ 06/10 07:09
2F:→ issuemylove:谢谢大大的帮助!QQ 06/10 10:35
※ 编辑: whitefur (111.243.96.93), 06/10/2014 14:46:20
3F:推 issuemylove:想请问一下,备份指的是删除後安装档案还在吗? 谢谢 06/10 16:29
4F:→ whitefur:不是。是user用iCloud备份 06/10 17:41