Understanding Frameworks

In outline, a framework is a collection of objects, functions, and other code that adds optional features to your app.

There are two kinds of frameworks:

bullet_2c.tif iOS frameworks. These are created and updated by Apple. They’re included in the iOS “kit of parts.”

bullet_2c.tif Third-party frameworks. These are created and updated by other developers or groups of developers. They’re available online, but you have to search for them.

Understanding iOS frameworks

Although iOS is a kit of parts, you don’t necessarily want to include every possible part in your app. If you did, your app would be huge and full of unused code, and it would take a very long time to build.

To keep your app lean and trim, related features are grouped into code libraries called frameworks. When you want to add a feature—video, audio, map tracking, web display, and so on—to your app, you select the relevant framework from the documentation and add it manually to your project. When you build your app, the finished file includes only the features you use in the frameworks you add.

note_2c.eps

Small size isn’t quite as valued today as it was in earlier versions of iOS. The current version of Garageband arrives as an 800MB ...

Get iOS App Development Portable Genius 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.