[Xcode] Building Universal iOS Frameworks

The following post was contributed by Adam Roth, a Senior Software Architect at iApps, Australia's leading mobile software developer.
[Xcode] Building Universal iOS Frameworks
[Xcode] Building Universal iOS Frameworks
Spread the Word
Listed Under



Sunshine Coast - Queensland - Australia

Dec. 7, 2011 - PRLog -- Here’s an excellent little project for anyone that creates or works with iOS libraries:


This project provides shell script that will add a new Project Template to Xcode, one that can be used to build universal iOS frameworks.

Now this wouldn’t be a big deal (and in all rights, shouldn’t be a big deal), if not for the fact that for some unspecified and frustrating reason, Xcode has no built-in ability to create such frameworks.

This means that up until recently if you had an iOS library that you wanted to use across many projects, or that you wanted to distribute for other developers to use in their projects, you had only a few unappealing options:

- Include your source code in every project that uses your library (increased compilation  time, hooray!).

- Build two library versions, one for armv6/armv7 and one for x86.
- Screw with the linker to manually create a “fat” library.
- Use the Bundle Hack and hope that it works.

It’s worth noting here that the first three options listed above do nothing to help with the management of any shared header files needed to actually make use of the library code.

The fourth option does allow you to include public headers in your build artifact, but the setup to do so is tedious, and the entire thing is basically a giant hack besides. None of these options are really very convenient or useful from the developer’s point of view.

What developers really need, what they should have access to, and what Xcode should have supported at least since the release of iOS 4.0, is the ability to build frameworks that are “real” frameworks in the same sense that UIKit and CoreGraphics are real frameworks. And that’s exactly what the iOS-Universal-Framework utility gives you.

Just install it and you get a handy Xcode template that can be used to build universal iOS frameworks. These are real frameworks that include binaries for both x86 and armv6/armv7 in a single package, automatically bundled with your public header files. You (or anyone else) can then use the generated framework inside of other projects in the same way as any other iOS framework; just add it to your “Link With Binary Libraries” build phase, and you’re done.

All told, the iOS-Universal-Framework ooprc template is great and works exactly as advertised. Just install it and you’re good to go.

# # #

iApps, a member of the Apple Developer community, is an Australian based company specializing in the design of applications for the Apple iPad, iPhone, iPod touch and other Mobile Device technologies.

We provide software design and development services for iPhone, Mobile, Mac and the Web. And the iPad, naturally.

Our customers include individual consumers, corporate, SME's and industry clients. Our teams of innovative and experienced industry professionals combine their technical skills with their innate ability to 'think outside the square' to deliver high quality, effective and user-friendly applications.

iApps work in partnership with recognized leading industry experts to develop software that meets the needs of the business and achieve greater profits by increasing the productivity and efficiency of employees, whilst reducing costs.

Source:iApps Pty Ltd.
Email:***@iapps.net.au Email Verified
Phone:07 54776133
Tags:Building, Universal, Ios, Frameworks, Xcode, Programming, Tips, Code, Wirting, Software, Hints, Adivce, on, How
Industry:Technology, Computers, Software
Location:Sunshine Coast - Queensland - Australia
Account Phone Number Verified     Disclaimer     Report Abuse
Page Updated Last on: May 19, 2012

Like PRLog?
Click to Share