SWIFT SDK FAQ
My banner is not 640x640. How to set up the right size?
Use the following method with the desired size:
I need to play Audio Ads along with Dialogue Ads. What I need to do?
Just use
instead of
How to handle AdmanStateError state?
In case of an error, you will receive .error in AdmanState. Please find the ways to handle it below:
How to handle ad preloading?
When using the ad preloading, it is necessary to call the method adman.reportAdEvent(eventName: "can_show") at the time of possible launch of advertising, even in cases, when advertising wasn't actually loaded or played.This method provides the measurement of advertising capacity.
How to create two instances of Adman with different regions?
How to call an ad with specific slot?
In order to specify the slot for an ad, the below method should be called before calling prepare
Possible values for slot (AdmanAdSlot):
How to change the look of the DefaultView?
open class AdmanUIBase is responsible for the view of the ads and can be inherited by another class in the application. Any changes of the view can be done in the inherited subclass.
Background color can be changed in the subclass that inherited the AdmanUIBase class in method open func initBaseView()
Font color of labels can be changed in the subclass of the AdmanUIBase class in method open func initBaseView()
How to set the size of Ad View?
You can change the banner view bounds from the extension of AdmanUIBase:
Preloading an ad
This parameter must be used with 'prepare' method when you are preloading an ad. Please find some usage examples below:
For CCPA consent string please use the following before the ad request:
How to customize the look of the ad view?
After Adman initialization you will need to create AdmanUIBase class.
This class must be initialized before calling adman.prepare()
On the ad playback, the following method should be called:
In order to customize the look of the view, you will need to inherit the AdmanUIBase class and implement its methods:
You can find the example in test applications of Adman_swift framework (files: AdmanUIExt.swift and PlayerVC.swift )
How to use variables for targeting in the SDK?
Please use the following method BEFORE requesting an ad:
Last updated