Chapter 4. Leveraging the Foundation Framework in Your App

In This Chapter

  • Seeing what the Foundation framework has to offer

  • Working with mutable arrays

  • Using each object in an array in a message

  • Getting to know C arrays

  • Creating and using property lists

  • Discovering how dictionaries work

  • Updating dictionaries and property lists

In The Foundation Trilogy, an epic science fiction series, Isaac Asimov and his editor John W. Campbell devised the concept of mathematical sociology (analogous to mathematical physics), in which the law of mass action can predict the future, but only on a large scale; it is error-prone on a small scale.

The Foundation framework has nothing to do with that, except that it too was devised to predict the future — what your app and many other apps may want to do — and it works on a large scale while remaining error-prone on a small scale (in the hands of inexperienced programmers). It provides a set of useful object classes in primitive form ready for you to flesh out, and introduces several paradigms that define functionality not covered by the Objective-C language. Think of it as providing the plumbing features such as data storage, text and strings, dates and times, object creation, disposal persistence, and common Internet protocols.

The Foundation framework is designed with these goals in mind:

  • Provide a small set of basic utility classes.

  • Make software development easier by introducing consistent conventions for things such as de-allocation.

  • Support Unicode strings, ...

Get iPhone® Application Development All-In-One For Dummies® 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.