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.
Related
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
I'm using xcode 6.2 on OS X 10.9.5
I have installed ruby v2.6.3p62 and pod v1.6.1,
and already clone the .cocoapods/repos/master,
after that run command in my project directory:
pod init
to create Podfile and add "pod 'Alamofire'" into the file to add dependencies
But, when I run command:
pod install
I've got this message:
Analyzing dependencies
env: illegal option -- u
usage: env [-i] [name=value ...] [utility [argument ...]]
Setting up CocoaPods master repo
[i] Unable to add a source with url 'https://github.com/CocoaPods/Specs.git'named 'master-1.
You can try adding it manually in '/Users/myUser/.cocoapods/repos'or via 'pod repo add'.
I've tried to remove and reclone the .cocoapods/repos/master,
change the Command Line Tools in Xcode into Xcode 6.2 or set empty,
but it didn't solve the problem.
Update
here it is my Podfile
# Uncomment the next line to define a global platform for your project
platform :ios, '8.0'
target 'MyProject' do
# Comment the next line if you're not using Swift and don't want to use dynimic frameworks
use_frameworks!
# Pods for MyProject
pod 'Alamofire'
end
Have you tried to follow the instructions mentioned?
Go in your terminal and:
cd /Users/myUser/.cocoapods/repos
followed by:
pod repo add https://github.com/CocoaPods/Specs.git master-1
Steps to install POD:-
pod init (Create a new Podfile only if you don't have already, otherwise go to next step)
open Podfile
add pod 'Alamofire'
pod install
Try below command.
pod update YourPodName
Here YourPodName stands with your podname.
Example :- pod update Alamofire
Have you tried to follow these instruction mentioned?
1- First Step
$ cd /Users/username/.cocoapods/repos
2- remove folder master if it exists
rm -rf master
3- clone Cocoapods/Specs
$ git clone https://github.com/CocoaPods/Specs.git master
4- then pod setup
pod setup
That's it
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.