TestFairy Crash Handler
To use the TestFairy SDK as a crash handler without any other TestFairy feature, use the code example below.
- Android
- iOS Objective C
- iOS Swift
TestFairy.installCrashHandler(this, "APP_TOKEN");
import com.testfairy.TestFairy;
public class MyApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
TestFairy.installCrashHandler(this, "APP_TOKEN");
}
}
[TestFairy installCrashHandler:@"APP_TOKEN"];
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[TestFairy installCrashHandler:@"APP_TOKEN"];
}
TestFairy.installCrashHandler("APP_TOKEN")
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
TestFairy.installCrashHandler("APP_TOKEN");
}
}