Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Implementing Testflight.com and Flurry.com exception handling

We are using both testflight.com sdk and flurry.com sdk to track unhandled exceptions. The issue is that no exceptions are picked up by flurry after we added the testflight.com sdk.

The method triggered when an unhandled exception occur looks like this:

void uncaughtExceptionHandler(NSException *exception) 
{
    [FlurryAnalytics logError:@"ERROR_NAME" message:@"ERROR_MESSAGE" exception:exception];
}

- (BOOL) application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 
{    
    #if !TARGET_IPHONE_SIMULATOR
    NSSetUncaughtExceptionHandler(&uncaughtExceptionHandler);

    struct sigaction newSignalAction;
    memset(&newSignalAction, 0, sizeof(newSignalAction));
    newSignalAction.sa_handler = &signalHandler;
    sigaction(SIGABRT, &newSignalAction, NULL);
    sigaction(SIGILL, &newSignalAction, NULL);
    sigaction(SIGBUS, &newSignalAction, NULL);

    [FlurryAnalytics startSession:kFlurryKey];
    [TestFlight takeOff:kTestflightKey];    

    [[UIApplication sharedApplication]
     registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge |
                                     UIRemoteNotificationTypeSound |
                                     UIRemoteNotificationTypeAlert)];    
    [UIApplication sharedApplication].applicationIconBadgeNumber = 0;    
    #endif
    .
    .
    .

I'm not sure how testflight.com does it, but it seems like they intercept the exception and register the data for themselves without letting the registered method be run?

Are there any way for both of these to coexist?

like image 690
Øystein Avatar asked Feb 21 '12 10:02

Øystein


1 Answers

I got confirmation from the Testflightapp.com team that this is a known issue. They hope to fix in in the next version they said.

like image 137
Øystein Avatar answered Oct 02 '22 06:10

Øystein