iOS RevMob with Admob mediation -
i trying set revmob on admob mediation using customevent.
i have setup gadcustomeventbanner custom call in project , being called correctly. but, ad black/blank. way can ad show calling
[[revmobads session] showbanner];
does know how display ad view revmob ads using admob mediation?
#import "revmobcustomeventbanner.h" @implementation revmobcustomeventbanner // set admob sdk. @synthesize delegate = delegate_; #pragma mark - #pragma mark gadcustomeventbanner - (void)requestbannerad:(gadadsize)adsize parameter:(nsstring *)serverparameter label:(nsstring *)serverlabel request:(gadcustomeventrequest *)customeventrequest { nslog(@"parameter = %@", serverparameter); nslog(@"label = %@", serverlabel); nslog(@"request = %@", customeventrequest); if (!self.revmobbannerview) { [revmobads startsessionwithappid:@"xxxxxx"]; self.revmobbannerview = [[revmobads session] bannerview]; [self.revmobbannerview setdelegate:self]; } [[self revmobbannerview] loadad]; } #pragma mark - revmobadsdelegate methods - (void)revmobaddidreceive { nslog(@"[revmob sample app] ad loaded."); [self.delegate customeventbanner:self didreceivead:self.revmobbannerview]; } - (void)revmobaddidfailwitherror:(nserror *)error { nslog(@"[revmob sample app] ad failed: %@", error); [self.delegate customeventbanner:self didfailad:error]; } - (void)revmobaddisplayed { nslog(@"[revmob sample app] ad displayed."); [self.delegate customeventbanner:self clickdidoccurinad:self.revmobbannerview]; [self.delegate customeventbannerwillpresentmodal:self]; } - (void)revmobuserclosedthead { nslog(@"[revmob sample app] user clicked in close button."); [self.delegate customeventbannerwilldismissmodal:self]; } - (void)revmobuserclickedinthead { nslog(@"[revmob sample app] user clicked in ad."); } - (void)installdidreceive { nslog(@"[revmob sample app] install did receive."); } - (void)installdidfail { nslog(@"[revmob sample app] install did fail."); }
i corrected issue putting code in resize mediatedadview, still need logic change height on rotation...but @ lease seeing ads.
- (void)adviewdidreceivead:(gadbannerview *)adview { if ([adview mediatedadview].frame.size.width == 0.0f) { [[adview mediatedadview] setframe:cgrectmake(0, 0, adview.frame.size.width, adview.frame.size.height)]; } } }
Comments
Post a Comment