Skip to content

Instantly share code, notes, and snippets.

@Redth
Created April 3, 2014 00:52
Show Gist options
  • Select an option

  • Save Redth/9946335 to your computer and use it in GitHub Desktop.

Select an option

Save Redth/9946335 to your computer and use it in GitHub Desktop.
public override bool FinishedLaunching(UIApplication app, NSDictionary options)
{
//We MUST wrap our setup in this block to wire up
// Mono's SIGSEGV and SIGBUS signals
Setup.EnableCustomCrashReporting (() => {
//Get the shared instance
var manager = BITHockeyManager.SharedHockeyManager;
//Configure it to use our APP_ID
manager.Configure ("YOUR_APP_KEY");
//Start the manager
manager.StartManager ();
//Authenticate (there are other authentication options)
manager.Authenticator.AuthenticateInstallation ();
});
// create a new window instance based on the screen size
window = new UIWindow(UIScreen.MainScreen.Bounds);
Console.WriteLine("DidCrashInLastSession: " + BITHockeyManager.SharedHockeyManager.CrashManager.DidCrashInLastSession);
//Crash only sometimes
if (DateTime.UtcNow.Second % 2 == 0)
throw new DivideByZeroException();
// make the window visible
window.MakeKeyAndVisible();
return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment