Re: [问题] ios存图片到ipad中

楼主: whitefur (白毛)   2014-06-09 23:10:08
可以参考一下介绍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.
作者: gagalucia (这个嘛..)   2014-06-10 07:09:00
曾经因为档案存错位置 review 被 rejected.. QQ
作者: issuemylove (NotLove)   2014-06-10 10:35:00
谢谢大大的帮助!QQ
楼主: whitefur (白毛)   2014-06-10 17:41:00
不是。是user用iCloud备份

Links booklink

Contact Us: admin [ a t ] ucptt.com