When using HockeyApp, what are the iOS and Windows equivalents of Android TraceWriter.WriteTrace?

JohnHardmanJohnHardman GBUniversity mod

When using HockeyApp on iOS, Windows (8.1 + UWP) and WinPhone, what are the equivalents of the following Android code?


Sorry if it's a newbie question, but struggling to find features that I would expect.

Many thanks,

John H.

Best Answers


  • MikeRowley403MikeRowley403 CAMember ✭✭✭

    How did you make out @JohnHardman? I'm struggling with the same question, seems like documentation for the components doesn't go past the getting started phase.

  • JohnHardmanJohnHardman GBUniversity mod

    @MikeRowley.4889 - I haven't completed this yet. My suspicion is that it might require a (currently) pre-release build of HockeyApp to do this, but I haven't confirmed this yet.

  • MikeRowley403MikeRowley403 CAMember ✭✭✭

    Actually I have tested it and it appears the way to achieve this is the following:


    This of course crashes the app (in some cases I would prefer to trap and log the exception but continue on, which doesnt seem possible on IOS. There is a complete lack of any documentation on the components (as confirmed by Xamarin Support) so it seems like we're on our own to figure this stuff out.

    Hope this helps someone.

  • MikeRowley403MikeRowley403 CAMember ✭✭✭

    @JohnHardman I could be wrong but I believe Events and Exceptions are two different concepts in HockeyApp.

    That will track a user created event, but it won't integrate a user caught exception into HockeyApp's exception reporting.

  • JohnHardmanJohnHardman GBUniversity mod

    @MikeRowley403 - My original question was about trace information. Whilst the APIs have changed a bit, it looks like HockeyApp.MetricsManager.TrackEvent should do what I was after.

    For handling exceptions, there is also HockeyClient.Current.TrackException which I make use of in my exception handling code.

  • MikeRowley403MikeRowley403 CAMember ✭✭✭

    @JohnHardman They have TrackException on IOS finally? They had it on Android for a while now but nothing on IOS. What type is your HockeyClient Object?

  • MikeRowley403MikeRowley403 CAMember ✭✭✭

    @JohnHardman I do know it is cross plat, and the event stuff I saw in the preview, but when you say "For TrackException, I use HockeyClient.Current.TrackException" what object type is "HockeyClient" on IOS? That looks like a UWP object.

  • JohnHardmanJohnHardman GBUniversity mod
    edited December 2016

    @MikeRowley403 - HockeyClient.Current.TrackException is in my common code, not in platform-specific code. However, I've just noticed a bug in my own code that meant it wasn't being called on iOS. Having just fixed that, it seems that calling TrackException on iOS actually throws an exception. A workaround about to go in, so that exceptions on iOS get reported as events for the time being :-(

  • MikeRowley403MikeRowley403 CAMember ✭✭✭

    That makes sense and is in line with what I have seen, or not seen on IOS.


  • MaximAlexeyevMaximAlexeyev USMember ✭✭

    Hi, I'm trying to use HockeyClient for Android, for some reasons TrackTrace works just fine, but TrackException gives me an error ""The given key was not present in the dictionary.".

    The way I register it is this.
    CrashManager.Register(this, "AppKey");

    Any help is appreciated. Thanks

  • JohnHardmanJohnHardman GBUniversity mod

    @MaximAlexeyev - I assume where you show "AppKey" that you actually replace that with the key obtained from the HockeyApp portal? It would be a string of hex characters, e.g. "09834702a463473c04985723d9547320" (not my real one!)

  • MaximAlexeyevMaximAlexeyev USMember ✭✭

    @JohnHardman , Yes, there is an actual key in the app. I removed it just for this post.

Sign In or Register to comment.