1. Import the InMobi SDK header and initialize it:
IMSdk.initWithAccountID("accountID", consentDictionary: [IM_GDPR_CONSENT_AVAILABLE:
"true", IM_GDPR_CONSENT_IAB: "<<consent in IAB format>>" ]) { (error) in
if let error = error {
print(error.localizedDescription)
}
}
2. Create a user data model as follows:
let phoneNumber = IMUserDataTypes(md5: "2wse3e", sha256: "6tghjk")
let emailId = IMUserDataTypes(md5: "ujhjk99", sha256: "jhjyure4")
let userDataModel = IMUserDataModel(phoneNumber: phoneNumber, emailId: emailId, extra: nil)
3. Pass this data model to fetch the API:
IMUnifiedIdService.push(data: userDataModel)
4. Call this API to fetch the UnifIDs.
IMUnifiedIdService.fetchUnifiedIds(delegate: self)
Implement the following delegates to receive the callbacks.
class ViewController: IMUnifiedIdInterface {
onFetchCompleted(response: Dictionary?, error: Error?) {
}
}
Call this reset API to clear all the user-related data and IDs stored in the SDK:
IMUnifiedIdService.reset()
If you have an ID from a Vendor, you can use it in the following SDK. If there is an overlap, the system prioritizes the InMobi procured Unified IDs.
IMSdk.setPublisherProvidedUnifiedID(unifiedIds : Dictionary?);
JSONObject structure:
{
"id5" : "json(blob)",
"liveramp": "json(blob)"
}
By installing this SDK update, you agree that your Children Privacy Compliance setting remains accurate or that you will update that setting, whenever there is a change in your app's audience. You may update the app's Children Privacy Compliance settings at https://publisher.inmobi.com/my-inventory/app-and-placements.