Graphics Programs Reference
In-Depth Information
This directory is where you write data that you will use temporarily during an
application's runtime. You should remove files from this directory when done
with them, and the operating system may purge them while your application is
not running. It does not get backed up when the device is synchronized with
iTunes or iCloud. To get the path to the tmp directory in the application sand-
box, you can use the convenience function NSTemporaryDirectory .
Documents/
This directory is where you write data that the application generates during
runtime and that you want to persist between runs of the application. It is
backed up when the device is synchronized with iTunes or iCloud. If something
goes wrong with the device, files in this directory can be restored from iTunes
or iCloud. For example, in a game application, the saved game files would be
stored here.
Library/Caches/
This directory is where you write data that the application generates during
runtime and that you want to persist between runs of the application. However,
unlike the Documents directory, it does not get backed up when the device is
synchronized with iTunes or iCloud. A major reason for not backing up cached
data is that the data can be very large and extend the time it takes to synchronize
your device. Data stored somewhere else - like a web server - can be placed in
this directory. If the user needs to restore the device, this data can be down-
loaded from the web server again.
Constructing a file path
The BNRItem s from Homepwner will be saved to a single file in the Documents dir-
ectory. The BNRItemStore will handle writing to and reading from that file. To do this,
the BNRItemStore needs to construct a path to this file.
Open BNRItemStore.h and declare a new method.
- (NSString *)itemArchivePath;
Implement this method in BNRItemStore.m .
- (NSString *)itemArchivePath
Search WWH ::




Custom Search