Application User ID
User ID Usage
User ID is a unique Identifier that will differentiate between your different users. IronSource systems use it to know which user to reward upon successful ad completion through server-to-server callbacks.
Most of the calls to ironSource systems must include the User ID in order to sync the user data of your app with ironSource database.
Create a User ID
There are a couple of ways to generate a User ID, while it must be a unique string for each one of your users.
- Method 1: assign an incremental number to each of your signed up users.
- Method 2: use IDFV (Identifier for Vendor) for iOS or AID (Advertising ID) for Android.
iOS
SDK 6.4 and below:
NSString *idfv = [[[UIDevice currentDevice] identifierForVendor]UUIDString];
SDK 6.5 and above:
NSString *idfv = [IronSource advertiserId];
Android SDK 6.4 and below: SDK 6.5 and above: Unity
final String id = AdvertisingIdClient.getAdvertisingIdInfo(this).getId();
final String id = IronSource.getAdvertiserId(Activity);
For Unity you can use the following Unity’s guidelines.