Set the Contact Key
To set the contact key, add the appropriate request to your app. In these code examples, replace user@example.com with the contact key you want to use.
To send messages to anonymous users only, skip this step. The contact key for an anonymous user is a random GUID.
If you use version 10 or later of the SDK, use this code.
For version 10 or later of the iOS SDK, use this code.
For earlier versions of the Android SDK, use this code.
For earlier versions of the iOS SDK, use this code.