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(appId: "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] initWithAppId:@"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, simply use the 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.