How to well integrate iAd with PlayN/RoboVM ?

18 views
Skip to first unread message

Frédéric Paulin

unread,
May 28, 2015, 6:50:05 PM5/28/15
to pl...@googlegroups.com
Hi,

I tried to integrate iAd with PlayN/RoboVM.
The iAd banner works perfectly on iPad but it does not appear on iPhone (using the simulator or the real device)
Adding a delegate I see that the ad is received and loaded in both cases.
Any idea ?

public boolean didFinishLaunching (UIApplication app, UIApplicationLaunchOptions launchOpts) {  
     
...
     
CGRect rect = UIScreen.getMainScreen().getBounds();
     
UIWindow window = new UIWindow(rect);
     
...
      platform
.run(new MyGame ();
     
...
     
ADAdType adType = ADAdType.Banner;
     
ADBannerView adView = new ADBannerView(adType);
      adView
.setFrame(new CGRect(0,MyGame.HEIGHT - 60,0,0));
     
UIView view = window.getRootViewController().getView();
      view
.addSubview(adView);    
      window
.makeKeyAndVisible();
}



Reply all
Reply to author
Forward
0 new messages