Troubleshooting on iOS
This page gives you a few tips to debug and test your instream ads.
Debug mode
You can activate the Debug Mode of the SDK through SVSConfiguration
.
When the Debug Mode is activated, the SDK will send logs to Xcode console.
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// ...
// Enable debug mode of the SDK - This will send logs to your Xcode console.
[[SVSConfiguration sharedInstance] setLoggingEnabled:YES];
// ...
}
Don't forget to turn off the Debug Mode by setting loggingEnabled to NO before submitting your app to the App Store.
Test placement
For your convenience, the SDK provides a test SVSAdPlacement
, that can show ads for preroll, midroll and postroll breaks.
This placement will return 2 ads per ad break at most.
- (SVSAdPlacement *)instantiateTestAdPlacement {
// Create a Test SVSAdPlacement
SVSAdPlacement *adPlacement = [SVSAdPlacement adPlacementForTestAd:SVSAdPlacementTestPrerollMidrollPostroll];
return adPlacement;
}
Don't forget to use an actual ad placement before submitting your app to the App Store.