Crashlytics not showing some crashes - ios

I've added crashlytics in my app and I've uploaded a build in our private download site which is available for test users. The version which I had uploaded my build used crashlytics version 3.9.0. In my fabric dashboard I was getting crashlog and last crash log was dated last Thu, Nov 9. For past few days(since last friday) I've been getting report from users that they have experienced few crash which they are unable to reproduce and happens occasionally. But when I look at the fabric dashboard I don't see any new logs, the last log still dates Nov 9. Is there any reason why the latest crashes since last friday has not been updated on crashlytics. I've seen that crashlytics has released a new version 3.9.3. Could that be the issue? Will I need to update my crashlytics library in my app and re-upload the build for new crash reports? Any help is appreciated.
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
//Initialize crashlytics
[Fabric with:#[[Crashlytics class]]];

Related

Firebase Crashlytics not showing Logs after SDK upgrade in iOS App

My app is using Crashlytics which is moved from Fabrics to Firebase Crashlytics. My problem is that I recently upgraded firebase Crashlytics and after this upgrade there is no "Logs" displaying with crash report. I cross checked all settings and code but couldn't find any possible reason.
It was working properly before upgrade. Now all crashes are being reported properly as all the information such as "Stack Trace", "Keys" are as before but "Logs" section is empty.
My question may be an "iOS Duplicate" of this question. Anybody please tell me if there is any part of code I'm missing to get this "Logs" data.
Here is the code I setup in my AppDelegate for configuration :
FirebaseApp.configure()
FirebaseConfiguration.shared.setLoggerLevel(.min)
Crashlytics.crashlytics().setCrashlyticsCollectionEnabled(true)
Just to confirm, are you capturing log messages with Crashlytics.crashlytics().log()? See https://firebase.google.com/docs/crashlytics/customize-crash-reports?platform=ios#add-logs

Stop tracking Crashlytics runtime in iOS

I've just integrated Crashlytics with iOS and it's quite easy integration steps. I started session of crashlytics in didFinishLaunchingWithOptions with code [Fabric with:#[[Crashlytics class]]]; and its start tracking.
At some point in App I want to stop tracking of Crashlytics so how Can I do this? Is there any code for this? There is a way to stop tracking from online Dashboard in Crashlytics but I want to do from Code.
Looking for suggestions and help.
Thanks.
Xcode debugger does NOT allow Crashlytics to process crash reports.
if you have your device connected to your Mac, XCode's debugger will step in as well. So just disconnect the device before testing.
To make sure a crash is reported during your simulator testing:
Launch simulator
Press stop
Launch your app and force a crash
Relaunch the app from simulator
See the crash report in the web dashboard
Reference
Mike from Fabric here. I believe you're looking to kill an active Fabric session once it's been started with the same launch/session of the app.
In that case, there is not a way to kill the SDK session. I'd recommend wrapping the Fabric init in a conditional call or boolean check to see if Fabric should be initialized or not.

Crashlytics installing - stuck on verifying installation step 2 of 2

I want to add Crashlytics to my project and I made everything according to Fabric Mac app and I now stuck at
Step 2 of 2 when verifying installation
I've added:
[Fabric with:#[[Crashlytics class]]];
to method:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
and I added imports too:
#import <Fabric/Fabric.h>
#import <Crashlytics/Crashlytics.h>
App is launched but in Fabric app there is still progress and nothing.
When I set debugMode to Yes I get these infos:
2016-07-13 11:23:21.689 Archimedes Cool[8565:3143059] [Crashlytics]
Version 3.7.2 (112) 2016-07-13 11:23:21.789 Archimedes
Cool[8565:3143059] [Crashlytics] Running on iPad4,4, 9.3.2 (13F69)
2016-07-13 11:23:21.883 Archimedes Cool[8565:3143059] [Fabric]
Initialized with kit versions: { "com.twitter.answers.ios" = "1.2.1";
"com.twitter.crashlytics.ios" = "3.7.2"; "io.fabric.sdk.ios" =
"1.6.7"; }
2016-07-13 11:23:22.555 Archimedes Cool[8565:3143092] [Fabric] failed
to download settings Error Domain=NSPOSIXErrorDomain Code=2 "No such
file or directory"
UserInfo={NSErrorFailingURLKey=https://settings.crashlytics.com/spi/v2/platforms/ios/apps/cz.ai.Archimedes-Cool/settings?build_version=1.24.3.4537&display_version=1.24.3&instance=a5697790406418f18d7057545ad7cf5cc23e431d&icon_hash=db9967486042bc2829965401b58f06c932384acd&source=1,
NSErrorFailingURLStringKey=https://settings.crashlytics.com/spi/v2/platforms/ios/apps/cz.ai.Archimedes-Cool/settings?build_version=1.24.3.4537&display_version=1.24.3&instance=a5697790406418f18d7057545ad7cf5cc23e431d&icon_hash=db9967486042bc2829965401b58f06c932384acd&source=1}
I've tried it with real devices (iPad and iPhone) but not in simulator. I even tried to install it via CocoaPods but same problem. Can anyone help me? Thanks
From this answer:
this appears to happen when there is a method being called after the
Fabric init that is removing the temp directory of the app.This can
result in a race condition where new data is being written for other
Answers events, but new sessions are not recorded properly.
Move the Fabric initialization in the end of the didFinishLaunchingWithOptions in order to avoid other methods to override or delete the app's temp directory

iOS Crashlytics - Block crash reports from being send to server

I have installed the Crashlytics to my app, It's working fine and sends crash reports to the server.
But in my app setting, I'm having new option as "Send crash reports" switch.
So if the user toggle off the switch in setting page, It should block the Crashlytics report from being send to its server.
But i'm not seeing any option in the Crashlytics framework to block the reports or even stop the Crashlytics from running.
Is there any way to block the reports or stop the Crashlytics from running?
Once the setting changes, you can make sure Crashlytics is not enabled once the app restarts. In your app delegate, you can check for the setting and then enable Crashlytics.
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
//Crashlytics
//Check setting
if ([[NSUserDefaults standardUserDefaults] boolForKey: #"CanSendCrashReports"])
{
[Fabric with:#[[Crashlytics class]]];
}
}

Crash is not reporting to Crashlytics Dashboard from a App Store App

We have application released on iOS app store. And as per the guidelines the crashlytics SDK is integrated and also calling [Crashlytics startWithAPIKey:#"API_KEY"] as well. What could be the different reasons that the crashes are not getting updated on the Crashlytics Dashboard.
How we can verify or debug, the app which having the Crashlytics sdk integrated and initialised appropriately or not?
Before you launched, did you verify that crashes were getting reported? If not, then you may have a conflicting Exception/Signal Handler preventing Crashlytics from doing it's job.
Here's how you can throw a signal:
-(void) throwSignal {
int i = 12345;
NSLog(#"%#", i);
}
To throw an uncaught exception simply do the following:
[NSException raise:#"test version 3.3.2 crashy" format:#"awesomeness"];
If you were able to get crash reports before launch, then there may be something happening with Crashlytics ingest of the reports and I would contact their support team.
We are getting now crash reports for app store build. We had a provided .dSym file to the crashlytics team, they have uploaded the same in their db.

Resources