Mo pub + iAds in iPhone landscape game

泄露秘密 提交于 2020-01-06 15:40:34

问题


Now I got one requirement to use MoPub+iAds in iPhone game.

I used mo pub sdk and initialized view like this

MPAdView *moPubAdView =  [[MPAdView alloc] initWithAdUnitId:MOPUB_ADS_ACCOUNT_ID size:MOPUB_BANNER_SIZE];

But this displays 320x50 in size. How to enable iAd for this view? Now it is displaying only mo pub ads.


回答1:


If you want the slim iAd banner you have to pass the correct CGSize in the size parameter. In this case CGSizeMake(480, 32). To enable iAds for your App go to itunesconnect.apple.com and add your app with your bundle ID. After that find the Button which says iAd Network Settings and enable iAds.

The slim lanscape is rare. Your fillrate will be low. I recommend to use MMA Banner (320, 50) even for landscape orientation. Do this by using this function:

[mpAdView lockNativeAdsToOrientation:MPNativeAdOrientationPortrait];

Also be sure to import the iAd Adapter. Its by default included.



来源:https://stackoverflow.com/questions/11413297/mo-pub-iads-in-iphone-landscape-game

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!