Bryan Downing Bryan Downing - 20 days ago 10
iOS Question

Build Swift 3 in Terminal to create XCode project

It seems Apple changed this line:

swift build -X


This no longer works to create an Xcode project as described here

Doest anyone know the updated way to do this as I cannot find it online
Thanks

Answer

Now you should use the Swift Package Manager.

To create a project structure:

swift package init --type executable

or

swift package init --type library

To make a project compatible with Xcode:

swift package generate-xcodeproj