CocoaPods trunk no Specs - cocoapods

I installed Cocoapods v1.7.0 on Mac Catalina 10.15.7 (19H2). Now I'm upgrading Cocoapods to v1.10.0.
Firstly I uninstall v1.7.0 following https://superuser.com/a/686319.
Then install v1.10.0 with no issue:
sudo gem install cocoapods
In my project folder, I run pod repo update:
$pod repo update  ✔  6s  17:17:13
Updating spec repo `trunk`
$pod repo update  ✔  3s  17:34:21
It only takes 3s with no issue, but I get nothing in folder ~/.cocoapods/repos/trunk/Specs(empty folder):(
Then as you may already know it cannot find any spec when running pod install:
pod install --repo-update
Updating local specs repositories
Adding spec repo `trunk` with CDN `https://cdn.cocoapods.org/`
Analyzing dependencies
[!] Unable to find a specification for `Firebase/Analytics`
You have either:
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
Note: Not pod Firebase/Analytics issue, tried other pods also got this error.
Any suggestion to fetch Cococapods CDN trunk Specs normally? Thanks in advance.

It's working by uninstalling CocoaPods v1.10.0 & then installing v1.8.0.
Don't know the root cause yet, guess have to install the first CocoaPods version with CDN.

Related

How do i resolve this pod install error on flutter?

I can't load all the requested pods apparently there is a problem with these two project dependencies ... "pod upgrade" terminal command results are:
Updating local specs repositories
Analyzing dependencies
firebase_auth: Using Firebase SDK version '10.3.0' defined in 'firebase_core'
firebase_core: Using Firebase SDK version '10.3.0' defined in 'firebase_core'
firebase_database: Using Firebase SDK version '10.3.0' defined in 'firebase_core'
[!] CocoaPods could not find compatible versions for pod "Firebase/Database":
In Podfile:
firebase_database (from `.symlinks/plugins/firebase_database/ios`) was resolved to 10.0.7, which depends on
Firebase/Database (= 10.3.0)
flutter_geofire (from `.symlinks/plugins/flutter_geofire/ios`) was resolved to 0.0.1, which depends on
GeoFire (~> 4.0) was resolved to 4.1.0, which depends on
Firebase/Database (~> 6.0)
Inside /ios directory, remove the Podfile.lock file.
Then, on terminal, run to this directory:
cd ./ios
Then run the following command:
pod deintegrate && pod repo update && pod install
The command is composed of three parts:
"pod deintegrate" - This command will deintegrate CocoaPods from the project, removing any references to Pods and the Podfile.lock file
"pod repo update" - This command updates the local copy of the CocoaPods spec repo, which is the source of information about available pods.
"pod install" - This command installs the pods specified in the Podfile, and creates an Xcode workspace if one does not already exist.
This command is useful when you want to update your project's dependencies and integrate the new version of the Pod without having any conflicts.
Delete the pod file inside the ios folder.
go to the terminal in path ios ios folder and run command "pod init"
manage signin procedure in xcode
noy try to run

Why is my React Native Pod Install Erroring?

Trying to run pod install in a new React Native project and getting this error. Ruby is installed with brew
I have installed chruby and ruby-install, which I have then used to install ruby-2.7.5 cocopods, ffi and bundler. When trying bundler to install I get this error:
warn Multiple Podfiles were found: ios/Podfile,vendor/bundle/ruby/2.7.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/Podfile. Choosing ios/Podfile automatically. If you would like to select a different one, you can configure it via "project.ios.sourceDir". You can learn more about it here: https://github.com/react-native-community/cli/blob/master/docs/configuration.md
[Codegen] Generating ./build/generated/ios/React-Codegen.podspec.json
fatal: not a git repository (or any of the parent directories): .git
Analyzing dependencies
Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
[Codegen] Found FBReactNativeSpec
Fetching podspec for `RCT-Folly` from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`
Fetching podspec for `boost` from `../node_modules/react-native/third-party-podspecs/boost.podspec`
Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
Fetching podspec for `hermes-engine` from `../node_modules/react-native/sdks/hermes/hermes-engine.podspec`
[!] Couldn't determine repo type for URL: `https://cdn.cocoapods.org/`: Permission bits for '/Users/macbook/.netrc' should be 0600, but are 644
So I put out a bounty on this because I couldn't figure it out for ages. Until I did. (Hopefully this fix works for everyone else)
First when I ran xcode-select -p it was returning /Library/Developer/CommandLineTools
However this looked odd as another an answer here seemed to suggest that maybe this was causing an issue. It ended up that I just hadn't set my CLI tools correctly as described in the react native docs. Since it only had one option in the dropdown I assumed that the CLI tools were already set. However when I went back and specifically clicked on the one option, it made changes to my system.
Now running xcode-select -p returns /Application/Xcode.app/Contents/Developer
TL;DR : Open Xcode, go to 'Settings...' in the menu bar. Then go to the 'Locations' tab and click on the 'Command Line Tools' dropdown and click on the latest version (click on a version even if it seems like a version is already set). Now try your pod install again!
Probably this answer(https://stackoverflow.com/a/69427481/8988448) would solve your issue. Looks like you haven't given proper permissions.
run chmod 600 ~/.netrc and once it is done, run pod install.
Got same error as below:
✔ Downloading template
✔ Copying template
✔ Processing template
ℹ Installing dependencies
✔ CocoaPods (https://cocoapods.org/) is not installed. CocoaPods is necessary for the iOS project to run correctly. Do you want to install it? › Yes, with gem (may require sudo)
✔ Installing CocoaPods
✔ Installing Bundler
✖ Installing CocoaPods dependencies (this may take a few minutes)
error warn Multiple Podfiles were found: ios/Podfile,vendor/bundle/ruby/2.7.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/Podfile. Choosing ios/Podfile automatically. If you would like to select a different one, you can configure it via "project.ios.sourceDir". You can learn more about it here: https://github.com/react-native-community/cli/blob/master/docs/configuration.md
✖ Installing CocoaPods dependencies (this may take a few minutes)
error Error: Looks like your iOS environment is not properly set. Please go to https://reactnative.dev/docs/next/environment-setup and follow the React Native CLI QuickStart guide for macOS and iOS.
Environment: macOS Catalina 10.15.7
Through gem installed cocoapods like below.
rn sudo gem install -n /usr/local/bin cocoapods
Password:
When run react-native init myproj, choose gem to install coacopods again.
Hello once I also had same issue . I have resolve it.Follow this step it would work .
This error is cause by installing same package multiple time in single project
Try to remove that package from project and reinstall that project.
Try to uninstall ruby-2.7.5
yarn remove package name
yarn add package name
or
npm uninstall package name
npm install package name
and
cd ios && pod install && cd ..
npx react-native run-ios

Invalid Podfile file: undefined method `enable_user_defined_build_types!'

I have installing gem on a Macbook Pro running Big Sur and M1 chip. I have followed the instructions given, added these two lines on top of my Podfile
plugin 'cocoapods-user-defined-build-types'
enable_user_defined_build_types!
then I am running the command
sudo gem install 'cocoapods-user-defined-build-types'
and gem is getting installed see below -
Successfully installed cocoapods-user-defined-build-types-0.0.7
Parsing documentation for cocoapods-user-defined-build-types-0.0.7
Done installing documentation for cocoapods-user-defined-build-types after 0 seconds
1 gem installed
Now, as soon as I run pod install, I get this error -
[!] Invalid Podfile file: undefined method `enable_user_defined_build_types!' for #<Pod::Podfile:0x0000000145251098 #defined_in_file=#<Pathname
Any idea what excatly is the problem here?
I solved this issue by installing specific version of cocoapods with gem.
Open a terminal in your Xcode project folder and run the commands below:
gem cleanup
brew uninstall cocoapods
sudo gem uninstall cocoapods
sudo gem install cocoapods -v 1.10.0 -n /usr/local/bin
sudo gem install cocoapods-user-defined-build-types
pod install --repo-update
NOTE! If you using react-native before pod install --repo-update delete your node_modules folder and install again using npm
I was struggling to get a solution,
I was trying to install the snapkit and Firebase through cocoapods, I got pod init, but after insert inside the podfile the e.g. Snpakit when I tried the comand pod install i got this issue
[!] Invalid Podfile file: undefined method......
What solved for me
I installed the brew through terminal and by brew I reinstalled cocoapods
another thing that was crucial...
when I typed insert my pod
pod 'SnapKit', '~> 5.6.0'
The Podfile, automatically change de first character to uppercase
Pod 'SnapKit', '~> 5.6.0'
After you type your pod, try to leave the word pod in lowercase, after save and close, go to terminal and try again pod install
add gem 'cocoapods-user-defined-build-types' to your gemfile and run bundle install
this should work if the other solutions didn't

CDN: trunk Repo update failed - 12 error(s):

Getting error when I tried to update pod,
pod update
Error found,
[!] CDN: trunk Repo update failed - 12 error(s):
CDN: trunk URL couldn't be downloaded: https://cdn.jsdelivr.net/cocoa/Specs/9/b/5/FBSDKCoreKit/6.1.0-alpha/FBSDKCoreKit.podspec.json Response: Timeout was reached
However, I can access the json path smoothly from my browser.
How to resolve this?
I have same issue like yours, I fixed it by running:
pod repo remove trunk and then pod install, once these are complete I ran pod update and it updated everything.
I ran into same issue , following steps helped me to fix these errors-
comment git path for cocoa pods and add path for CDN
pod 'TensorFlowLiteSelectTfOps', '~> 0.0.1-nightly'
pod repo remove trunk
pod install
No of errors reduced , keep repeating step 4 until u get no errors and it starts installing pod
I got this error with FirebaseRemoteConfig 7.1.0.
In my case, above answers didn't work.
pod repo remove trunk
Add GitHub path to Podfile
But it was resolved after I ate dinner... (maybe caused by CDN server)
if you are on mac
just run
git clone https://github.com/CocoaPods/Specs.git ~/.cocoapods/repos/master
then go do
pod install
If none of things works for you then try to update your cocoapods using
sudo gem install cocoapods
It will definitely fix issue. :)

tns doctor not working. WARNING: There was a problem with CocoaPods

I tried installing Nativescript on my machine and successfully ran all the commands but when I ran TNS doctor I got the following error.
Verifying CocoaPods. This may take more than a minute, please be patient.
Installing iOS runtime.tns-ios#2.1.1 ../../var/folders/pr/zxhdgq354w36_v4jnkyg89fr0000gn/T/nativescript-check-cocoapods11679-71167-clmpmh/node_modules/tns-ios
Verifying CocoaPods. This may take some time, please be patient..
sandbox-exec: /Users/myname/.rvm/gems/ruby-2.3.1#global/gems/cocoapods-1.0.1/bin/pod: Operation not permitted
WARNING: There was a problem with CocoaPods
Verify that CocoaPods are configured properly.
There seem to be issues with your configuration.
1
I have googled around for a fix but could not get any answer e.g. https://github.com/NativeScript/nativescript-cli/issues/1943
There was a mention of chmodding ./Pods but that didn't work. Has anyone else had this problem and fixed it?
I have installed and checked cocoapods but it still yields the same error.
Last login: Tue Aug 9 19:24:23 on ttys000
XXX-MacBook-Air:~ mine$ sudo gem install cocoapods
Password:
Successfully installed cocoapods-1.0.1
Parsing documentation for cocoapods-1.0.1
Done installing documentation for cocoapods after 4 seconds
1 gem installed
XXX-MacBook-Air:~ mine$ pod --version
1.0.1
`
Install your CocoaPods with superuser permissions.
sudo gem install cocoapods
And then check if they are installed correctly
pod --version
Also, you might want to update your XCode version if you are using older one.
Refer to this issue for similar problem discussed.
You will need a lower version of cocoapods first you will need to remove your current version sudo gem uninstall cocoapods then you can proceed to install
sudo gem install activesupport -v 4.2.6
sudo gem install cocoapods -v 0.39.0
After installing cocoapods you can try creating a demo app and run it
tns create demoApp
cd demoApp
tns run ios
You can ignore tns doctor for now
After some research I found the right answer (at least for me) and paste it for future references.
currently using:
MacOs Sierra with
xcode: v7.3.0
cocoapods: v1.0.1
nativescript: v2.3.0
node: v6.8.1
Steps:
Locate your node_modules folder where your global npm packages are installed (I am using nvm version manager and node v6.8.1 so it was /Users/myuser/.nvm/versions/node/v6.8.1/lib/node_modules/nativescript/config).
open node_modules/nativescript/config/config.json
Change the value of USE_POD_SANDBOX to false
Reason (as act of faith): NativeScript uses the sandbox-pod executable. This may prevent some pods from installing correctly. If you encounter such cases, you can switch to the regular pod executable.
original source: https://github.com/NativeScript/nativescript-cli/issues/1943#issuecomment-246186556
[Cocoapods problems][1]
[1]: https://i.stack.imgur.com/fCWVI.png
[continue Cocoapods problems][2]
[2]: https://i.stack.imgur.com/trSvT.png
[continue Cocoapods problems][3]
[3]: https://i.stack.imgur.com/iwvhK.png

Resources