Testing SDK Integrations

The MobileFuse SDK contains a test mode feature which allows test ad creatives to be returned when enabled.

Test creatives will have 100% fill in most countries. If you are still not seeing test ads with these features enabled, try using a VPN set to the US before opening your app, as for some countries the initialization request may fail and prevent ads from showing.

Enabling global test mode

You can enable test mode for the current app session by calling the following code before requesting ads:

MobileFuseSettings.setTestMode(true);
MobileFuseSettings.testMode = true
#import <MobileFuseSDK/MobileFuseSettings.h>

[MobileFuseSettings setTestMode:YES];

This will change the behavior of the SDK so that it always returns test creatives for the current session on the device that the app is running on.

This code can also be used to enable test mode when testing mediation adapters.

⚠️

Important

Be sure to disable the test mode before packaging your app for deployment

Per-placement testing

You can also set the test mode to enabled on specific placements, the following code snippet demonstrates this feature:

myAdInstance.setTestMode(true);
myAdInstance.testMode = true
[self.myAdInstance setTestMode:YES];

You must enable test mode for each ad instance that you want to use test ads with. This feature only applies to your local device/app session and is not saved.

Per-placement testing IDs

For testing mediation platforms, or if changing IDs is easier than calling methods, you can enable a per-placement test mode by prefixing your app placement IDs with test:

For example, if your placement ID is 123456 you should change it to test:123456

This will enable the same behavior as the per-placement testing above.