Framework Package Flocking

Datetime:2016-08-23 01:38:38          Topic:          Share

Thinking of wrapping up some of your code for the public in a framework? Here’s two nice walkthroughs of the gritty details of setting that up for both CocoaPods and Carthage :

Creating your first iOS Framework

We’re going to build a framework that exposes a function called RGBUIColor(red:green:blue) that returns a new UIColor created from those values. We’ll build it using Swift, with Carthage as our dependency manager. Our framework will be consumable using Carthage, CocoaPods, or git submodules…

Creating Cross-Platform Swift Frameworks for iOS, watchOS, and tvOS via Carthage and CocoaPods

In this post, I’d like to show you how to create a Swift framework for iOS, watchOS, and tvOS and get them distributed via Carthage and CocoaPods… Check out one of my libraries that uses this method to see how it’s set up with real code and tests: ZamzamKit

Good stuff, yep. But what if you want to support that upcoming hotness the Swift Package Manager ? Why yes, here’s a presentation that’s got that sorted too:

Creating a Swift Library walks through producing Snorlax , “The ultimate lazy library”,

Snorlax currently supports the following platforms:

  • Mac OS X
  • iOS
  • tvOS
  • watchOS
  • Linux

Using the following Package Managers:

  • CocoaPods
  • Carthage
  • Swift Package Manager
  • Adding as an Xcode Subproject

That’s veritably exhaustive , that is.

If you just can’t wait for Swift 3 to try out SPM, check out

Dependency Management with the Swift Package Manager

But something not being officially released has never stopped inquisitive developers experimenting in the past. So in this article I will introduce the SPM, show you how to install it and existing packages, and how to create your own…

And once you’ve got your SPM library ready to go, be sure to submit it to the package catalog for SPM hosted by… wait, who?

IBM Swift Package Catalog

Create, share and discover the many new libraries, modules and packages being created since Swift moved to Open Source.

The IBM Swift Package Catalog enables the Swift.org developer community to leverage and share code across projects…

Truly, these are strange times we live in, aren’t they now?

There’s also another SPM index at Swift Modules .