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]]];
}
}
Related
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]]];
I have integrated Fabric.io framework in my code. I have a screen to show to user for his acceptance on fabric so I initiates the fabric in that particular screen but this is not working. I mean session is not updating in this flow.. Where as it works as expected if I keep initiation in didFinishLanuchOptions.
[Fabric with:#[[Crashlytics class]]];
// Enabling debug mode
[[Fabric sharedSDK] setDebug: YES];
[Fabric with:#[CrashlyticsKit]];
Any help would be appreciated.
Thanks.
My didFinishLaunchingWithOptions method stores a filename from the UIApplicationLaunchOptionsURLKey and tries to open it.
-(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
NSURL* url = [launchOptions objectForKey:UIApplicationLaunchOptionsURLKey];
NSError* err;
if ([url checkResourcesIsReachableAndReturnError:&err])
{
...
}
}
For iOS 8 this code works fine. My application is launched because some other application selected "open in" to my application, but for iOS 9 this code doesn't work, and I get
err = NSCocoaErrorDomain : code 257 : "The file 'XXX' couldn't be
opened because you don't have permission to view it."
"The operation couldn't be completed. Operation not permitted"
Very important note: This only happens when my application was shut down while the user tried to open a file from another application. I see that the file that is being sent in UIApplicationLaunchOptionsURLKey is indeed located not in the same sandbox as my application is. If it was not shut down, just minimized, everything behaves well because the UIApplicationLaunchOptionsURLKey is in the same sandbox.
This was a problem in iOS 9 beta 3 that was resolved in beta 4.
didFinishLaunchingWithOptions method was triggered with a filepath in the UIApplicationLaunchOptionsURLKey that was in a different application's space, hence it was sandboxed and the iOS application could not access it.
Anyhow Apple now resolved this issue.
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.
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