For example I have
pod 'Mixpanel', '~>2.9.2'
in my Podfile and no Podfile.lock. If I run 'pod install' it is installing the latest version which is 2.9.3 now. However if then I open newly created Podfile.lock, change version there, remove pods and then run 'pod install' again, it will download correct version.
According to 'pod install' specification:
For pods not listed in the Podfile.lock yet, it searches for the version that matches what is described in the Podfile (like in pod 'MyPod', '~>1.2')
Could you please tell, is it Cocoapods issue, or am I doing something wrong?
Related
[!] CocoaPods could not find compatible versions for pod "Flipper-Glog":
In Podfile:
Flipper-Glog (= 0.5.0.4)
None of your spec sources contain a spec satisfying the dependency: Flipper-Glog (= 0.5.0.4).
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.
Disable everything related to flipper in Podfile and then cd ios && pod install
# use_flipper!()
Worked after using this command:
pod install --repo-update
If you are building from a fresh Reach Native Project, there should be no need to edit any files in the project to get it to run.
Try the solutions here:
React native ios - error when running pod install (installing Flipper-Glog)
I encountered this problem after deleting all my iOS caches and setting some Virtual Env. Opening Xcode and simulator once then try "pod install" should work.
Remove or comment this line from your ios/Podfile in react native.
# use_flipper!()
For M1 chip Mac, run
"arch -x86_64 pod install"
solved it.
I have been using the fb sdk from a while,
i pod file I add
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'
and then use pod install
and it automatically install the latest version of pod
But what I'm seeing actually is the installed version is [] is 6.5.11
but the release facebook sdk version is
is not installing a pd without to the specific version mentioned in pod file, installs the latest version automatically ?
if you want to check The Podfile.lock it keeps track of the resolved versions of each Pod installed.
pod update & Pod Install
When you run pod update PODNAME, CocoaPods will try to find an updated version of the pod PODNAME, without taking into account the version listed in Podfile.lock. It will update the pod to the latest version possible (as long as it matches the version restrictions in your Podfile).
If you run pod update with no pod name, CocoaPods will update every pod listed in your Podfile to the latest version possible.
understand the pod install vs. pod update
Use pod install to install new pods in your project. Even if you already have a Podfile and ran pod install before; so even if you are just adding/removing pods to a project already using CocoaPods.
Use pod update [PODNAME] only when you want to update pods to a newer version.
so try with pod update instead of pod install
I was using a pod file in my previous iOS project which I want to include in my new project as well. But it has been deprecated and I am unable to include it using pod install in terminal. How to do it?
Edit1: Is there a way to manually include a pod from an existing project instead of "pod installing" it?
If you want to install deprecated pods, just include the version of that pod when you declare it in the Podfile.
For example, in order to install version 2.6.3 of AFNetworking via Cocoapods, here's how you would declare it in the Podfile:
pod ‘AFNetworking’, ‘2.6.3’
Doing a pod install installs it correctly.
The Podfile.lock file holds the version of the pods you were using, so if you have the Podfile and Podfile.lock, you can make a pod install and it should install the same pods.
I'm trying to install Firebase via CocoaPods for my Objective-C iOS Application. My Podfile is as follows:
target 'RandomName' do
pod 'Firebase/Core'
pod 'Firebase/AdMob'
end
When I run pod install, I get the following error:
[!] Unable to satisfy the following requirements:
- `Firebase/Core` required by `Podfile`
None of your spec sources contain a spec satisfying the dependency: `Firebase/Core`.
You have either:
* out-of-date source repos which you can update with `pod 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.
The latest version of CocoaPods is installed, and I have tried running pod repo update. Having a Podfile of the following works fine, but when I try to #import Firebase; in my AppDelegate.m file, Xcode cannot find the module.
target 'RandomName' do
pod 'Firebase'
end
However, the following combination does not install:
target 'RandomName' do
pod 'Firebase'
pod 'Firebase/AdMob'
end
Any help would be appreciated!
Check what version of Firebase is installed when you use pod 'Firebase'. For me it installs 2.4.3 which is an old version. The docs say that the pod should install 3.2 using that pod. It explains why the other pods don't work as they are part of Firebase 3. Pod update doesn't update Firebase to the latest version either. Even forcing a version doesn't work. It can't seem to find the new Firebase versions even though they are in the same podspec.
Here is how I solved it:
make sure you have the latest version of git installed
make sure you have cocoapods >= 1.0.0 installed
delete your pods repo (run pod repo remove master) and use pod setup to make a new one
use the following in your pod file
pod 'Firebase/Auth'
pod 'Firebase/Database'
pod 'Firebase/Core'
(use whatever you want, just don't use 'Firebase')
pod install
everything should install properly
Running 'pod repo remove master' to remove the Pods repo //removes the library
Running 'pod setup' //clones the updated git repo for specs which takes long time as its size is beyond 300K (Be patient!)
Running 'pod install' //problem is solved
have you tried to add
frameworks
use_frameworks!
after target 'RandomName' line
and adding
platform :ios, '9.0'
before target ....
A couple of items to try. From your question, you did try the first two items, but leaving here for completeness of my answer.
The error response you get is helpful. Follow the steps for pod repo update
Make sure your pod is up to date.
pwd> pod --version
1.0.0
Make certain that your git is up to date. I had a build machine that had an outdated git (1.7), and I had the same exact error
-
When I updated to this version from git 1.7 it worked fine.
pwd> git --version
git version 2.8.1
My Podfile for using Firebase Dynamic Links
run pod init from the folder where your .xcodeproj is
Be sure to only launch the .xcworkspace instead of the .xcodeproj from here out.
platform :ios, '8.0'
use_frameworks!
target 'the-name-of-target' do
pod 'Firebase/DynamicLinks'
end
The Same problem occurred while on pod install command.
Please relaunch terminal and navigate to your Xcode project then
simply fire same pod install command. 'Firebase/Database' will installed successfully :)
I just doing following step to fix this error:
$pod setup -- verbose
Then do $pod install
that works for me and my pod file is:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
target 'the-name-of-target' do
pod 'Eureka', '~> 1.6'
end
UPDATE:
Then you can remove your master and re-install cocoapods using following code:
cd ~/.cocoapods/repos
rm -rf master
pod setup
I had the same error, and my solution was to downgrade Cocoapods to 1.0.0, because Cocoapods 1.0.1 didn't work as I expected. Everything works great now!
sudo gem uninstall cocoapods -v 1.0.1
sudo gem install cocoapods -v 1.0.0
My Podfile:
platform :ios, '8.0'
target 'XXX' do
pod 'Firebase/Auth'
pod 'Firebase/Database'
end
For people still having problems with this. When directly coping the firebase walkthourgh website, the install string is:
pod `Firebase/Core`
While it should have been:
pod 'Firebase/Core'
No need for pod setup if this applies to you too.
Update Git and Cocoapods to the last version:
Git: $ brew update && brew upgrade
Cocoapods: $ pod repo update
I added an external framework via cocoapods into my iOS application. How can i remove that library from the project?
Remove lib from Podfile, then pod install again.
The unwanted side effects of simple folder delete or installing over existing installation have been removed by a script written by Kyle Fuller - deintegrate and here is the proper workflow:
Install clean:
sudo gem install cocoapods-clean
Run deintegrate in the folder of the project:
pod deintegrate
Clean (this tool is no longer available):
pod clean
Modify your podfile (delete the lines with the pods you don't want to use anymore) and run:
pod install
Done.
Remove the library from your Podfile
Run pod install on the terminal
None of these worked for me. I have pod version 1.5.3 and the correct method was to remove the pods that were not longer needed from the Podfile and then run:
pod update
This updates your Podfile.lock file from your Podfile, removes libraries that have been removed and updates all of your libraries.
To completely remove Pod or Cocoapods Framework from your Project repository !
sudo gem install cocoapods-clean
pod deintegrate
pod clean
Then Try to remove the File
Pods
Podfile
Podfile.lock
yourProjectName.xcworkspace
Remove pod name(which to remove) from Podfile and then
Open Terminal, set project folder path
Run pod install --no-integrate
Remove pod name from Podfile then
Open Terminal, set project folder path and
Run pod update command.
NOTE: pod update will update all the libraries to the latest version and will also remove those libraries whose name have been removed from podfile.
First, determine which versions of Cocoapods are installed :
gem list --local | grep cocoapods
You get output as this:
cocoapods (1.11.2)
cocoapods-clean (0.0.1)
cocoapods-core (1.11.2, 1.10.2, 1.10.1)
cocoapods-deintegrate (1.0.4)
To completely remove, issue the following commands:
gem uninstall cocoapods
gem uninstall cocoapods-clean
gem uninstall cocoapods-core
gem uninstall cocoapods-deintegrate
Running again to confirm that Cocoapods has been removed:
gem list --local | grep cocoapods
You may have residual artefacts in a hidden folder in your directory. Remove these with:
rm -rf ~/.cocoapods