intergating New Firebase.. error cocoapods - ios

When i put pod 'Firebase' i dont get the Analytics in it it says the version 2.5.1 and when i say pod 'Firebase/Analytics'
Unable to satisfy the following requirements:
- `Firebase/Analytics` required by `Podfile`
None of your spec sources contain a spec satisfying the dependency: `Firebase/Analytics`.
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.
When i do pod update Firebase it is stuck for hours at
Performing a deep fetch of the `master` specs repo to improve future performance
I have tried everything i have updated all my cocoapods version.. i dont know whats the problem..
Code for Podfile
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
target 'NewFirebase' do
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
pod 'Firebase’
pod 'Firebase/Analytics’
target 'NewFirebaseTests' do
inherit! :search_paths
# Pods for testing
end
target 'NewFirebaseUITests' do
inherit! :search_paths
# Pods for testing
end
end
Thanks
Aryan

You may need to sync your Cocoapods master repo by running pod repo update (Source Link).
When my sync didn't work, a quick reinstall of Cocoapods fixed the syncing errors.

As it is established here:
https://firebase.google.com/docs/ios/setup#add_firebase_to_your_app
Firebase analytics are included in Firebase/Core which actually is the only thing included in
pod 'Firebase'
So you don't need to add pod 'Firebase/Analytics’ , it doesn't exist

Related

iOS Podfile issue with OverlayContainer from ADOverlayContainer

I'm attempting to load the following github repository through Pods:
https://github.com/applidium/ADOverlayContainer
$ pod install
Analyzing dependencies
[!] Unable to find a specification for `OverlayContainer`
Also tried 'ADOverlayContainer'.
The podfile, note the other two pods work:
# Uncomment the next line to define a global platform for your project
platform :ios, '12.1'
target 'MyCoreData' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
pod 'SwiftCharts', '~> 0.6.3'
pod 'SwiftGraph'
pod 'OverlayContainer'
# Pods for MyCoreData
target 'MyCoreDataTests' do
inherit! :search_paths
# Pods for testing
end
target 'MyCoreDataUITests' do
inherit! :search_paths
# Pods for testing
end
end
Doesn't seem to find the specified spec and the author doesn't have contact information or issues tab. Am I able to determine the correct reference somehow? The Podfile on the github repo appears to be the same reference.
I've tried using your podfile in a sample project. Seems good. I successfully installed OverlayContainer. You could try your podfile too in a new sample project, if it doesn't work too, then the problem should be in your local pod settings.
There are multiple ways to solve that.
Run pod setup (this may take time).
Update your Cocoapod stuff (gem? ruby? and whatnot).
You could also try adding source 'https://github.com/CocoaPods/Specs.git' in your podfile.
I hope this helps.

Many build errors after pod update

