Manual TCF Processes "iOS"
The manual processing of the TCF Consent data is performed using the 'setCustomConsent' method. In doing so, a Consent String previously formed according to the IO Consent String Notation must be passed.
Objective-C:
1
2
3
4
5
6
7
8
9
10
11
12
13
14 | @implementation AppDelegate
- (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions {
[self startSession];
// Other code
return YES;
}
- (void)startSession {
// initialise the IOLib; session start
// privacySetting LIN = Legitimate interest is given
[[IOLSession defaultSessionFor:IOLSessionTypeSZM]
startSessionWithOfferIdentifier:@"**<offerIdentifier>**"
privacyType:IOLPrivacyTypeLIN];
[[IOLSession defaultSessionFor:IOLSessionTypeSZM]]
setCustomConsent:@"**<CUSTOMCONSENT>**"]; // s. IO Consent String Notation
|
Swift:
1
2
3
4
5
6
7
8
9
10
11
12 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool {
self.startSession()
// Other code
return true
}
func startSession() {
// initialise the IOLib; session start
// privacySetting LIN = Legitimate interest is given
IOLSession.defaultSession(for: .SZM).start(withOfferIdentifier:"<offerIdentifier>",
privacyType: .LIN)
IOLSession.defaultSession(for: .SZM).setCustomConsent("<CUSTOMCONSENT>") // s. IO Consent String Notation
}
|
As mentioned earlier, the IOLib prioritises automatic processing over manual processing. If the result of the automatic processing is a valid IO Consent String, this is always transmitted and the manual one ignored.
To be able to check at runtime which consent string is used for transmission, the method consent can be called. This returns the IO Consent String currently used for transmission.
Objective-C:
[IOLSession defaultSessionFor:IOLSessionTypeSZM].consent;
Swift:
IOLSession.defaultSession(for: .SZM).consent()
Last update: October 29, 2021