Thanks for the quick answer!
Well, the app presents two rows at first:
- First row calls the AdManagerFluidAdSizeViewController and initialize the AdLoader with only the .gamBanner ad type.
- Second row calls the AdManagerFluidAdSizeViewController and initialize the AdLoader with .gamBanner and the .customNative ad type.
Inside the AdManagerFluidAdSizeViewController I'm always requesting the same adunit that contains a demo fluid creative: "/6499/example/APIDemo/Fluid"
From my understanding I can pass an array of ad types to the AdLoader, and based on available inventory I will receive one of them. In my case I know there is only one fluid creative in this ad unit. But requesting both ad types seems to prevent any ad reception.
I have a couple of questions and notes:
I see that you are getting the ad type and checking if it is a native ad
Could you clarify what you mean by that? I'm not sure what code you are referring to. What I do in AdManagerFluidAdSizeViewController's viewDidLoad is requesting one or two adtypes based on a boolean value.
But then you are calling the fluid ad params and setting that up
Are you referring to validBannerSizes implementation?
func validBannerSizes(for adLoader: GADAdLoader) -> [NSValue] {
let sizes = [CGSize(width: 300, height: 50),
CGSize(width: 300, height: 600),
CGSize(width: 300, height: 250),
CGSize(width: 320, height: 180)]
var result = sizes.map { size -> NSValue in
let gadSize = GADAdSizeFromCGSize(size)
return NSValueFromGADAdSize(gadSize)
}
result.append(NSValueFromGADAdSize(kGADAdSizeFluid))
return result
}
No where in the code do I see you doing that for the native
I didn't think I needed to do that in this sample, where do you recommend me to do it? I don't see the equivalent of kGADAdSizeFluid
Plus it looks like you are loading them both into the same adView
Not sure I understand, since I'm using an AdLoader, the adView is given to me by the SDK, and I add it to my view hierarchy after that,
Thanks