Test Mode
Learn how to work with test mode for iOS ATS Mobile SDK.
You can simulate the actual flow of the library without setting up in Liveramp Console and network requests from the library itself to the backend.
In test mode, current user location is set to United States. All data that is generated in test mode is stored temporarily and it will be lost after application implementing the SDK is closed.
Activating Test Mode
To turn test mode on, set LRAtsConfiguration's isTestMode parameter value to true, during initialization of the library:
let lrAtsConfiguration = LRAtsConfiguration(configID: "test", isTestMode: true)
LRAts.shared.initialize(with: lrAtsConfiguration) { success, error in
if success {
print("SDK is Ready")
} else {
print("SDK init error: \(String(describing: error))")
}
}
LRAtsConfiguration *lrAtsConfiguration = [[LRAtsConfiguration alloc] initWithConfigID:@"test" isTestMode:YES];
[[LRAts shared] initializeWith:lrAtsConfiguration completion:^(BOOL success, NSError * _Nullable error) {
if (success) {
NSLog(@"init successful");
} else {
NSLog(@"init failure");
}
}];
Envelope Flow
To receive an envelope, use the [getEnvelope](https://developers.liveramp.com/authenticatedtraffic-api/docs/ios-api-reference#getenvelope) API. The envelope's expiration time is 7 minutes with a minimum refresh time of 1 minute. The returned envelope will be a randomly generated envelope and no request to the backend API will be sent.
On-Device Flow
You can test the ATS On-Device flow by calling the [getDealIDs](https://developers.liveramp.com/authenticatedtraffic-api/docs/ios-api-reference#getdealids) API as with a real use case. After the call, the passed identifiers will be checked against the test campaign stored during the test mode initialization phase and a list of matching Deal IDs will be returned.
You can use the sample emails below to test the Deal IDs generation process:
Updated about 1 year ago