BT

CocoaPods Adds Support for Swift and iOS 8 Frameworks

| by Sergio De Simone Follow 17 Followers on Jan 13, 2015. Estimated reading time: 1 minute |

CocoaPods 0.36-beta has recently been released, providing support for iOS 8 frameworks and libraries written in the Swift language, writes Marius Rackwitz (@mrackwitz), CocoaPods core team member. This release allows pod maintainers to ensure compatibility of existing pods, while also enabling the creation of new pods for Swift libraries.

With the changes in version 0.36, CocoaPods will now to able to support popular Swift libraries such as AlamoFire, SwiftyJSON, and a growing list of others, which could only be either added manually to a project or managed through a git submodule. In addition to this, while keeping its general philosophy of generating a workspace including the user projects and a Pods project, CocoaPods will now produce a dynamic framework containing all the pods, instead of a static library.

Dynamic frameworks, though commonly available on OS X, have only become available on iOS starting with iOS 8, and the lack of support for them has often been criticized by iOS developers. Among the advantages that they bring is better encapsulation of multi-platform code thanks to “fat” binaries, resource bundling, and better handling of dependent libraries. Furthermore, frameworks are easier to add to an Xcode project since they will automatically take care of header file paths. The fact that resources will be bundled inside of the pod framework means that there will be no conflicts between resources having the same name. This will require particular care to reference the correct bundle when using a resource, though.

The number of available Pods for libraries written in the Swift language is still reduced, but an example of how to create a pod file to support a Swift dependency is provided by the Quick testing framework.

CocoaPods is an application-level dependency manager that provides a standard format for managing external libraries and their dependencies. CocoaPods has been largely successful as an alternative to the use of git submodules or manual source file inclusion to add a third-party library to a project and topped 1 million downloads last December.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT