'Error: mapbox-maps-ios could not be resolved
I am trying to follow MapBox iOS SDK on my project through Swift package Manager dependency. Facing issue in setup.
Followed MapBox Guidelines : https://docs.mapbox.com/ios/maps/guides/install/
Error: mapbox-maps-ios could not be resolved
Steps already tried:
- Cleaned up Derived data.
- Also tried to setup with new sample app, no luck for me.
Solution 1:[1]
I had the exact same issue. Please do the following to solve it:
Open your Terminal and enter:
- cd
- touch .netrc
- open .netrc
Paste the following and ONLY replace PRIVATE_MAPBOX_API_TOKEN with your secrete Mapbox Api Token:
machine api.mapbox.com
login mapbox
password PRIVATE_MAPBOX_API_TOKEN
It now should look something like this. It is crucial that you do not include the "<>":
machine api.mapbox.com
login mapbox
password sk.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Now give it another try :-)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 |