December 2018
Intermediate to advanced
414 pages
10h 19m
English
As mentioned, SPM currently only supports creating libraries and command-line executables. So you will not be able to write your next macOS app entirely using SPM – you will still need Xcode. Yet, SPM can be extremely useful in collaboration with Xcode as a tool to manage your dependencies and keep them up to date. Indeed, SPM is able to generate an Xcode project containing all the targets and dependencies you specified in Package.swift, which you can include within your macOS app Xcode project or workspace. Let's look at this in more detail.
If you want to create an Xcode project with the same definition of your SPM package, just run swift package generate-xcodeproj, which will output the following information:
$ swift ...
Read now
Unlock full access