To configure MSPA in the InMobi CMP portal, see Portal Configuration and SDK Changes.
This section outlines the various APIs and callbacks that publishers can use to trigger the MSPA consent screen once they are integrated with GPP.
After initializing the SDK, you can present the MSPA screen by invoking the following method from ChoiceCmp
class and pass in the delegate object for registering CCPA callback.
ChoiceCmp.shared.showUSRegulations(ccpaDelegate: self)
If you select US Privacy string from the portal, the MSPA consent screen will be presented and the corresponding consent will be taken.
Once the user has given the consent, didReceiveUSRegulationsConsent(usRegData: USRegulationsData)
delegate will be fired.
The showCCPAScreen
callback is deprecated. It is recommended to use MSPA showUSRegulationScreen
for obtaining consent in the U.S.
The callback didReceiveUSRegulationsConsent
is triggered when the user gives consent to MSPA. You will get consent details in usRegulationsData
.
func didReceiveUSRegulationsConsent(usRegData: USRegulationsData) {
print("\(#function), gppString: \(usRegData.gppString)")
}
The callback userDidMoveToOtherState
is triggered when the user changes location accompanied by the change in regulations. You can retrigger the MSPA popup if you want to retrieve new consent as per the new location.
To check whether US Regulations are applicable for the user, leverage usRegulationApplies
flag as part of the PingResponse
object. The PingResponse
object can be accessed within the cmpDidLoad
callback. The same object is returned by the ChoiceCmp.shared.ping()
method.
func userDidMoveToOtherState() {
print(#function)
}
You can retrieve MSPA related strings in the following keys:
Attribute | Description |
IABGPP_HDR_Version |
GPP Version |
IABGPP_HDR_Sections |
List of Section IDs |
IABGPP_HDR_GppString |
Full consent string in its encoded form |
IABGPP_GppSID |
Section ID(s) considered to be in force. Multiple IDs are separated by an underscore, e.g. “2_3” |
IABGPP_[SectionID]_String |
String representation of each section. E.g. IAB TCF EU v2 String will be found at IABGPP_2_String |
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.