I have many pods installed in my project. Everything worked fine since my last pod update. After last pod update, I have 28 build errors starting with "Could not build module xxx".
Here is my podfile:
target 'projectXXX' do
use_frameworks!
pod 'Firebase'
pod 'Firebase/Database'
pod 'Firebase/Auth'
pod 'Firebase/Storage'
pod 'Firebase/Messaging'
pod 'Firebase/Crash'
pod 'TwitterKit'
pod 'Fabric'
pod 'Crashlytics' end
I tried to uninstall - install cocoapods.
I tried to deintegrate pod from project, install, remove .workspace file and deriveData folder... still got these errors.
I'm running out of ideas. Please, any other solution?
Thanks you very much
EDIT
I have just discovered that my Pods.framework is in red state as visible on screenshot below. Maybe this can help?
First try to remove cocoa pods completely
gem install cocoapods-deintegrate
pod deintegrate
gem install cocoapods-clean
pod clean
Then install again like this
pod setup
open -a Xcode Podfile
In Pod file add like this
# Uncomment this line to define a global platform for your project
platform :ios, '10.0'
# Uncomment this line if you're using Swift
use_frameworks!
target 'TestProject' do
pod 'Firebase'
pod 'Firebase/Database'
pod 'Firebase/Auth'
pod 'Firebase/Storage'
pod 'Firebase/Messaging'
pod 'Firebase/Crash'
pod 'TwitterKit'
pod 'Fabric'
pod 'Crashlytics'
end
target 'ProjectTests' do
end
pod install
Updating Xcode can resolve this issue. Thing is, pods might support multiple swift versions, so pods should be able to specify a range of swift versions.
Before Updating check if PODS_ROOT user-definer value in Build Settings of target is not deleted may be accidently. If so Try to add PODS_ROOT=${SRCROOT}/Pods
It's possible that you use old pods repositories and after update (that was few month ago) you need to specify which pod repository to use. I suggest that you need old one. See how looks my pod file for old project:
source 'https://github.com/CocoaPods/Old-Specs.git'
platform :ios, '9.0'
use_frameworks!
xcodeproj 'SF'
#link_with 'SF'
target 'SF' do
pod 'TransitionKit'
pod 'MBProgressHUD'
pod 'PureLayout'
pod 'UICountingLabel'
pod 'MWPhotoBrowser', :git => 'https://github.com/pash3r/MWPhotoBrowser.git', :branch => 'skyFlyWork'
end
What could cause the issue:
- Breaking changes in Pods/APIs
- Breaking changes due to support/non-support of Swift versions
If you are using a versioning system (Git, etc.).
Retrieve an older version of Podfile.lock.
Read that file (it's a text file, you can do more somePath/Podfile.lock in Terminal.app), and the "explicit" versions of your pods should be there.
You should get something like:
PODS:
- GSKStretchyHeaderView (1.0.3)
- Masonry (1.1.0)
...
PODFILE CHECKSUM: someCheckSum
COCOAPODS: 1.1.1
When you do pod 'Firebase' you don't specify a version, so you should get the last one. But if some versions are not compatible, you can get issues.
So you may add the '~> 1.0.3' (for instance if I take my example of GSKStretchyHeaderView). More informations on how to use it here.
So this way you should get back on a older version when everything was working. Now, you can check the documentation of each pods (and their respective podspec looking for "hidden" dependencies) and update them one by one checking which one is the culprit, and then maybe rising a flag (an issue) on their repo/git if needed.
For next dev, I'd suggest to set "version", to at least majors using the "optimistic operator ~>". If they respect the rules of versions, (major/minor/patch), then at least determine the major/minor, a patch shouldn't break anything, but fix things. A minor may have breaking change, while a major has a lot of probability to not be compatible with previous work (different declaration, classes renames, etc.).
If you don't use a versioning system like Git, I STRONGLY suggest you do now.
But if that's your case and you still have the issue. Remember a date when everything was working fine after a pod update/install. Then, go to each Git of your pods, and read the history to find the version at that date and set that version in your podfile for that pod.
Shen you are doing pod update which update all libraries most of the libraries on swift4 still some of them in swift3
If libraries are in swift 4 and your project in swift 3.2 you have two possibilities
you can migrate project to swift4
(or)
you need to rollback to the swift 3.2 supported pods
If project in swift4 libraries in swift3 you need to migrate those libraries into swift4 to solve current problem

Cocoapods install error- Unable to find a specification for pod

I am trying to install two pods to my Xcode project from terminal. I initially had installed a pod called PRAugmentedReality, and it worked fine. Then I tried adding the pod BFTransmitter, and started getting the following error message:
[!] Unable to find a specification for 'PRAugmentedReality'
If I remove the PRAugmentedReality pod and install with just BFTransmitter, it also works fine. So basically I am able to install either on their own, but not together.
My podfile looks like this:
#source for BFTransmitter
source 'https://bitbucket.org/bridgefy/bridgefypods.git'
target 'FWF' do
pod 'BFTransmitter'
pod 'PRAugmentedReality'
target 'FWFTests' do
inherit! :search_paths
end
end
I have tried repo remove master pod setup and then pod install, still no luck.
just add source to install both pods together check my podFile and add sourced before your target as I did
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
source 'https://github.com/CocoaPods/Specs.git'
source 'https://bitbucket.org/bridgefy/bridgefypods.git'
target 'pod' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
pod 'BFTransmitter'
pod 'PRAugmentedReality'
# Pods for pod
end
Result
I encounter the same problem in my project.
When I was editing pod file, I changed pod 'SCSoftKycSolutionSdkSource' to pod 'MyprojectName'.
I fixed the below, issue fixed.
pod 'SCSoftKycSolutionSdkSource'

IOS COCOAPOD with sources

I am trying to update the CocoaPods in my Xcode project, but when I try to run pod update, it doesn't work.
My podfile:
source 'https://github.com/MapQuest/podspecs-ios.git'
target 'FireBaseFixed' do
pod 'Firebase', '3.11.0'
pod 'MOCA'
pod 'MapQuestMaps'
end
And the response
daortiz:FireBaseFixed dortiz$ pod update
Update all pods
Updating local specs repositories
Analyzing dependencies
[!] Unable to find a specification for `Firebase (= 3.11.0)`
[!] Your Podfile has had smart quotes sanitised. To avoid issues in the future, you should not use TextEdit for editing it. If you are not using TextEdit, you should turn off smart quotes in your editor of choice.
What I doing wrong?
Any reason you require Firebase 3.11.0 exactly?
To get the latest framework, use
pod 'Firebase'
Anyways, your problem is not the version, rather the sources, you seem to have omitted cocoapods main source and included only MapQuestMaps.
You also need to specify the version of MapQuestMaps as the are all pre-release versions and cocoapods will cry foul.
The code below fixes that.
source 'https://github.com/MapQuest/podspecs-ios.git'
source 'https://github.com/CocoaPods/Specs.git'
target 'FireBaseFixed' do
pod 'Firebase', '3.11.0'
pod 'MOCA'
pod 'MapQuestMaps', '3.4.1-1.1'
end
If the above doesn't work, sync your repo by running the following
pod repo update --verbose
Then run
pod install
Below is the working version of your podfile
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
source 'https://github.com/MapQuest/podspecs-ios.git'
source 'https://github.com/CocoaPods/Specs.git'
target 'FireBaseFixed' do
pod 'Firebase'
pod 'MOCA'
pod 'MapQuestMaps’, '~>3.4.1-1.1'
end

how can I install Firebase authentication in terminal using cocoa pods?

When I enter pod 'Firebase/Auth' it isn't installing the pod. Its saying this: [!] Unable to satisfy the following requirements:
Firebase/Auth required by Podfile
None of your spec sources contain a spec satisfying the dependency: Firebase/Auth.
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.
[!] Your Podfile has had smart quotes sanitised. To avoid issues in the future, you should not use TextEdit for editing it. If you are not using TextEdit, you should turn off smart quotes in your editor of choice.
I have said in the pod file - pod 'Firebase' and that is installing fine, but I don't know why 'Firebase/Auth' isn't installing.
This is using swift and Xcode is any of you were wondering, please can someone suggest what I can do to solve this, thanks
This is the pod file:
platform: ios, '8.0'
use_frameworks!
target: 'Lifelapse' do
pod 'Canvas'
pod 'Firebase'
pod 'Firebase/Auth'
end
EDIT:
The solution was just to 'pod repo update' which worked perfectly. However now I have 27 error messages - Please help!
I did more or less than the guy told us
but my steps were a little different:
On the Terminal: go to your project folder:
1.1 sudo Desktop/YourApp
1.2 YOURMAC:YourApp Fernanda$ sudo pod init
Change your file Podfile to:
# Uncomment this line to define a global platform for your project
platform :ios, '8.0'
target 'YourApp' do
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for YourApp
pod 'Firebase'
end
On the Terminal: pod install
Now, change your file Podfile again to:
# Uncomment this line to define a global platform for your project
platform :ios, '8.0'
target 'YourApp' do
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for YourApp
pod 'Firebase'
pod 'Firebase/Auth'
end
On the Terminal: pod update
try update platform version 8.0 to 9.0
platform: ios, '9.0'
use_frameworks!
target: 'Lifelapse' do
pod 'Canvas'
pod 'Firebase'
pod 'Firebase/Auth'
end

Resources