Crashes

  • iOS
  • watchOS
  • tvOS
 

Foreword

AT Internet’s SDK enables the recovery of application crash information.

When a hit is sent following the re-opening of the application, this information will be added to the stc variable.

By default, this feature is disabled. For technical reasons, once enabled, it is not possible to disable crash detection.

Please note, if you wish to use another crash detection solution, please remember to disable this feature.

 

Tagging example

To ensure that all crashes and/or exceptions are successfully detected, it is recommended to enable detection in the application delegate as follows:


func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
    Tracker.handleCrash = true
    return true
}

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    
    Tracker.handleCrash = YES;    
    return YES;
}

The SDK also has a method to directly retrieve crash information:


func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
    Tracker.handleCrash = true
    let tracker: Tracker = ATInternet.sharedInstance.defaultTracker
    let crashInformation = tracker.getCrashInformation()
    print("CrashInformation \(String(describing: crashInformation))")
    return true
}
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    
    Tracker.handleCrash = YES;
    Tracker* tracker = [ATInternet sharedInstance].defaultTracker;
    NSDictionary* crashInformation = [tracker getCrashInformation];
    NSLog(@"CrashInformation %@", crashInformation);
    return YES;
}