How to install firebase pods for Specifically to Swift 3.0 - ios

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

Related

CocoaPods could not find compatible versions for pod "Firebase/Crashlytics"

I am developing react-native app.
I followed the firebase instruction adding my iOS app to my firebase project.
In my Podfile, I have:
pod 'Firebase/Crashlytics'
pod 'Firebase/Analytics'
when I run pod install I keep getting the error saying "CocoaPods could not find compatible versions for pod "Firebase/Crashlytics".
Xcode version 11.7, target iOS10.1
Why I get that error and how to get rid of it?
(I tried run pod update 'Firebase', I get:
[!] The Firebase Pod is not installed and cannot be update)
Make sure that your project's minimum deployment target (the one that referenced in your Podfile) is at least iOS 9 (see Firebase/Crashlytics release notes)
Unfortunately when cocoapods initially create the Podfile, doesn't take into account your projects minimum deployment target. Instead adds a default value in a comment.
The first time that you run pod install you will get a warning about not specified minimum deployment target. Also cocoapods documentation doesn't mention anything regarding this behavior.
So, you have to have to manually edit your Podfile and add something like this:
platform :ios, '10.1'
No issue with the deployment target but got the same error. It was working with the following versions of Firebase
pod 'Firebase/Core', '~> 3.0.0'
pod 'Firebase/Crashlytics', '~> 7.0.0'
When I added a new dependency and run pod install, It was showing the error for Firebase. So, I used the >= 0 in place of the version.
pod 'Firebase/Core', '>= 0'
pod 'FirebaseCrashlytics', '>= 0'
This will install the latest version for all Firebase dependencies.

Could not build Objective-C module 'SwipeCellKit'

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 ?

Alamofire install failed - Xcode 8.1

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

Issue with importing framework in Swift with Cocoapods

I am new to Swift, but I learned the basics. I wanted to import a framework but I ran into issues. I will now explain what steps I followed and what failed.
I installed cocoapods by using terminal command: sudo gem install cocoapods
I then navigated to my projects root directory with terminal then used command: pod init
It created a podfile, and I edited it as I have shown below.
platform :ios, '8.0'
use_frameworks!
target 'Testy' do
end
target 'TestyTests' do
pod 'Kingfisher', '~> 1.8.1'
end
target 'TestyUITests' do
pod 'Kingfisher', '~> 1.8.1'
end
I then closed xcode and started the project by clicking 'Testy.xcworkspace' file.
At this point, I did not add any code, just built the project without issues, problems start here.
When i try to import my framework and build, it gives the follow error:
Cannot load underlying module for 'Kingfisher'
So what might be the problem here? If you need additional info, ask me and I can provide.
In your Podfile, you do not have "pod 'Kingfisher', '~> 1.8.1'" listed for the target "Testy".

Why does each pod get reinstalled when I run pod install?

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

Resources