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