Changing ADX Domain - adform/adform-ios-sdk GitHub Wiki

It is possible to change the ad exchange server by specifying a server domain that should be used by SDK. To do so you need to use setDomain: method on AdformSDK class. There are three standard ADX domain values:

  1. kAFAdxDomainEUR - an ADX server located in Europe;
  2. kAFAdxDomainUSA - an ADX server located in USA;
  3. kAFAdxDomainDefault - a default ADX server, at the moment this value is equal to kAFAdxDomainEUR.

You can also set another custom ADX domain provided to you by Adform.

It is important that you set the ADX domain before loading any ads. The best place to set this configuration is application:didFinishLaunchingWithOptions: app delegate method.

An example below shows you how to change the ADX domain used by SDK:

Swift

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    // Set one of the standard ADX domains:
    AdformSDK.setDomain(kAFAdxDomainUSA)

    // Set a custom ADX domain:
    AdformSDK.setDomain("adxXXX.adform.net")
    
    return true
}
Objective-C
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    // Set one of the standard ADX domains:
    [AdformSDK setDomain: kAFAdxDomainUSA];

    // Set a custom ADX domain:
    [AdformSDK setDomain: @"adxXXX.adform.net"];

    return YES
}

For more information feel free to contact support.

⚠️ **GitHub.com Fallback** ⚠️