I turned on Identity Verification and therefore need to set a user hash.
The documentation states this to set the User Hash:
- When your iOS app initializes Intercom if the user is identified (i.e., you have a user id or email address), pass in a String of the HMAC returned from your server's authentication call. This should be called before any registration calls.
I looked at the Intercom iOS sample app here. I do see that registerUser is called in two places:
- On app launch inside of: AppDelegate/didFinishLaunchingWithOptions (Objective-C sample) or SceneDelegate/willConnectTo (Swift sample)
- On user tapping login: handleUserLogin
My question is: do I have to call setUserHash in both places as well? The documentation states I need to call setUserHash before any registration calls. I'm not sure if this means that I have to call it in both app launch and user tapping login.
Could someone please confirm when to call setUserHash?