Flurry crashing in iOS - ios

Create a single view application.
In AppDelegate.m, put this method:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
[Flurry startSession:#"YOUR_TEST_FLURRY_APPID"];
NSString* event = [NSString stringWithUTF8String:"TEST_EVENT"];
[Flurry logEvent:event];
return YES;
}
Include Flurry SDK in your project.
Enjoy crash on any iPhone :)
Can somebody know, why?
-- UPDATE --
You can find full project here: https://github.com/maltsevda/FlurryCrash
Crash log here: https://drive.google.com/file/d/0Bwv2y5Duq2tyMFNYZmRhUG0yUzg/view?usp=sharing

This is a legitimate crash on Flurry 6.3.0. It was caused by calling logEvent too quickly after the startSession.
We have fixed this in 6.4.0 which was released this month. Please give that version of the SDK a try.
Disclaimer: I work at Flurry.

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.

How to add Firebase to Codename One iOS app?

I am trying to add Firebase to my Codename One iOS app.
I've read up on how to add Native Interfaces in Codename One and have successfully added the CocoaPods for Firebase as well. However, being unfamiliar with Objective-C and iOS in general (I've never worked on an iOS app outside of the Codename One framework), I'm not sure how to integrate these instructions from the Firebase website into my interface:
#import UIKit;
#import Firebase;
#implementation AppDelegate
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[FIRApp configure];
return YES;
}
As well as the instructions here: https://firebase.google.com/docs/analytics/ios/start?authuser=0,
specifically:
Import the Firebase module in your UIApplicationDelegate subclass:
OBJECTIVE-C
#import Firebase;
Configure a FirebaseApp shared instance, typically in your application's application:didFinishLaunchingWithOptions: method:
OBJECTIVE-C
// Use Firebase library to configure APIs
[FIRApp configure];
I added the .plist file to my native -> ios folder.
EDIT: I want to use the following Firebase features: analytics and crash reporting to start with, eventually notifications.
Can someone advise how this would be done?
Thanks!
Add the build hints:
ios.afterFinishLaunching=[FIRApp configure];
ios.glAppDelegateHeader=#import <Firebase/Firebase.h>
The rest of the things you can just invoke in the native interface code. Notice the tip to wrap the code in async blocks https://www.codenameone.com/blog/tip-use-native-edt.html

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]]];
}
}

Integrating Intercom into Swift iOS app

I am trying to use the Intercom iOS SDK in a Swift app that I am building. However, all their documentation is written in Objective-C. As I am just starting out I am not quite sure how to implement Intercom in my application.
I've added "pod 'Intercom'" to my Podfile and added the import statement to my bridging header.
The next step in setting up intercom in an iOS app is initializing it in my applications AppDelegate with the following code:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Initialize Intercom
[Intercom setApiKey:#"<#ios_sdk-...#>" forAppId:#"<#your-app-id#>"];
}
And then using objective-c code in my swift view-controller like so:
- (void)successfulLogin {
...
// Registering with Intercom is easy. For best results, use a unique user_id if you have one.
[Intercom registerUserWithUserId:#"<#123456#>"];
}
How do I implement Objective-c code like this in my swift project?
I've searched around, as well as contacted Intercom's support, but am yet to find an answer.
Many thanks!
[Intercom setApiKey:#"<#ios_sdk-...#>" forAppId:#"<#your-app-id#>"];
becomes
Intercom.setApiKey("<#ios_sdk-...#>", forAppId:"<#your-app-id#>")
and
[Intercom registerUserWithUserId:#"<#123456#>"];
becomes
Intercom.registerUserWithUserId("<#123456#>")
I would suggest to look over Swift tutorials to see the syntax and learn how to migrate Objective-C code to Swift code properly.

How many people have installed my app as a result of Facebook ads?

I've followed the instructions on this page for my Xcode project (ios app): https://developers.facebook.com/docs/ios/getting-started/
installed the Facebook SDK for iOS
obtained Facebook App ID
configured Xcode project
archived Xcode proj, submitted to Apple, approved and live
And I've created and run ads for app installs however how do I know how many people have installed my app as a result of the ads? There is nothing showing top left of the ads page....just zero???? Nothing showing in my Facebook Developer account.
I've clearly missed a pretty obvious step...can someone please shed some light?
You're probably not calling [FBAppEvents activateApp] on applicationDidBecomeActive:.
Check also if you have a FacebookAppID key on your target's Info.plist.
You AppDelegate needs to look like this:
#import "AppDelegate.h"
#import <FacebookSDK.h>
#implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// stuff
return YES;
}
- (void)applicationDidBecomeActive:(UIApplication *)application {
[FBAppEvents activateApp];
}
#end

Resources