Firebase Crashlytics IOS SourcePackages not found - firebase

I tried setting up Firebase Crashlytics to my React Native project.
I received the following error when I was building the project after I added the build phase script.
Script I added from the firebase guide (can be found here) :
Error:
MY-APP-ABC/SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run:
No such file or directory
When I look in the folder of MY-APP-ABC, I don't see the SourcePackages folder anywhere.

If you installed firebase using cocoa pods use:
"${PODS_ROOT}/FirebaseCrashlytics/run"
If you installed firebase using Swift Package Manager use:
"${BUILD_DIR%/Build/*}/SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run"

Related

React Native Firebase Dynamic Links

I am using react native firebase dynamic links, after completing my setup, i tried to use it, but i faced this error .
APP ERR Error: You attempted to use a firebase module that's not installed natively on your iOS project by calling firebase.dynamicLinks().
Ensure you have either linked the module or added it to your projects Podfile.
I tried pod install but still have the error

Correct way for using Firebase SDK in Expo

In Expo's official document - Firebase SDK setup it is given that we need to store Firebase SDK. From some other articles I got to know that it should be stored in some javascript file. But now the question is how do I connect it with my App.js file or any app related file.
So for now I have just imported the file in the my App.js file but not using it in other pages. If I don't do this I receive an error saying "Firebase not initialized".
Should I add the SDK code in App.js file itself or is there any proper way to work with this ?

Firebase Crashlytics NDK unstripped files

I have an SDK that uses C++ code. The SDK exports 4 different modules in a maven repo that I publish on either a local maven repo or on GitHub packages.
The apps that consume the SDK should be able to use Firebase Crashlytics and get reports of crashes in the native code as well.
The first problem I have is that I need to provide to the Firebase plugin the folders unstrippedNativeLibsDir and strippedNativeLibsDir:
firebaseCrashlytics {
nativeSymbolUploadEnabled true
unstrippedNativeLibsDir "???"
strippedNativeLibsDir "???"
}
If I go to the project where I build the SDK I can see: build/intermediates/merged_native_libs/release and build/intermediates/stripped_native_libs.
Are these the unstripped and stripped folder respectively?
Is there any documentation about what exactly those folders are supposed to contain?
Anyway if I configure the app firebaseCrashlytics to point to these folders I still need to fix another issue.
I get:
Crashlytics could not find NDK build tasks on which to depend. You many need to manually enforce task dependencies
It looks like since I'm building the libs that use the NDK in another project, then the Firebase plugin does not work.
What am I supposed to do?
Is it possible to get the Crashlytics NDK working even if I build the libraries independently with a separate project?
The only way I made it work was to build the libraries along with the app. The libraries were in separate repos anyway but I included them as sub-repositories in the app.
In this way, you solve the issue of not finding NDK build tasks on which to depend.
I know this is not the answer though

Is it required to add Firebase Analytics to build.gradle?

I am following the instructions here to add Firebase to my Flutter project. I want to use Firebase Analytics so I added it in pubspec.yaml
The package page for Firebase Analytics does not mention anything about adding Analytics as a dependency in android/app/build.gradle
No such thing is mentioned in Firebase for Flutter page either which I linked earlier. Now when registering the app in Firebase Console, it asks to add implementation of Firebase Analytics in app level build.gradle
So do I need to add it or not as it looks like only Firebase Console wants me to add it but couldn't find any mention of it on any official Flutter page.
I had the same question as well. Is seems obvious, that you should add the dependency on com.google.firebase:firebase-analytics to your project.
But… You actually don't need it.
It's easy to test! Just set up the Firebase Analytics like it is described in the docs:
google-services.json
apply plugin: 'com.google.gms.google-services' (and related things)
Configure multidex
firebase_analytics: ^X.Y.Z in pubspec.yaml
Don't add any Firebase dependencies to you app/build.gradle!
Now, enable the DebugView in Firebase Analytics: adb shell setprop debug.firebase.analytics.app your.package.
Run the app and send some events. Open the DebugView in Firebase Analytics console and you'll see them all!
Probably, all the magic happens in the Google Services Gradle Plugin:
The google-services plugin has two main functions:
Add dependencies for basic libraries required for the services you have enabled. …
You can see the result of this step by running ./gradlew :app:dependencies.
So, the plugin seems to add them for you!
You could also check what dependencies will be autoconfigured, by running ./gradlew :projects from your android dir. Mine is:
Root project 'android'
+--- Project ':app'
+--- Project ':firebase_analytics'
\--- Project ':firebase_core'
Now, after I add firebase_auth to my pubspec.yml and run flutter pub get, this command indeed lists one extra project:
Root project 'android'
+--- Project ':app'
+--- Project ':firebase_analytics'
+--- Project ':firebase_auth'
\--- Project ':firebase_core'
Adding the Google Analytics for Firebase SDK in your app and enabling analytics settings in the Firebase console is optional. It depends on what Firebase product you will be using. If Firebase suggests you add the Analytics SDK, it means that the Firebase product has integration with Analytics. See this documentation for your reference.

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.

Resources