I am trying to install mapbox in my flutter app:
dependencies:
mapbox_gl: ^0.16.0
and I have been following the guidelines from https://docs.mapbox.com/ios/maps/guides/install/ and https://pub.dev/packages/mapbox_gl#secret-mapbox-access-token to start using it in iOs xcode simulator.
When flutter automatically runs pod install, it comes up with the error
Error output from CocoaPods: ↳ % Total % Received % Xferd
Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed 0 39 0 0
0 0 0 0 --:--:-- --:--:-- --:--:-- 0 curl:
(22) The requested URL returned error: 401
My .netrc is located in ~/ directory.
~/.netrc reads as follows:
machine api.mapbox.com
login mapbox
password sk.xxxxxxx.....xxxxxx
and the secret token does have the Download:read scope
Am I missing something?
I have tried running flutter in macos directly and it works perfectly,I have tried to install mapbox.gl packages from xcode project also and it works, but when I run flutter it tries to install them via pod eitherway and it comes up with the same error.
Related
I am trying to install Mapbox iOS SDK using CocoaPod. I have already created the .netrc in the Home directory as suggested:
machine api.mapbox.com
login <my login account>
password <my secret key>
Below are my Pod file
use_frameworks!
target 'MyApp' do
pod 'Mapbox-iOS-SDK', '~> 6.2.1'
end
Below are messages after running 'Pod Update' and 'Pod Install'
Analyzing dependencies
Downloading dependencies
Installing Mapbox-iOS-SDK 6.2.2 (was 6.2.0)
[!] Error installing Mapbox-iOS-SDK
[!] /usr/bin/curl -f -L -o /var/folders/54/rt4ptnd94_j8x3s3_nxn1gfc0000gn/T/d20201108-21218-qopblk/file.zip https://api.mapbox.com/downloads/v2/mobile-maps/releases/ios/packages/6.2.2/mapbox-ios-sdk-dynamic.zip --create-dirs --netrc-optional --retry 2 -A 'CocoaPods/1.10.0 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
To resolve this issue you have to add .netrc in root directory of your Mac not of the project
And follow this example:
machine api.mapbox.com
login mapbox
password your_password
You need to enable the Downloads:Read permission for your secret token.
Configure credentials
From the token creation page, give your token a name and make sure the
box next to the Downloads:Read scope is checked.
This error is occurring due to the improper configuration of public and private key.
you have to do exactly as mentioned in the official documentation (for keys configuration only , if using Flutter )-
https://docs.mapbox.com/ios/maps/guides/install/
You can refer to this video
https://www.youtube.com/watch?v=oFDx6tLipmw&t=441s
I'm trying to install DJI-SDK-iOS 4.7 using cocoapods. When I use pod install it shows me this error:
Analyzing dependencies
Downloading dependencies
Installing DJI-SDK-iOS (4.7)
[!] Error installing DJI-SDK-iOS
[!] /usr/bin/curl -f -L -o /var/folders/0b/h5r2v83j12z2n4zymy15m0qc0000gn/T/d20181213-7776-15u9wjf/file.zip http://dh7g4ai1w5iq6.cloudfront.net/ios_sdk/iOS_Mobile_SDK_4.7_180823.zip --create-dirs --netrc-optional --retry 2
% 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: 403 Forbidden
[!] 'DJI-SDK-iOS' uses the unencrypted http protocol to transfer the Pod. Please be sure you're in a safe network with only trusted hosts in there. Please reach out to the library author to notify them of this security issue.
I've tried pod install --repo-update but shows me exactly the same error...
Please use the latest DJI iOS SDK 4.8.1, 4.7 is old and has been removed from Cocoapods.
https://cocoapods.org/pods/DJI-SDK-iOS
I need to add firebase in a react native project
I init pod in iOS project and edit pod like below:
platform :ios, '8.0'
target 'ProjectName****' do
pod 'Firebase/Core'
end
after that I run pod install, so the result like below:
Analyzing dependencies
Downloading dependencies
Installing Firebase (4.13.0)
[!] Error installing Firebase [!] /usr/bin/curl -f -L -o /var/folders/8y/24chrcxx1jb20tf7knths56c0000gn/T/d20180505-5700-19mr5c1/file.tgz https://dl.google.com/dl/cpdc/b64ddeea923b5ab5/Firebase-4.13.0.tar.gz --create-dirs --netrc-optional
% 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: 404**
I can not find any solution for this problem. please help me
Not too sure what's going on there; here are a few suggestions:
Run pod update
Try a higher iOS version, I believe cocoapods 1.4+ only supports iOS 9.3
Remove your Pods folder and Podfile.lock and try pod install again
I am trying to get the demo project provided by Google for Places API using the command pod try GooglePlaces and pod try GooglePlacePicker, but this always fails after few minutes with an error as stated below:
Rohans-MacBook-Pro:~ rohan$ pod try GooglePlaces
Updating spec repositories
CocoaPods 1.2.0.beta.1 is available.
To update use: `sudo gem install cocoapods --pre`
[!] This is a test version we'd love you to try.
For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.2.0.beta.1
Trying GooglePlaces
[!] /usr/bin/curl -f -L -o /private/var/folders/33/srwyncb13253t9jw7j73v33r0000gn/T/CocoaPods/Try/GooglePlaces/file.tgz https://dl.google.com/dl/cpdc/98bcd61eb763c4a4/GooglePlaces-2.1.1.tar.gz --create-dirs --netrc-optional
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:03:11 --:--:-- 0
curl: (56) SSLRead() return error -9806
Can someone please help me with figuring out what is going wrong?
Note: pod install, pod update, pod setup these commands run properly without any error. I am on macOS Sierra, Xcode 8.1, Cocoapods 1.1.1
Hi i am new for ios and in my i am trying to install "OpenWebRTC" pod files like below formate and when i trying to install them i am getting below errors please help me
platform :ios, '9.0'
target 'videoCallApp' do
pod 'OpenWebRTC', '~> 0.1'
pod 'OpenWebRTC-SDK', :git => 'https://github.com/EricssonResearch/openwebrtc-ios-sdk.git'
end
error:-
Analyzing dependencies
Pre-downloading: `OpenWebRTC-SDK` from `https://github.com/EricssonResearch/openwebrtc-ios-sdk.git`
Downloading dependencies
Installing OpenWebRTC (0.3.1)
[!] Error installing OpenWebRTC
[!] /usr/bin/curl -f -L -o /var/folders/7y/xc2v__vx44n0t1d875wv3zbh0000gn/T/d20160611-17948-zbondp/file.zip http://static.verkstad.net/OpenWebRTC_0.3.1.zip --create-dirs --netrc
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (52) Empty reply from server
I had this issue and sorted it by using the following suggestion from here
Try running rm -rf Pods/ Podfile.lock and then re-run pod install.
Once I did this it worked perfectly. Hope this helps.