Skip to Content
Beginning iOS 5 Application Development
book

Beginning iOS 5 Application Development

by Wei-Meng Lee
January 2012
Beginner content levelBeginner
655 pages
16h 35m
English
Wrox
Content preview from Beginning iOS 5 Application Development

10

File Handling

WHAT YOU WILL LEARN IN THIS CHAPTER

  • Where your applications are stored in iOS 5
  • The various folders within your Applications folder
  • How to read and write to files in the Documents and tmp folders
  • How to use a property to store structured data
  • How to programmatically retrieve values stored in a property list
  • How to modify the values retrieved from a property list and save the changes to a file
  • How to copy bundled resources to the application's folder during runtime
  • How to export a document from your application to another application
  • How to share your application's Documents folder through iTunes
  • How to allow other applications to import documents into your application

All the applications you have developed up to this point are pretty straightforward — the application starts, performs something interesting, and ends. In Chapter 9, you saw how you can make use of the Application settings feature to save the preferences of your application to a central location managed by the Settings application. Sometimes, however, you simply need to save some data to your application's folder for use later. For example, rather than keep files you download from a remote server in memory, a more effective and memory-efficient method is to save them in a file so that you can use them later (even after the application has shut down and restarted).

This chapter describes the two available approaches to persisting data in your application so that you can access it later: saving the ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering iOS 12 Programming - Third Edition

Mastering iOS 12 Programming - Third Edition

Donny Wals
What Successful Project Managers Do

What Successful Project Managers Do

W. Scott Cameron, Jeffrey S. Russell, Edward J. Hoffman, Alexander Laufer

Publisher Resources

ISBN: 9781118144251Purchase book