16. July 2018

Dependency Management for iOS projects with the Swift package manager

iOS is not yet supported by the Swift Package Manager. This article describes how to set up a framework project and how to use it as a dependency of an iOS app project with the Swift Package Manager by utilizing the Xcodeproj library from CocoaPods to make the Xcode projects generated by the Swift Package Manager work for iOS.

Xcode Tested with Xcode 10 Beta 3


This is a tutorial for advanced iOS developers. It requires practical Swift programming skills and good knowledge about iOS development. You need to know your way around the shell and about versioning software projects with Git. Please be aware that iOS is not officially supported by the Swift Package Manager and the described approach is experimental and for learning purposes only.


Creating a HelloKit package

Creating the HelloApp iOS project

Updating the generated Xcode projects - Common Tasks

You can use the Rakefiles to update the generated Xcode projects. Here is example code for some common tasks:

More information

iOS Training Schulung Workshop
Nächste iOS-Schulung:
24. – 28. Juni 2019
Frankfurt am Main
iOS Buch
iOS 12-Apps entwickeln mit Swift & Xcode 10