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

SUMMARY

This chapter demonstrated how to write a file to the file system of the iPhone and how to read it back. In addition, you saw how structured data can be represented using a property list and how you can programmatically work with a property list using a dictionary object. The next chapter shows you how to use databases to store more complex data.

EXERCISES

  1. Describe the uses of the various subfolders contained within an application's folder.
  2. What is the difference between the NSDictionary and NSMutableDictionary classes?
  3. Name the paths of the Documents and tmp folders on a real device.
  4. Name the class that provides in-app support for exporting documents from your application.
  5. What key should be set in order to allow file sharing support for your application?
  6. What key is used to register a new file type with iOS to inform it that your application is capable of handling it?

Answers to the exercises can be found in Appendix D.

imageWHAT YOU LEARNED IN THIS CHAPTER

TOPIC KEY CONCEPTS
Subdirectories in each of the applications folders Documents, Library, and tmp
Getting the path of the Documents folder
NSArray *paths =
NSSearchPathForDirectoriesInDomains(
  NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDir = [paths objectAtIndex:0];
Getting the path of the tmp directory
-(NSString *) tempPath{
return NSTemporaryDirectory();
}
Checking whether a file ...
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