Xandr - iOS
Search…
Third-party consent manager
Ogury requires an explicit consent from the user to use their personal data. We collect this consent through Ogury Choice Manager. This is the easiest way to collect consent for Ogury and other vendors.
If you already have your own consent notice to collect user consent, we provide a procedure to transmit the consent to us.

Requirements

You have a registered application on your Ogury dashboard. If not, you can refer to the getting started.

Step 1: Pass consent to Ogury

To pass consent status to Ogury, call the following method after the consent has been collected:
Swift
Objective-C
1
let nonIabVendorsAcceptedArray = Array<NSNumber>()
2
nonIabVendorsAcceptedArray.append(NSNumber.init(vendorIdInt))
3
OguryChoiceManagerExternal.setConsentForTCFV2WithAssetKey("ASSET_KEY", iabString: "IAB_STRING", andNonIABVendorsAccepted: nonIabVendorsAcceptedArray)
Copied!
1
NSMutableArray<NSNumber*>* nonIabVendorsAcceptedArray = [NSMutableArray array];
2
[nonIabVendorsAcceptedArray addObject:[NSNumber numberWithInteger:vendorId]];
3
[OguryChoiceManagerExternal setConsentForTCFV2WithAssetKey:@"ASSET_KEY" iabString:@"IAB_STRING" andNonIABVendorsAccepted:nonIabVendorsAcceptedArray];
Copied!
The setConsentWithAssetKey method takes the following parameters:
  • the Asset Key of your application. If you do not have one, please refer to the getting started section.
  • the iabString IAB-specified Consent String generated by third-party CMP to transmit the consent of the vendors that are registered inside the IAB Vendor list.
  • andNonIABVendorsAccepted a NSNumber Array containing the Integer ID value of accepted vendors you need that are not registered in the IAB Vendor list. The ID corresponding to a vendor can be found inside our vendor list.
The IAB-specified Consent String must be valid and be generated by a whitelisted CMP. Otherwise the call to the setConsentForTCFV2WithAssetKey method will be ignored.
If, at any point, user consent is changed, call this method again with updated values.
We recommend to only start the Ogury SDK once you have collected the consent of the user even in case of an error of the third-party consent manager. Otherwise it will limit the inventory we are able to choose from for the first impressions.

Integration example

You must initialize the Ogury SDK after passing the user consent through the setConsentWithAssetKey method. Otherwise we will serve non-personalized ads.
Swift
Objective-C
1
let nonIABVendors = Array<NSNumber>()
2
vendorsIdArray.append(NSNumber.init(vendorIdInt))
3
OguryChoiceManagerExternal.setConsentForTCFV2WithAssetKey("ASSET_KEY", iabString: "IAB_STRING", andNonIABVendorsAccepted: nonIABVendors)
4
OguryAds.shared().setup(withAssetKey: "ASSET_KEY")
Copied!
1
NSMutableArray<NSNumber*>* nonIabVendorsAcceptedArray = [NSMutableArray array];
2
[nonIabVendorsAcceptedArray addObject:[NSNumber numberWithInteger:vendorId]];
3
[OguryChoiceManagerExternal setConsentForTCFV2WithAssetKey:@"ASSET_KEY" iabString:@"IAB_STRING" andNonIABVendorsAccepted:nonIabVendorsAcceptedArray];
4
[[OguryAds shared] setupWithAssetKey:@"ASSET_KEY"];
Copied!