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.

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

Requirements

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.

Motivation

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 read 3c0e607615 iOS Developer Blog
Btn subscribe 930758687e Subscribe: Email · Twitter
Btn training bbbdf557d2 Next iOS training: 19. - 23. November 2018, Hamburg
Btn about 5378472193 About me · Contact