File Data Storage

Like most other operating systems, iOS enables saving data in files, either in regular text files or by archiving (what’s known as serialization in Java and C#). The techniques for working with files are similar to many other programming languages, but it’s worth noting that on iOS, apps are sandboxed, which means that each app is isolated from the other apps and from the operating system. One of the consequences is that each app has only a very simple file system that by default consists of a few standard directories: Documents, Library, and tmp. As a developer, you can store files in the Documents and tmp directories. The Documents folder is backed up when the device is backed up. The tmp folder is not. By storing data in ...

Get Learning Mobile App Development: A Hands-on Guide to Building Apps with iOS and Android now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.