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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.