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
Related
I am a Unity game developer and know very little about app side code, so forgive me if I'm doing something stupid.
I'm trying to set up Firebase to work in my Unity iOS app. I'm in the very first setup, trying to get the SDK working.
So Firebase has you do a couple steps, and then they want you to do some initialization in your App Delegate. They want you to add two lines, an import and a configure. This is the code from their setup section.
#import UIKit;
#import Firebase;
#implementation AppDelegate
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[FIRApp configure];
return YES;
}
So Unity doesn't actually use a traditional AppDelegate. I went sleuthing and found this guy's work. He basically shows how to use a standard Unity Plugin to override the app delegate. So I put the following code in my Plugins folder.
#import "UnityAppController.h"
#import Firebase;
#interface OverrideAppDelegate : UnityAppController
#end
IMPL_APP_CONTROLLER_SUBCLASS(OverrideAppDelegate)
#implementation OverrideAppDelegate
-(BOOL)application:(UIApplication*) application didFinishLaunchingWithOptions:(NSDictionary*) options
{
NSLog(#"[OverrideAppDelegate application:%# didFinishLaunchingWithOptions:%#]", application, options);
[FIRApp configure];
return [super application:application didFinishLaunchingWithOptions:options];
}
#end
Now. I'm pretty sure the Plugin is working because I can find it in my XCode project, and when I was screwing around with it and had two instances of [FIRApp configure]; it actually crashed with an error basically saying, "don't configure twice". But Firebase has not received anything from my app. They have a little prompt that says, "Checking if the app has communicated with our servers. You may need to uninstall and reinstall your app." I've uninstalled, reinstalled, tried their whole installation process again, and still nothing.
Any thoughts?? Thanks ahead of time.
If you're developing an app in Unity you can use the Firebase for Unity plugin rather than implementing your own iOS solution. Try adding Analytics to your app with this guide.
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]]];
trying to install Fabric Crashlytics on my Cordova project
I followed all the steps and installing all rquired steps with building the project , but at the final step i got stuck there without any action
here is my AppDelegate.h
#import "AppDelegate.h"
#import <Fabric/Fabric.h>
#import <Crashlytics/Crashlytics.h>
#implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[Fabric with:#[[Crashlytics class]]];
return YES;
}
#end
after I build the project it's stuck there without any action
^^ this screen waits for 1 minute then it's cahnged to
I checked the info.plist and seems good without any problem
Mike from Fabric here. We don't have support for Cordova based projects. We need to see a build and run of your app with Fabric enabled. I'd recommend a clean, build and run with Fabric enabled on a device to see if that helps.
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]]];
}
}
I tried to integrate Fabric in iOS project. I followed the steps from the tutorial:
Add a run script Build Phase
In AppDelegate.m
Implementation:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[Fabric with:#[CrashlyticsKit]];
return YES;
}
Run project
However at last check application crashes:
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Kit info missing for Crashlytics kit'
What is wrong?
You probably already imported these files, but for future readers, you should also have in AppDelegate.m:
#import <Fabric/Fabric.h>
#import <Crashlytics/Crashlytics.h>
You should also have Fabric.framework and Crashlytics.framework in your Frameworks (project -> target -> link phases -> link binary with libraries).
You should also have Fabric RunScript in Link Phases:
./app/path/Fabric.framework/run key1 key2
If you followed Fabric.app tutorial, you should have all these steps configured. Did you follow it? Fo you have all above items?