swiftxcodeswift-package-managerswift-package

Swift Packages say missing but are all listed - opening project on new MacBook


I opened my project for the first time on my new MacBook and it won't run. I am getting a bunch of errors about my packages. Github is signed in, derived data deleted, restarted, build cleaned, and package caches cleaned and resolved. Still not working.

enter image description here


Solution

  • The errors at the top tell you what's wrong:

    Failed downloading https://api.mapbox.com/...

    The errors below are secondary issues that come up later. The main issue however is that you can't download the Mapbox SDK and SPM then can't resolve the package graph.

    Looking at the documentation from Mapbox, I guess you haven't added the Mapbox access token to the credentials in Xcode on your new machine. (https://docs.mapbox.com/ios/maps/guides/install/)