How do I use Swift Package Manager with an existing macOS project?

后端 未结 4 1807
北海茫月
北海茫月 2021-01-03 20:30

I\'ve been using Cocoapods to manage dependencies for my Swift project. I came across this package which is not listed at Cocoapods. Instead it suggests using Swift Package

4条回答
  •  北海茫月
    2021-01-03 20:41

    Update for XCode 11

    This is A LOT easier now with XCode 11. As of this writing the current version of XCode is 11.3.1.

    For an existing XCode project simply:

    1. go to File->Swift Packages->Add Package Dependency...
    2. enter the URL of the hosted package you want to add
    3. choose the rules about which versions your app will use
    4. click Finish

提交回复
热议问题