UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

Project 16 / Xcode / problem adding Swift Package

Forums > 100 Days of SwiftUI

In Xcode 13 beta 1, they've moved how you access 3rd party Swift Packages: File menu -> Add Packages...

However, when I attempt to "+" to add a collection, and enter https://github.com/twostraws/CodeScanner into the dialog box, I get the following error:

The operation couldn't be completed. (PackageCollections.JSONPackageCollectionProviderError error 3.)

OK, so I downloaded the git repository, and attempted to "Add Local..." - but after I select the folder containing the package I am returned to the Project -> Swift Packages tab with NO new packages added.

I'm guessing this is a Xcode beta 1 issue - but it does appear as if the tutorial will need to be updated to reflect Apple's new way of accessing Packages.

3      

I have added it with no problem

  1. File Menu > Add Packages…
  2. Then in the "Search or Enter Package URL" add https://github.com/twostraws/CodeScanner
  3. Then Add Package
  4. Then click the package product and Add Package

Its a good idea to do a Build (cmd+B) then should be able to import CodeScanner and then use it.

Did this on Xcode 13 beta 1

3      

Download the file, add by yourself.

3      

TAKE YOUR SKILLS TO THE NEXT LEVEL If you like Hacking with Swift, you'll love Hacking with Swift+ – it's my premium service where you can learn advanced Swift and SwiftUI, functional programming, algorithms, and more. Plus it comes with stacks of benefits, including monthly live streams, downloadable projects, a 20% discount on all books, and free gifts!

Find out more

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.