When I run pod install on my project, each pod in my pod file gets installed/reinstalled. On other projects I've been involved with when you run pod install only the newly added items to the podfile get installed.
For example, assuming my podfile already had AFNetworking, SDWebImage and SVProgressHUD, and I had recently added Facebook-iOS-SDK, running pod install outputs this:
-> Installing AFNetworking
-> Installing SDWebImage
-> Installing SVProgressHUD
-> Installing Facebook-iOS-SDK
when I would expect it to output something like this instead (and proceed much faster than it does):
-> Using AFNetworking
-> Using SDWebImage
-> Using SVProgressHUD
-> Installing Facebook-iOS-SDK
I've tried this with both version 0.34.2 and 0.33.1 of cocoapods with no luck. My podfile in my project looks like this:
source 'https://github.com/CocoaPods/Specs.git'
xcodeproj 'ProjectName.xcodeproj'
platform :ios, '8.0'
inhibit_all_warnings!
pod 'AFNetworking'
pod 'Facebook-iOS-SDK', '3.19.0'
pod 'google-plus-ios-sdk', '1.7.1'
pod 'MD5Digest'
pod 'SDWebImage'
pod 'SDWebImage-ProgressView'
pod 'SSKeychain'
pod 'STTwitter'
pod 'SVProgressHUD'
Any help is much appreciated!
This issue is one of out two issues I'm having with cocoapods. I think they might be related so I'm adding a link to the other issue: https://stackoverflow.com/questions/26333345/why-does-running-pod-install-download-more-files-than-specified-in-the-podspec-f
Related
I tried lot and searched Firebase documents. But I can't find any document to find Firebase pods specifically to Swift 3.0. Here I configured podfile for swift 3 & cleared pods, derived data. but it's always installing only latest version of pods and results error in pod file. I am using xcode 8 & swift 3 xcode project.
How can I install firebase for Swift 3.0? Thanks in advance...
To install Firebase in your project, prerequisites are :
Install the following:
Xcode 10.3 or later CocoaPods 1.4.0 or later
Make sure that your project meets these requirements:
Your project must target iOS 8 or later.
Reference
Below pod file can be used to install the dependencies,
use_frameworks!
platform :ios, '8.0'
install! 'cocoapods'
target 'Test' do
use_frameworks!
pod 'Firebase/Analytics'
pod 'Firebase/Messaging'
end
step 1:
To add pod file
pod 'Firebase', '>= 2.5.1'
pod ‘Firebase/Core’
pod ‘Firebase/Database’
pod ‘Firebase/Auth’
step 2:
pod install
I want to integrate this into my app
https://cocoapods.org/pods/SwipeCellKit
so I add this line
pod 'SwipeCellKit'
into my pod file and run pod install
platform :ios, '9.0'
target 'ListHue' do
use_frameworks!
pod 'RealmSwift'
pod 'SwipeCellKit'
end
After installed, I got these message
Analyzing dependencies
Downloading dependencies
Using Realm (3.7.4)
Using RealmSwift (3.7.4)
Using SwipeCellKit (2.4.3)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 2 dependencies from the Podfile and 3 total pods installed.
I'm not sure why when I tried to import it XCode was yelling at me.
What did I do wrong ?
Recently upgraded to XCode 8.1 trying to install Alamofire pod for a new project. Podfile:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
target 'app' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for app
pod 'Alamofire',
:git => 'https://github.com/Alamofire/Alamofire.git',
:branch => 'swift3'
end
And my terminal responds:
image
so what can I do?
--Update--
also tried pod 'Alamofire', '~> 4.0'
here is the result
I did the pod repo update it doesn't do anything at all
Edit your podFile as below and just install the pods using pod install --verbose command if still error exists then update your repo with pod repo update then try again.
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
target 'app' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for app
pod 'Alamofire'
end
As per the discussion here,
You need to use
pod 'Alamofire', '~> 4.0'
In your pod file
I faced the same problem when i updated the mac os from el capitan to sierra and installed new version of Xcode.
I updated the cocoapod and still, was facing the same problem.
I found a solution by completely removing cocoapod from root directory and installing it again.
To remove the cocoapod completly use this in terminal
$ sudo rm -fr ~/Library/Caches/CocoaPods/
$ sudo rm -fr ~/.cocoapods/repos/master/
and then install the cocoapod again
$ gem install cocoapods
I'm unable to install Firbase pod, when trying:
pod install
Analyzing dependencies
[!] Unable to find a specification for `Firebase`
Here is my podfile :
platform :ios, '9.0'
target 'login' do
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for login
pod 'Firebase'
pod 'Firebase/Auth'
end
Maybe your pod isn't synced? Try:
pod repo update --verbose
In my case the problem was with my local pod repo. I fixed by doing the following:
pod repo remove master
pod setup
pod install
You could try
pod 'Firebase/Core'
Instead of just pod 'Firebase'.
I had the same problem and it worked for me.
Try below commands:
pod repo remove master
pod repo update
pod install --verbose
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