4

In the HockeyApp SDK v. 3.5, they have shifted to a new method of user identification. In previous versions of the SDK, there was a callback method - (NSString*)userNameForCrashManager:(BITCrashManager *)crashManager which would set a string which would identify all crash reports sent from the client.

However, in version 3.5 of the SDK, it seems that this is deprecated, and it is preferred that you simply call:

[[BITHockeyManager sharedHockeyManager].authenticator authenticateInstallation];

This sets a unique ID for the user. But how can I access this identifier? I want to attach it to support emails so that I can search for crash reports the user has submitted.

Charles
  • 50,943
  • 13
  • 104
  • 142
Jason
  • 14,517
  • 25
  • 92
  • 153

2 Answers2

3
  1. You can use the following delegate to set the userName:

    - (NSString *)userNameForHockeyManager:(BITHockeyManager *)hockeyManager componentManager:(BITHockeyBaseManager *)componentManager
    

    This is documented in the header and help ofBITHockeyManagerDelegate and the replacement is also mentioned in the header and help of BITCrashManagerDelegate documentation.

  2. BITAuthenticator is only used for beta distribution due to the fact that Apple removed the UDID calls from iOS 7. See the documentation and help. It is automatically disabled in App Store builds and without further setup creates anonymous IDs! Please read the mentioned documentation.

Kerni
  • 15,241
  • 5
  • 36
  • 57
  • Oh - so `userNameForHockeyManager:` still works in the latest version of the SDK? The documentation in general is not clear what is the preferred manner of doing things. – Jason Nov 24 '13 at 12:18
  • Yes, it is not mentioned as being deprecated or anything similar. Where are things in the documentation not clear? Please contact us via support with more details or provide a pull request in our [repository](https://github.com/bitstadium/HockeySDK-iOS/) so we can improve it. – Kerni Nov 24 '13 at 12:24
-1

I think you are looking for publicInstallationIdentifier. That should return an NSString, unique for each user.

Look at this header file - BITAuthenticator.h .

Also, in the BITHockeyManager, there is a method called configureWithIdentifier: in which you can pass the identifier.

Dominik Hadl
  • 3,609
  • 3
  • 24
  • 58
  • 1
    1. `BITAuthenticator` only works for beta distributions, it does not work and is not meant to be used for the app store! It only returns an email if the `identificationType` is set to [`BITAuthenticatorIdentificationTypeHockeyAppEmail`](http://hockeyapp.net/help/sdk/ios/3.5.0/Constants/BITAuthenticatorIdentificationType.html) 2. `configureWithIdentifier:` is the setup method to initialize the SDK with apps app Identifier that you get on HockeyApp, see the [documentation](http://hockeyapp.net/help/sdk/ios/3.5.0/Classes/BITHockeyManager.html#//api/name/configureWithIdentifier:delegate:). – Kerni Nov 24 '13 at 11:51
  • Ok, thanks for letting me know. I probably didn't read the documentation enough. – Dominik Hadl Nov 24 '13 at 16:35