How to get matching versions of Firebase SDKs for the C++ SDK - firebase

We are going to use Firebase C++ SDK for multiple projects, but we are not using cocoapods so we are manually downloading the Firebase SDKs as pointed out in the documentation from here:
https://firebase.google.com/docs/ios/setup#frameworks
https://firebase.google.com/docs/cpp/setup#available_libraries
The Firebase readme file from the downloaded C++ SDK (readme.md) states the following:
Important: Each version of the Firebase C++ SDK supports a specific version of the Firebase iOS SDK. Please ensure that you reference the Cocoapod versions listed above.
The download link from the documentation doesn't have multiple links for each version.
Edit: modified text and images with correct versions
Is there a place where we can download specific versions of the SKDs?
How can we make sure that the download versions are compatible with each other?
Just downloaded both sdks and from the readme:
- C++ SDK is version 5.6.1 and requires Firebase/Core Cocoapod (5.20.0)
- Objective-C SDK has Firebase version 5.20.2
The Objective-C library is a bigger version then requirement of the C++ one (5.20.2 > 5.20.0) but is this property enough to assure compatibility?
See below images for readmes:
readme.md - C++ SDK
README.md - Objective-C SDK

First off it seems that Google forgot to make a branch for the iOS version 5.20.2 (on git currently only this exists: https://github.com/firebase/firebase-ios-sdk/tree/release-5.20.0 )
Considering that only the last number was incremented, let's assume there aren't big changes between the two versions, so we can check 5.20.0.
Your issue is that in the C++ SDK's readme for the iOS part they don't specify exactly the obj-c counterparts but the pods version. You can use the pods files though to check if the versions correspond.
For example we can check "Firebase Auth": in the C++ SDK says that it uses the 5.20.0 pod for ios, which is this one: https://github.com/firebase/firebase-ios-sdk/blob/release-5.20.0/FirebaseAuth.podspec
FirebaseAuth.podspec
We can see in the file that the version of Firebase Auth for the obj-c 5.20.0 SDK is 5.4.2, as it is in your readme.
You can do the same for all necessary services to make sure the compatibility is maintained.
I have no idea unfortunately if you can check this in an automatic way.

Related

Crashlytics could not find the resource file generated by Google Services

Crashlytics could not find the resource file generated by Google Services.You may need to execute the :processGoogleServices Task
i read the solution from this qusetion Crashlytics could not find the resource file generated by Google Services. You may need to execute the :process<Variant>GoogleServices Task
but i didn't succeded to run this command in my unity project
./gradlew :app:processProdReleaseGoogleServices or ./gradlew :app:processDevReleaseGoogleServices
how can i run it?
A tricky bit with the Unity SDK is that because Firebase still supports versions of Unity that predate a total move to gradle (I believe 2019.4 is when Unity switched over entirely, the earliest supported version right now is 2017.4), many Android specific solutions (such as the one you linked) won't function. If you did want to try it, you can select "Export Project" in your build settings -- but I don't think this will help:
It sounds instead like you're missing Plugins/Android/FirebaseApp.androidlib or Plugins/Android/FirebaseCrashlytics.androidlib. These are generated by the Firebase plugins (obviously FirebaseCrashlytics.androidlib is specific to Crashlytics -- you won't see that one otherwise) as part of a processing step to simulate what the Play Services gradle plugin would do in a typical Android application or game.
Some things to try:
Make sure you're on a supported version of Unity (2017.4 or newer -- Firebase does not officially support alphas or betas).
Ensure that you have a valid google-services.json file added and that Crashlytics has been added to your backend (full instructions here to redownload).
Re-add FirebaseCrashlytics and ensure that you leave everything checked.
Ensure that you have the latest Crashlytics plugin (currently 7.1.0). You can download just Crashlytics now from this site, but make sure you don't mix and match versions with other Firebase plugins.
And if none of these work, sometimes small changes in build environments expose unexpected issues. Your best bet will be to file an issue here with everything you've tried.

What is the latest stable Flutter build to be using Firebase?

I'm trying to add Firebase authentication to my app. I've gone through the process of linking firebase with my app, but when I get to Step 4.6 and try running my app with the Firebase plugins installed, I get the following error:
Note: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-1.0.2\android\src\main\java\io\flutter\plugins\firebase\core\FlutterFirebaseCorePlugin.java uses or overrides a deprecated A
PI.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_analytics-7.1.1\android\src\main\java\io\flutter\plugins\firebaseanalytics\FirebaseAnalyticsPlugin.java uses or overrides a depre
cated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_auth-1.0.1\android\src\main\java\io\flutter\plugins\firebase\auth\FlutterFirebaseAuthPlugin.java uses or overrides a deprecated A
From what I understand, I need to wait for the Firebase team to update their plugins before I can use them with the latest version of Flutter
Flutter 2.0.2 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 8962f6dc68 (2 weeks ago) • 2021-03-11 13:22:20 -0800
Engine • revision 5d8bf811b3
Tools • Dart 2.12.1
Does anyone know the latest stable build that the Firebase API works on? These particular errors don't stop the build from completing, however if I try to use the playstore plugin, for example, it crashes the build script. For now I'll try to find a compatible stable build myself. I'll update this post when I find it.
Latest stable flutter build is 2.0.3. Many Firebase plugins have been migrated already to null-safety. Everything is working as a charm for me while using latest versions of dependencies for Firebase from Pub.dev, even for flutter web.
I think it might be something in the play-store plugin implementation however.

