Test mode iOS


It is possible to enable loading of test ads on a specific device.

To add a test device:
1. Enable Debug Mode and download ads on the device.

2. View in the Xcode or device console a message containing the Instance Id of the device:

[myTarget debug] Current device's Instance Id is D346D6CE-3414-4C22-BFC8-B4DD4983B1C8, use this value in method withTestDevices() in order to enable Test Mode.

Copy the Instance Id of the test device to the clipboard.

3. Add a call to the withTestDevices:(nullable NSArray<NSString *> *) method to your code and pass the Instance Id of the test device (or several devices) to it:

MTRGManager.sdkConfig = [[MTRGConfig.newBuilder withTestDevices:@[@"D346D6CE-3414-4C22-BFC8-B4DD4983B1C8"]] build];

4. Restart the application, now the added devices will receive test ads.

5. Make sure that this mode is disabled in the release version of the application.
Was this article helpful?
Да
Нет