Doesn't get Crash Report in Crashlytics? - ios

Friends I am integrate Crashlytics using Fabric SDK. According to steps follow and Adding Fabric and Crashlytics framework in project. also adding code in AppDelegate as below.
Fabric.with([Crashlytics()])
after make a IPA file of APP and Distribute on Fabric and invite to Client. Client Download the IPA. He say App is Crash on device. But In Crashlytics doesn't get any crash report.
please help me what is missing, I doesn't get any Crash report.

If the application is crashing at the launch of the application then it will not be reported else it will be reported.
To cross check you can do force crash in Crashlytics.
Refer this link

Make sure you have added the API Key and the Build Secret CORRECTLY in your Run Scripts.
You can find the API Key and Build phases in your Crashlytics account here
Go to Xcode Project > YOUR TARGET > Build Phases > Run Script.
ADD the Command as shown below replacing your API Key and Build Secret.

From Xcode 7. By default in build setting -> enable bitcode is set to YES.
You need to make it NO. And then check.
This works for me. As per my Reading app need to send the crash reports to fabric. But if the Enable bitcode is YES then you need to download the DYSM file from Xcode and upload it manually to fabric.
check Advanced Fabric setting

Related

Can't get debug token for Firebase App Check for my Flutter iOS App

So I recently started setting up app check for my existing Flutter project (for both android and iOS platforms). I've had no problem with android's "Play Integrity", got the necessary debug token, and can successfully send and retrieve data to/from firestore (app check for firestore is currently enforced for my project).
The problem is, I can not get such a debug key for my iOS app. I will list the sources I've used and what I've tried so far.
I have firebase_app_check: ^0.1.1+8 installed via pubspec.yaml
I also added pod 'FirebaseAppCheck' to my Podfile
I have the necessary initialization code in my main.dart: await FirebaseAppCheck.instance.activate(...);
For "DeviceCheck", I am using THE SAME private key that I am using
for "Sign in With Apple" (which I have implemented successfully). I
have also enabled the checkbox for DeviceCheck in the settings of
that private key (in Apple Developer).
For my App ID (Apple Developer > Identifiers > App IDs), I have also
enabled the checkbox for "App Attest".
I have put "-FIRDebugEnabled" as an argument passed on launch in
XCode > Product > Scheme > Edit Scheme.
I always uninstall my app from my iOS simulator (iOS 16.2) or real device (iOS 16.1.2),
before trying again, because I have read across multiple forums that
the debug token only gets printed to the output the first time you
run your app.
I have also added these 4 lines of code in my AppDelegate.swift from here:
#if DEBUG
let providerFactory = AppCheckDebugProviderFactory()
AppCheck.setAppCheckProviderFactory(providerFactory)
#endif
Official firebase docs "iOS+ (App Attest)":
I have NOT copied ANY code from this page of the official docs, as I assume it's for native iOS apps only, and not for flutter, and I don't know where exactly I would have to put that code. I have only added the pod dependency and run pod install.
I don't have a .entitlements file.
So after all those steps, I'm apparently supposed to expect to find a debug token in my run output, as in:
Yet the only relevant output I can find is the following:
Runner[72719:33546579] 10.3.0 - [FirebaseFirestore][I-FST000001] AppCheck failed: 'The operation couldn’t be completed. (com.apple.devicecheck.error error 1.)'
If it matters:
I have NOT YET uploaded my iOS app to apple developer, app store connect or whatever (I'm not yet familiar with the process of publishing to the app store).
Neither have I uploaded my android app to Google Play console or created an app there (for this project).
Don't tell me anything about firestore rules. I already had that set up long ago, and everything worked just fine before I started integrating App Check.
Don't recommend any 3rd party plugins to me, I will only use official ones.
The firebase documentation says:
Tip: Confirm in your Xcode project's build settings that it passes the DEBUG flag to the Swift compiler
Try removing the '#if DEBUG' and '#endif' and run the app.
If it works, it mean you have missed that step
I was not able to find that build setting, so i just removed those lines from the AppDelegate, but i need to keep in mind to remove the other 2 lines while building the release mode
See this answer on the flutterfire Github issues page. Basically, call setAppCheckProviderFactory before GeneratedPluginRegistrant.register(with: self) in the app delegate file. I was investigating the same issue and it fixed it for me (the debug token was instantly printed out in Xcode's debug output). Hope it helps you as well!

Crashlytics report can be generated only after re run the app

I just implemented Fabric Crashlytics tool to my Xcode project via Swift Package Dependencies.
All works good if I enable Google Analytic on a step when I create an app, without this step I did not received crash reports, so I switched to the app with Google Analytic enabled.
I've tested crash button from the link:
One comment that I don't like from there
"After your app crashes, run it again from Xcode so that your app can
send the crash report to Firebase."
Does it mean that user has to reopen app to send crash report? For example if a user download an app from the App Store and then somehow the app is crashed. Does mean that reopening app required for sending that crash? And if the user will not open the app it means I lost this crash report? I understand that on live store there is no option to re run it form Xcode, but reopening seems a require step.
I suppose the crash report should work different a bit by sending issue details right after a crash, I may be wrong here.
Also when I set everything via Swift Package Dependencies looks like I don't have an option to upload dSYM via this option
/path/to/pods/directory/FirebaseCrashlytics/upload-symbols -gsp /path/to/GoogleService-Info.plist -p ios /path/to/dSYMs
Does this mean I need to pull Fabric and Crashlytics from CocoaPods?
I've switched off bitcode at the moment and looks like all is works automatically but not sure it is good idea for long perspective.
Yes, crashes will be uploaded when restarting the app after it crashes. As far as I know, this is because the SDK may not have enough time to actually send the report when the crash happens.
If you are using Swift Package Manager, you still have that option.
This is the command:
"${BUILD_DIR%/Build/*}/SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run"
If the app has bitcode enabled, then you'll need to download the dSYMs from the App Store and upload them manually.
Lastly, Fabric is now deprecated so don't download it. You don't need to use Cocoapods if you are already integrated Crashlytics with SPM.

Unity Firebase Analytics 6.15.2 crash

I have implemented Firebase Analytics 6.15.2 into my project, then I have builded the Xcode project and have run it on the device, everything went perfect, but when I try to open the app afterwards, without it running from Xcode - it crashes after 20 seconds of launch screen.
So I have no logs and anything, I somehow figured out it's an issue with Firebase and downgraded the pods in the Xcode project to Firebase 5.3.0, it worked.
I have other projects where the same issue is occurring.
So my question is, how do I fix it? Because there is no way it's happening to everyone, I might be doing something wrog here and I just don't see it.
I use Unity 2020.1.2f1
Firebase Core + Analytics 6.15.2 via Package Manager (also tried installing it manually, still the same)
Other plugins I am using are Facebook and ironSource
ps. The funny thing that it crashes on all devices, but it passes Apple review because they test it in some kind of debug mode, but when it's in release mode - it crashes.
Have you tried to reinstall Firebase Analytics 6.15.2? Also, you can try to restart your device and try to make it work again.
You need to add the debug symbols to your app debug archive file:
Select your Target -> Build Settings -> Build Options -> Debug
Information Format
Then Select DWARF with dSYM file for the debug mode.

iOS Firebase + Fabric Beta Crashylitics Not Reporting Issue

I've just recently installed Fabric to a project which already had Firebase installed and suddenly Crashyltics has stopped working. It's not included within the 'Fabric.with([])' call on AppDelegate.swift but I wondered if Fabric and Firebase were cancelling out Crashyltics. I'm using Fabric for it's Beta option and everything else is inside Firebase.
I can force a crash inside the app - But not getting anything reported in either Dashboard.
My run Script Phase is also correct.
My Debug is DWARF with DYSIM.
Cleared derived data etc.
Firebase is called after Fabric inside AppDelegate.
Thanks
I think that you have to link your firebase and fabric apps.
Go to https://fabric.io/firebase_migration/status, click on link apps and select the apps to link (the one on fabric and the corresponding app on firebase)
Do you upload your dSYM to Firebase/Crashlytics? If not it can be the issue.

Unable to upload missing DSYM files In Fabric Crashlytics with Bitcode enabled to NO

I have Implemented Fabric Crashlytics in my project manually. And in my application I'm using an external device connection for that I'm using an SDK, so for that SDK I have set bitcode to NO in my project. Before It used to work fine and I used to find my crash reports in crashlytics. But all of a sudden since from a week It is asking for missing DSYM files, and I'm not able to find any crash reports in crashlytics Dashboard. I have followed Fabric Doc and tried to upload DSYM zip files manually. But no luck as I got stuck in the same page with processing message as shown in below link.
enter image description here
https://docs.fabric.io/apple/crashlytics/missing-dsyms.html
Can any one walk me out from this? Thanks In Advance.

Resources