Wongzigii Wongzigii - 6 months ago 25
Swift Question

How to install Swift package via package manager?

I am currently following the document from swift.org to play around with the new Swift Package Manager.

I cloned the demo project from Github and run the following command from terminal.

git clone https://github.com/apple/example-package-dealer.git
cd example-package-dealer
swift build
.build/debug/Dealer


While I run
swift build
, error rise.

<unknown>:0: error: no such file or directory: 'build'


Any idea?

Answer

I stuck for an hour. Sadly, it's just an epic fail that downloading the wrong swift package. If you want to use swift build, MAKE SURE you download the development version.