Firebase for tvOS without Cocoa Pods

Are there Firebase Frameworks specifically built for tvOS like https://firebase.google.com/download/ios? Right now, I am trying to use Firebase without CocoaPods. I have been successfully linking Crashlytics and Fabric frameworks without issue. When I attempt to link Firebase, I get the following error...
ld: in FirebaseAnalytics/FirebaseCore.framework/FirebaseCore(FIRAnalyticsConfiguration.o), building for tvOS, but linking in object file (FirebaseAnalytics/FirebaseCore.framework/FirebaseCore(FIRAnalyticsConfiguration.o)) built for iOS, file 'Firebase/ios/FirebaseAnalytics/FirebaseCore.framework/FirebaseCore' for architecture arm64
Firebase does not publish pre-built binaries for tvOS.
Details about tvOS support at https://github.com/firebase/firebase-ios-sdk#tvos-macos-and-catalyst
Follow the open issue at https://github.com/firebase/firebase-ios-sdk/issues/4550
Update March 2020: The Firebase zip distribution includes tvOS slices since the 7.4.0 release. See https://github.com/firebase/firebase-ios-sdk/releases/tag/7.8.1 for the current version.

Cannot find com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable class

My build.gradle is:
// for facebook account kit
compile 'com.facebook.android:account-kit-sdk:4.+'
// for google firebase database
compile 'com.google.firebase:firebase-database:9.6.0'
// for google firebase cloud messaging
compile 'com.google.firebase:firebase-messaging:9.6.0'
After rebuild project,a error happens.
Error:(74, 27) error: Cannot access AbstractSafeParcelable
Cannot find
com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable class
==============================================
Resolution:
The reason is that after rebuilding the project, gradle download the latest version of "account-kit-sdk" to 4.25.0, the new version changes some about gms, so make some conflicts with firebase messaging,
So I downgrade the account-kit-sdk version, change import version from "account-kit-sdk:4.+" to "account-kit-sdk:4.24.0"
Then the issue has been resolved.
But I think it is not the best resolution about this problem.
Welcome friends add some new ways to resolve this issue.
Thanks.
Version 4.25.0 of com.facebook.android:account-kit-sdk has a dependency on com.google.android.gms:play-services-auth-api-phone:11.0.1 that is not present in version 4.24.0. com.google.android.gms:play-services-auth-api-phone adds many transitive dependencies on other com.google.android.gms modules, including base, basement, tasks, auth, and auth-base.
The Firebase libraries also have transitive dependencies on numerous com.google.android.gms modules. If the version numbers of all of the Firebase and Play Services modules in a build are not the same, problems such as this one occur.
A simple solution is to use version 11.0.1 of all Firebase and Play Services libraries you list in your gradle dependencies:
// for google firebase database
compile 'com.google.firebase:firebase-database:11.0.1'
// for google firebase cloud messaging
compile 'com.google.firebase:firebase-messaging:11.0.1'
You should also specify a fixed version number for the Facebook library to make your build predictable and repeatable:
compile 'com.facebook.android:account-kit-sdk:4.25.0'
The risk of specifying the version as "4.+" is that when a new version is released that has transitive dependencies on a new version of the Play Services libraries, the new Facebook lib version will be automatically used and your build will break again.
To debug problems like this one, you can open the Gradle window in Android Studio and double-click on :app -> Tasks -> android -> androidDependencies to generate a dependency tree. The tree can then be examined to find version mismatches.

How to compile realm-cocoa with source code

Our company's svn cannot allow single file larger than 40mb, realm framework needs 140mb+,so how can I build realm-cocoa with source code on github?
You could instead use the dynamic framework, which is a lot smaller (28,5 MB), through being already linked, but you won't be able to support iOS 7 in that way.
Alternatively I would recommend using a dependency manager like CocoaPods, which helps you with the setup and integration. But as a Core Member of this project, I'm obviously biased in that regard.
If that shouldn't be available for you, then you could theoretically use SVN externals to checkout the realm-cocoa repo (GitHub supports SVN transports), add the Realm.xcodeproj to your Xcode project, set the iOS framework target as dependency target of your app target and link to Realm.framework. But please not that this is not an officially supported way of integration.

Resources