adform / adform-ios-sdk

adform-ios-sdk
MIT License
8 stars 8 forks source link

Get ad size before it gets loaded ( before loadAd() ) #23

Closed rogierdna closed 6 years ago

rogierdna commented 6 years ago

Hello, we need a little help with ad sizes

in Placement configuration we have this setting. image

in app using code: (when initialising CellNode in tableView) We use this code to load the ad via adform-ios-sdk

let adView = AFAdInline(masterTagId: mTag, presenting: self.controller)
adView?.delegate = self
adView?.debugMode = true

print("adSize \(adView?.adSize)")

adView?.loadAd()
return adView!

So here we get the banner loaded but we do not know its size before it gets loaded. Is it possible to get that size before ad loads?

adView?.adSize

Also if we try get the adSize after loading then the adSize value is not the size set in Dimensions field. Nor it is the size of the ad loaded.

Also when checking from adInlineDidLoadAd delegate method the value of adInline.adSize is also not the size of loaded ad

    func adInlineDidLoadAd(_ adInline: AFAdInline!) {
        print("adHeight \(adInline.adSize)")
    }

same issue with adInlineWillShow, the result is not the size set in placement config

Any help is appreciated.

vladasdrejeris commented 6 years ago

Hello,

You should not use:

adView?.debugMode = true

This property is intended only for internal usage by Adform. Also, you should set ad size 600x500 on adView, because you are using this size in placement configuration. If you want to load banners with different sizes in one adView, you should use additionalDimensions instead.