I'am facing following issue while installing pod.
[!] Error installing Mapbox-iOS-SDK [!] /usr/bin/curl -f -L -o /var/folders/qn/l5lqh07s5sscfzbm1tklmzgr0000gn/T/d20200915-46243-1aqah9u/file.zip https://api.mapbox.com/downloads/v2/mobile-maps/releases/ios/packages/6.1.0/mapbox-ios-sdk-dynamic.zip --create-dirs --netrc-optional --retry 2 -A 'CocoaPods/1.9.3 cocoapods-downloader/1.4.0'
% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 curl: (22) The requested URL returned error: 401 Unauthorized
I have added .netrc file in in home directory still facing issue.
Pod Error 1
Since Mapbox 6.x you have to indicate credential to retrieve latest available pod version: https://docs.mapbox.com/ios/maps/overview/#configure-credentials
You can add credential before pod install / pod update process and remove it after with this macos script for example:
echo "Generate credential for mapbox"
echo "machine api.mapbox.com" > ~/.netrc
echo "login mapbox" >> ~/.netrc
echo "password <INSERT API TOKEN>" >> ~/.netrc
To delete this entry later :
sed -i '' -e '/^machine api.mapbox.com$/{N;N;d;}' ~/.netrc
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With