Search code examples
iosxamarinxamarin.ioshockeyapp

Can I attach the username to crash reports on Hockey App?


I am currently integrating HockeyApp into my IOS project on Xamarin and I would like to be able to attach the username to the crash reports but I cant figure out how .Is it even possible ?


Solution

  • You can attach the username and other metadata to the report with the following sample:

        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
    
            var manager = BITHockeyManager.SharedHockeyManager;
            manager.Configure(AppID);
            manager.UserEmail = "user@contoso.com";
            manager.UserId = "UserID";
            manager.UserName = "UserName";
            manager.DebugLogEnabled = true;
            manager.StartManager();
            manager.Authenticator.AuthenticateInstallation(); // This line is obsolete in crash only builds
    
    
            global::Xamarin.Forms.Forms.Init();
            LoadApplication(CreateApp());
    
            return base.FinishedLaunching(app, options);
        }