Skip to content

Instantly share code, notes, and snippets.

@rdavisau
Created October 24, 2016 20:13
Show Gist options
  • Save rdavisau/0b77ba1d3218a1fd88dd224474e20d11 to your computer and use it in GitHub Desktop.
Save rdavisau/0b77ba1d3218a1fd88dd224474e20d11 to your computer and use it in GitHub Desktop.
HockeyApp UnobservedTaskException
using System;
using System.Threading.Tasks;
using Foundation;
using HockeyApp.iOS;
using UIKit;
namespace HockeyCrash
{
[Register("AppDelegate")]
public class AppDelegate : UIApplicationDelegate
{
public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
{
SetupHockeyApp();
Task.Run(() => { throw new Exception(); });
return true;
}
private void SetupHockeyApp()
{
var appId = "your-appid-here";
var manager = BITHockeyManager.SharedHockeyManager;
manager.Configure(appId);
manager.StartManager();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment