2011年9月23日 星期五

App Local Database

3 main directory in application:
- resourceDirectory : files placed in here are not allowed to be removed. It contains resources come with the app itself. like images.
- applicationDirectory
- applicationDataDirectory : db file can be placed here. file inside this directory will be backed up in iTunes Backup. If run on iOS Simulator, applicationDataDirectory is equivalent to /Users/etp_user/Library/Application Support/iPhone Simulator/5.0/Applications/366BF08F-997A-491C-96F4-DEAF2E49BA4F/Documents

Suggested by Apple, data that can be re-download from server should be placed in caches folder instead of Documents since iOS 5 launched.
i.e. applicationDataDirectory/../Library/Caches/

reference: http://wiki.appcelerator.org/display/guides/Working+with+Local+Data#WorkingwithLocalData-Prepopulatingadatabase

沒有留言:

張貼留言