Configure private token for Swift Package Manager
mainTo install the SDK via Swift Package Manager, you must first configure a private access token with the DOWNLOADS:READ scope. This token is used by the package manager to download the SDK and is not your production API token.
Warning: Do not insert this private token into any Info.plist file.
- Create or edit a
.netrcfile in your home directory. - Add the following configuration to the file, replacing
PRIVATE_MAPBOX_API_TOKENwith your token that has theDOWNLOADS:READscope:
machine api.mapbox.com
login mapbox
password PRIVATE_MAPBOX_API_TOKEN