Reputation: 55
I'm setting up a new pod in my pod file and when I do pod install I have an error what should I doing ?
I tried this line to add the pod in my podfile :
pod 'MapboxVisionNativeAll', :podspec => 'https://api.mapbox.com/downloads/v1/vision/ios/mapbox-vision-native-all/0.3.0.podspec?access_token='
this the error
[!] Failed to fetch podspec for MapboxVisionNativeAll
at https://api.mapbox.com/downloads/v1/vision/ios/mapbox-vision-native-all/0.3.0.podspec?access_token=<sk.eyJ1IjoiYnJhaGltY2hlYmJpIiwiYSI6ImNqdXlhMXl6aDBmeXo0M3BpYjV6MnFib3IifQ.VinI6ER1YN2nDxXRJzaFXw>
.
Error: 401 Unauthorized
Upvotes: 2
Views: 4366
Reputation: 1
In terminal:
machine api.mapbox.com
login mapbox
password <INSERT SecretKey>
Note To use your secret token, you will need to store it in a .netrc file in your HOME directory (not your project folder) - https://docs.mapbox.com/ios/maps/guides/install/ (Configure your secret token)*
Upvotes: 0
Reputation: 111
=> I guess, You are misplacing your .netrc. => The .netrc file should be in your home directory (~ on the command line, or use Go ‣ Home in Finder).
machine api.mapbox.com
login mapbox
password <INSERT SecretKey>
Upvotes: 11
Reputation: 147
This error occurs if the token is invalid.
I tried accessing the link from the error and it says that the token is invalid.
Upvotes: 0
Reputation: 12198
Following is my working Podfile
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '11.2'
use_frameworks!
target 'PROJECT_NAME' do
pod 'MapboxVisionNativeAll', :podspec => 'https://api.mapbox.com/downloads/v1/vision/ios/mapbox-vision-native-all/0.3.0.podspec?access_token=sk.eyJ1IjoiZWRkeXZlcmJydWdnZW4iLCJhIjoiY2p1c3F5eGVpMDA1eTRlbzJpOXJwdDIxMCJ9.OZRITqde9clot1E8Za_OsQ'
end
Upvotes: 0