Unity fails to compile project with firebase analytics because of Cocoapods - ios

I'm trying to integrate Firebase-Analytics in my Unity 2013.3.1 project.
After following the integration guide, I've tried to build the project.
However, Unity fails to build. The reason seems to be cocoapods.
Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "Firebase/Analytics":
In Podfile:
Firebase/Analytics (= 4.8.1)
None of your spec sources contain a spec satisfying the dependency: `Firebase/Analytics (= 4.8.1)`.
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.
Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by default.
I've tried to reinstall cocoapods and re-run pod setup, and also deleting the repo and re-setupping using rm -rf ~/.cocoapods/repos/master, but I had no success.
Here's the generated Podfile:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '7.0'
target 'Unity-iPhone' do
pod 'Firebase/Analytics', '4.8.1'
pod 'Firebase/Core', '4.8.1'
end
One last thing I've tried was to remove the specific version tags into the Podfile (I've removed the '4.8.1'). This fixed the pod install, however I couldn't find a way to have a successfull build from unity, since the Podfile is auto-generated.
Here's the pod install output after removing the version tag:
Analyzing dependencies
Downloading dependencies
Installing Firebase (4.9.0)
Installing FirebaseAnalytics (4.0.9)
Installing FirebaseCore (4.0.15)
Installing FirebaseInstanceID (2.0.9)
Installing GoogleToolboxForMac (2.1.3)
Installing nanopb (0.3.8)
Generating Pods project
Integrating client project
[!] Please close any current Xcode sessions and use `Unity-iPhone.xcworkspace` for this project from now on.
Sending stats
Pod installation complete! There are 2 dependencies from the Podfile and 6 total pods installed.
It looks like FirebaseAnalytics is currently at version 4.0.9, not 4.8.1.
Did anyone have similar issues?

Update to the 4.4.2 release.
Or to workaround with 4.4.1:
Manually edited each of Dependencies.xml files in Assets/Firebase/Editor to change the version from 4.8.1 to 4.8.2. Example:
<iosPods>
<!-- Mike changed this from 4.8.1 to 4.8.2 -->
<iosPod name="Firebase/Analytics" version="4.8.2" minTargetSdk="7.0">
</iosPod>
</iosPods>
Reference and additional detail here.

The version of FirebaseAnalytics used by Firebase 4.9 is 4.0.9, not 4.8.1. See the podspec for reference.
Another possible issue for failing is that your dependency (iOS 7) is too old and it's not supported by Xcode 9, nor by the latest version of Firebase.
Replace
platform :ios, '7.0'
with
platform :ios, '8.0'

Related

Cocapods Updating Firebase instead of installing v 11 reverts to old version v3.6

