I am getting this error when I try to pod repo update and pod install
CDN: trunk URL couldn't be downloaded:
https://cdn.cocoapods.org/deprecated_podspecs.txt, error: Failed to
open TCP connection to cdn.cocoapods.org:443 (No route to host -
connect(2) for "cdn.cocoapods.org" port 443)
Does somebody know how to fix this problem?
I got it working by using below commands:
pod repo remove trunk
and then
pod install or pod update
It seems that it's a cdn problem because when i use proxy the link https://cdn.cocoapods.org/all_pods_versions_e_2_1.txt is opened and when not it return error.
What i did:
gem uninstall cocoapods
gem cleanup
rvm osx-ssl-certs update all
That didn't help.
Then i went to Chrome and opened https://cdn.cocoapods.org/all_pods_versions_e_2_1.txt it was an error. Then i cleared cache but it didn't help. After switching to proxy and returning back it started to work.
Resume: Turn on and switch off the VPN.
Also try to pod cache clean --all and pod setup by #NightWatcher
Step one. Remove trunk & master
pod repo remove trunk
pod repo remove master
Step two. Add source in podfile.
source 'https://github.com/CocoaPods/Specs.git'
source 'https://cdn.cocoapods.org/'
Step three. Run pod update. Solve my problem.
pod update --verbose
I fixed it by this solution
Add this to your Podfile:
source 'https://cdn.cocoapods.org/'
Afterwards, run the following command to remove it from your managed repo list (in console):
pod repo remove master
Cheers!
Just try this in your terminal:
sudo gem install cocoapods
I spend hours by uninstalling and reinstalling pods, Connecting and disconnecting wifi, and trying out different solutions I could find from the internet. And nothing worked. Finally I decided to restart my Macbook and the problem solved. So before trying the solutions given above, I would strongly recommend you to try restarting your system.
After checking all the answers and using VPN just to update pods, I've tried:
pod repo remove trunk
pod repo remove master
sudo rm -rf ~/.cocoapods/repos
pod update
I'm not specifying this BTW:
source 'https://cdn.cocoapods.org/'
And all worked.
Based on this github comment: whenever cocoapods CDN not working due to DNS issues, try adding directly the url that cdn.cocoapods.org redirects to, as a source in the top level of your Podfile:
source 'https://cocoapods-cdn.netlify.app/'
Remove Podfile.lock and try re-installing the Pods again (pod install). This worked for me.
For those, who faced with the following:
[!] CDN: trunk Repo update failed - 1 error(s):
CDN: trunk URL couldn't be downloaded: https://...podspec.json Response: 429 429: Too Many Requests
You should remove Podfile.lock, Pod folder and reconnect to your VPN (if any) then run
pod install --repo-update
On all of those comments; nothing worked for me
So i found this and it worked perfectly for me :
pod cache clean --all
pod setup
I had the same issue. I followed below steps and it works.
I suggest to restart the system before following below instructions.
Delete Podfile.lock
add source 'https://github.com/CocoaPods/Specs.git' line in Podfile
Then run below commands
pod repo remove trunk
sudo gem install cocoapods-deintegrate cocoapods-clean
pod deintegrate
pod cache clean --all
sudo gem uninstall cocoapods
sudo gem install cocoapods
pod install or pod update
Tried many solutions from here and there but what worked in my case is:
gem uninstall cocoapods
gem cleanup
sudo gem install cocoapods -n /usr/local/bin
Hope it works for you!
Several of these solutions didn't work for me but it was successful with updating the pods once I disconnected from AnyConnect VPN.
i have tried all above options but nothing fixed my issue. i just switched my internet connection to other service provider and then try pod install and trunk url issue was no more there. so try to switch internet connection if facing trunk url issue.
Faced the same issue and tried all the answers suggested above. But, the real issue seemed to be with not being able to access the Git repo for Cocoapods:
‘error: cannot open .git/FETCH_HEAD: Permission denied’
Executing sudo chown -R $USER: .
at
/Users/user_name/.cocoapods/repos/cocoapods
fixed the issue
it's up to proxy servise you've to do is all
first open up your proxy and set it up into your country or turn it off temporarely and
clean your xcode build folder and
try again pod install ro pod update
I hope that'll work
Related
After running pod update I am getting this error, I can only think of internet issue but my internet seems working fine. And another thing I noticed it is not happening every time, sometimes it just work fine with the same Pod file and some time result into mentioned error.
fatal: unable to access 'https://github.com/CocoaPods/Specs.git/': transfer closed with outstanding read data remaining
[!] CocoaPods was not able to update the `master` repo. If this is an unexpected issue and persists you can inspect it running `pod repo update --verbose`
its mean the latest pod not updated yet on git , wait 2 or 3 days it will work until you can add .framework file in your project or can use one down version of pod like latest pod is 10.2 so you can use 10.1
Repo updated but git not update. Check this link click.
Reinstalling CocoaPods:
sudo gem install cocoapods
Once it will be finished then write below command:
pod install
If pods were already installed. Otherwise, you will have to update all of them with
pod update
open your terminal go to your project i.e cd your_project_path hit enter and then run this command
pod repo update --verbose
hope this will resolve your issue
for more info check this link it might help you
I modified a repo on Github to integrate a swift version of my library.
https://github.com/iDevelopper/PBRevealViewController
However when in a new project I try to pod install I get the error:
[!] Unable to satisfy the following requirements:
PBRevealViewController/Swift (= 1.2.3) required by Podfile
None of your spec sources contain a spec satisfying the dependency: PBRevealViewController/Swift (= 1.2.3).
You have either:
* out-of-date source repos which you can update with pod repo update or with pod install --repo-update.
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
Note: as of CocoaPods 1.0, pod repo update does not happen on pod install by default.
Some helps are welcome!
Please see the Cocoapods issue:
https://github.com/CocoaPods/CocoaPods/issues/6970#event-1213956994
If you're using Macbook with M1(apple silicon)
Inside your ios Folder follow these commands in terminal
sudo arch -x86_64 gem install ffi
arch -x86_64 pod install
If this still don't fix your issue then run
arch -x86_64 pod install --repo-update
I am not familiar this, but I also faced the same issue I followed the few steps
delete your podfile and regenerate your pod file once again use the following steps,
pod repo remove master
pod setup
pod install
You can try to delete Podfile.lock And then run pod update
I have been struggling with a similar issue for days now and it turned out that the pod that I was trying to include as a dependency is not a valid Repo for CocoaPods I mean the repo is a correct GitHub repo but the problem with it is that it only has a podspec in the root of the project and is missing the CocoaPods specs repo structure.
If you read the CocoaPods official guide it might not become obvious what they mean but once I started looking through a specs repo it just clicked.
If you check the example they have given then you will see that you need a different GitHub repo separate from your pod's repo with all the podspecs listed in it. Have a look at their example repo Artsy
You can see what I mean.
What I had as a misconception was adding the source of the single pod at the top of my Podfile, but rather it would have to be the source of a whole specs repo which has to be created separately as I mentioned above otherwise pod install won't be able to find the subspecs as the repo is incorrect.
After the explanation and looking into the Artsy repo I mentioned above I hope that re-reading the CocoaPods doc will make much more sense as it did to me :)
I hope this helps.
I try to give an example of how the Podfile should look like with the correct source:
# The source below won't work if you integrate it as a dependency
source 'https://github.com/iDevelopper/PBRevealViewController.git'
# Instead create a new specs repo as per the info above and include that
# Similar to the one you already have here
source 'https://github.com/iDevelopper/RWPodSpecs.git'
#use_frameworks!
platform :ios, '9.0'
workspace 'PBRevealViewController.xcworkspace'
target 'PBRevealViewController_Example' do
pod 'PBRevealViewController'
end
updating pod version to 1.11.3
Run "pod repo update --verbose"
ios / "pod install"
worked for me !!!
Working an a iOS project and don't have time to fix potential pod conflicts, getting the following error when running 'pod install'
The `master` repo requires CocoaPods 1.0.0 - (currently using 0.39.0)
Using --no-repo-update flag seems to help but throws another warning
https://github.com/CocoaPods/CocoaPods/issues/6163
Unable to find specification for
... manually replaced te pod master repo .. but didn't work ..
Unable to find a specification in CocoaPods
Being forced to use the latest version ... (--verbose .. also states that I need to update)
when running pod install I get The `master` repo requires CocoaPods 0.32.1, try updating but still in 0.31
As iHulk states in his comment:
Use source "https://github.com/CocoaPods/Old-Specs" at top of your pod file
Try this command in your terminal
sudo gem install -n /usr/local/bin cocoapods
I'm quite New to ios and cocoapods.
I am using realm.io swift version. Everything is latest version including xcode, realm and cocoapods
I did it with dynamic linking and realised itunes don't accept the strips framework.sh ...so I try using cocoapods. I didn't remove the dynamic linking and followed the steps using cocoapods to install realm.
It generated the workspace file for me and the running keeps telling realm object can't be found though I have import realm.
So I decided to remove the previous dynamic linking and install cocoapods to start all over again.
Now cocoapods don't generate workspace for me.even a new project that I created.
I tried all the comments to remove pod, cocoapod and even clone the cocoapods etc but nothing works
Please help. Why it don't generate workspace for me anymore
I followed these steps but still don't work
https://teamtreehouse.com/forum/pod-install-error-in-terminal-not-creating-xcode-workspace
Just copying from the comments: the answer was to specify use_frameworks! to the test target.
I was getting an Abort:6 error during the Generating Pods project step of pod install.
I deleted the Pods folder, reinstalled Cocoapods, ran pod install again, and it worked.
Reinstall cocoapods:
sudo gem uninstall cocoapods
sudo gem install cocoapods
I used all of the given solution and get success.
First got to Product->Scheme->ManageScheme and then check the shared box(Selected Form)
now pod install
if problem still arise
Try this
pod setup
pod install
if still have problem.(this worked for me)
rm -rf ~/.cocoapods
pod setup
pod install
if problem still there then last but not least
rm -rf ~/.cocoapods
git clone https://github.com/CocoaPods/Specs.git ~/.cocoapods/repos/master
pod install
If you've done all the above steps and if it's still not working, try
pod install --repo-update
I tried all the above steps, and still it was generating pod folders with blank dependency names. This step should download all the required dependencies for your project and will also create the .xcworkspace
To generate a workspace you must have the installer line in your Podfile saying:
integrate_targets => true
like this:
install! 'cocoapods', :integrate_targets => true
If you are using frameworks you do not need the workspace generated.
Try adding
use_frameworks!
between the platform line and the target line, then redo pod install from your terminal.
I did
rm -rf ~/.cocoapods/repos/trunk/
After that it worked again.
I user cocoapods update libs in china, the network of my county is limited.
so...
Podfile add one line : "pod 'SQLCipher' "
I run :
pod install --no-repo-update
failed!
remove 'pod SQLCipher'
run:
pod install --no-repo-update .
error:
[!] CocoaPods was not able to update the `master-1` repo. If this is an unexpected issue and persists you can inspect it running `pod repo update --verbose`
run:
pod repo update --verbose
loading... forever
Looks like your specs repo was edited at some point, and now git can't update it.
I'd recommend deleting and re-creating your Specs repo;
Run below command:
pod repo remove master
and then setup new by running
pod setup
I had found problem. I import 'SQLCipher' by add 'SQLCipher.h' 'SQLCipher.c' files.
then Error.
solved by remove the two files.