Kit info missing for Crashlytics kit xcode - ios

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?

Related

Issues setting up Firebase SDK with Unity iOS

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.

objective-c Fbric crashlytics "Hmmm, seems like your kit isn't activating."

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.

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

EXC_BAD_ACCESS with GCM 3.0

I'm trying to integrate GCM v3 into a cocos2d-x v3.6 project, and after a few days of getting things working with CocoaPods and Xcode, I finally was able to build the app. However, when deployed on device for testing, it crashes on calling [[GGLInstanceID sharedInstance] tokenWithAuthorizedEntity:_gcmSenderID scope:kGGLInstanceIDScopeGCM options:_registrationOptions handler:_registrationHandler] with the error EXC_BAD_ACCESS. What gives?
Screenshot: http://i.imgur.com/s0HnxTp.png
My configuration is as follows:
daffodilistic$ pod --version
0.39.0.beta.4
daffodilistic$ cat Podfile
platform :ios, '8.1'
source 'https://github.com/CocoaPods/Specs.git'
target 'project-redacted iOS' do
pod 'Google/CloudMessaging'
end
target 'project-redacted Mac' do
end
I managed to debug and resolve the exception successfully - apparently, it's caused by a NULL or 0x00000000 value being pointed to by the #property(nonatomic, retain) void (^registrationHandler) block property declared earlier on as per Google's sample GCM v3 code for iOS. As to whether it was Xcode, iOS or cocos2d-x causing the block declaration to be dereferenced/deallocated, I'm not sure.
The solution was to move the (^registrationHandler) block declaration from
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
to
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
Related SO link which was useful, but not really crucial: unable to register (com.google.iid error 1005.)

iOS GMSService undeclared identifier error

I am getting:
Use of undeclared Identifier GMSServices
error when using Google Maps IOS SDK. Below is the code in AppDelegate.m:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
googleMapsApiKey = #"AIzaSyB2x3fulSTaAE6F6sHgnLEHXpGt";
[GMSServices provideAPIKey:googleMapsApiKey];
}
I have added the GoogleMaps.framework and GoogleMaps.bundle to the project Frameworks folder (Google Maps 1.9.2 with Xcode 6.4).
I am using a mixed Objective-C and Swift project. My bridging header file contains
#import <googleMaps><googleMaps.h>
Under Targets and Build Settings, the Objective-C Bridging Header is showing the correct path.
I have refreshed my server and IOS keys to no avail.

Resources