I have inherited a project that has not been updated for a while. It uses Firebase SDK with Coapods. Latest version of Cocapods currently is Version 10.0.0 - October 10, 2022 ([https://firebase.google.com/support/release-notes/ios][1])
My Podfile looks like this
platform :ios, '11.0'
target 'AppName' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
use_frameworks!
# Pods for AppName
pod 'Firebase/Core'
pod 'Firebase/Messaging'
pod 'Firebase/RemoteConfig'
pod 'Firebase/Storage'
pod 'Firebase/Auth'
pod 'Firebase/Crashlytics'
pod 'Firebase/Analytics'
As you can see I do not limit versions with ~> notation.
When I run pod update Firebase in terminal I get
Updating local specs repositories
Analyzing dependencies
Downloading dependencies
Installing Firebase 3.6.0
Installing Firebase 7.3.0 (was 3.6.0)
Installing GoogleUtilities 1.3.2
Installing GoogleUtilities 7.8.0 (was 1.3.2)
Generating Pods project
Integrating client project
Pod installation complete! There are 29 dependencies from the Podfile and 65 total pods installed.
So why does it not update to the version 11?
Why is this line here -> Installing Firebase 3.6.0 ?
Also I get bunch of warnings like:
[!] Unable to read the license file `LICENSE` for the spec `Firebase (7.3.0)`
[!] Unable to read the license file `LICENSE` for the spec `GoogleUtilities (7.8.0)`
[!] Unable to read the license file `LICENSE` for the spec `Firebase (7.3.0)`
[!] Unable to read the license file `LICENSE` for the spec `GoogleUtilities (7.8.0)`
[!] [Xcodeproj] Generated duplicate UUIDs
How do I make it to update to version 11? And without bunch of warnings? Any idea where to start?
[1]: https://firebase.google.com/support/release-notes/ios

CocoaPods could not find compatible versions for pod . changed the constraints of dependency `Firebase/Firestore` inside your development pod

I am facing the below error after upgrading flutter and to the latest flutter packages.
[!] CocoaPods could not find compatible versions for pod "Firebase/Firestore":
In snapshot (Podfile.lock):
Firebase/Firestore (= 8.15.0)
In Podfile:
cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`) was resolved to 3.4.5, which depends on
Firebase/Firestore (= 9.4.0)
You have either:
* changed the constraints of dependency `Firebase/Firestore` inside your development pod `cloud_firestore`.
You should run `pod update Firebase/Firestore` to apply changes you've made.
[!] Automatically assigning platform `iOS` with version `12.0` on target `Runner` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
I had the same problem but not with Firebase. the error was for AgoraIrisRTC_iOS. After deleting PodFile.lock and "pod install" in iOS directory the problem was solved.
After deleting the /ios/pods.lock file in the project, it started downloading the pods for the latest version.

Error: CocoaPods's specs repository is too out-of-date to satisfy dependencies. To update the CocoaPods specs, run: pod repo update

When I start to run flutter ios the project with "flutter run" it gives
`Error: CocoaPods's specs repository is too out-of-date to satisfy dependencies.
To update the CocoaPods specs, run:
pod repo update
Error running pod install
`
Then I run "pod install" inside ios/ It gives
[!] CocoaPods could not find compatible versions for pod "Firebase/CoreOnly":
In Podfile:
firebase_core (from .symlinks/plugins/firebase_core/ios) was resolved to 1.12.0, which depends on
Firebase/CoreOnly (= 8.11.0)
None of your spec sources contain a spec satisfying the dependency: Firebase/CoreOnly (= 8.11.0).
You have either:
out-of-date source repos which you can update with pod repo update or with pod install --repo-update.
Then
I tried pod install --repo-update
It gives
[!] CocoaPods could not find compatible versions for pod "Firebase/CoreOnly":
In Podfile:
firebase_core (from .symlinks/plugins/firebase_core/ios) was resolved to 1.12.0, which depends on
Firebase/CoreOnly (= 8.11.0)
None of your spec sources contain a spec satisfying the dependency: Firebase/CoreOnly (= 8.11.0).
You have either:
mistyped the name or version.
not added the source repo that hosts the Podspec to your Podfile.
Do you want to help me about this problem?
You should go to iOS folder and delete:
pods folder and podfile.lock
after that, you should add below lines to yaml file
firebase_core: ^1.12.0 "[last version in dev dart]"
firebase_analytics: ^8.3.4 "[last version in dev dart]"
firebase_crashlytics: ^2.3.0. "[last version in dev dart]"
firebase_messaging: ^11.1.0. "[last version in dev dart]"
run your app to install and update pod file
This is solved by deleting
Podfile.lock
pods folder
updating these packages
firebase_core: ^1.12.0
firebase_analytics: ^8.3.4
firebase_crashlytics: ^2.3.0.
firebase_messaging: ^11.1.0.
then running first
pod repo remove trunk
and finally
pod install

React native firebase/admob iOS pod install problems

i'm trying to install #react-native-firebase/admob with the following command:
npm install #react-native-firebase/admob
After that when i'm going in to ios folder on the project and using :
pod repo update
pod install
i'm getting the following error:
[!] CocoaPods could not find compatible versions for pod
"Firebase/AdMob": In Podfile:
RNFBAdMob (from ../node_modules/#react-native-firebase/admob) was resolved to 11.5.0, which depends on
Firebase/AdMob (= 8.8.0)
None of your spec sources contain a spec satisfying the dependency:
Firebase/AdMob (= 8.8.0).
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.
Can somewone help me? i'm using:
Node verison 14.17.6
npm version 6.14.15
CocoaPods 1.11.2
platform ios '11.0'
It is quite difficult to find a admob package that works with React native, but there are some ways. This page can help you, try the instructions mentioned in the answers and make sure you install the correct packages.

trying to create a bare-bones CocoaPods to share a few models but pod update doesn't seem to work

EDIT #1
it looks like this worked:
pod update JTModels
I have two projects and want to share some models between them. I have created a sample project located here:
https://github.com/trestles/JTModels
and I have a sample project that has the following Podfile:
platform :ios, '7.0'
pod 'JTModels', :git => 'https://github.com/trestles/JTModels.git'
the problem is that I bumped the Version number in my podspec to 0.0.5 but when I run pod update in my sample, it stayes at 0.0.4. Deleting out the Podfile.lock works but, to best of my knowledge, is not how this should be handled.
Mon Jan 26$ pod update
Update all pods
Analyzing dependencies
CocoaPods 0.36.0.beta.1 is available.
To update use: `sudo gem install cocoapods --pre`
[!] This is a test version we'd love you to try.
For more information see http://blog.cocoapods.org
and the CHANGELOG for this version http://git.io/BaH8pQ.
Pre-downloading: `JTModels` from `https://github.com/trestles/JTModels.git`, commit `12ad2cc2912d69baed6898e11b78d54c52102ba5`
Downloading dependencies
Installing JTModels 0.0.2 (was 0.0.2)
Generating Pods project
Integrating client project
Mon Jan 26$ less Podfile
What am I doing wrong? I have tried pod outdated but same result.

Resources