Created
April 3, 2014 00:52
-
-
Save Redth/9946335 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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