Dependency Management for iOS projects with the Swift package manager

iOS is not yet supported by the Swift Package Manager but there is a way to make it work. 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. It utilizes the Xcodeproj library from the Cocoapods tooling to make the Xcode projects generated by the Swift Package Manager work for iOS.

Last update: July 16, 2018 | Tested with: Xcode 9.4 and Xcode 10 Beta 3


This is experimental / for exploration only. It is not for use in actual projects unless you’re willing to deal with Xcode build errors and projects settings. Even if it works well now, it might break with new Xcode releases.


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

Btn training bbbdf557d2 Next iOS training: 10. - 14. September 2018, München
Btn read 3c0e607615 Read on: iOS developer blog
Btn subscribe 930758687e Subscribe: Email · Twitter
Btn share 3139847d21 Share: Email · Twitter
Btn support 789320554c Support the iOS developer blog - Become a patron
Btn about 5378472193 About me
Btn email 4d2439fc5b Email to Ralf Ebert «»