Building Swift Static Libraries

updated 10 months ago; latest suggestion 10 months ago

This proposal has been withdrawn...

We all love Swift. But until Xcode 9, using Swift libraries meant using dynamic frameworks. For many reasons, some apps are unwilling (or unable) to use dynamic frameworks, which meant pulling in Swift dependencies had been impossible. Now, however, it's possible to build Swift code into static libraries, and even CocoaPods has support for that feature. We'll take a quick tour through all the steps necessary to package Swift code into a static library, some of the gotchas involved in importing static Swift libraries, and a few of ways these changes to the build process can improve the use of Objective-C libraries.

Suggestions

  • The proposal author responds 10 months ago

    How can I distribute these Swift static libraries with CocoaPods?

    You can't quite yet, unless you use this branch ;) https://github.com/CocoaPods/CocoaPods/pull/6966

  • 48c3f3f85559b5d327d96f8b4a506d4a46d45bd5?size=100x100 48c3f3f85559b5d327d96f8b4a506d4a46d45bd5 suggests 10 months ago

    How can I distribute these Swift static libraries with CocoaPods?