Display Admob ads on Iphone

Hi everyone,

I try to display Admob ads on Cocos2d-x, It works good on Android, but no luck on Iphone.
I follow some tutorials and on RootViewController.mm I implement viewDidLoad method like this

`- (void)viewDidLoad {
[super viewDidLoad];

// Create a view of the standard size at the top of the screen.
// Available AdSize constants are explained in GADAdSize.h.
bannerView_ = [[GADBannerView alloc] initWithAdSize:kGADAdSizeBanner];

// Specify the ad's "unit identifier." This is your AdMob Publisher ID.
bannerView_.adUnitID = `“MY\_APP\_ID”;

// Let the runtime know which UIViewController to restore after taking
// the user wherever the ad goes and add it to the view hierarchy.
bannerView_.rootViewController = self;
[self.view addSubview:bannerView_];

// Initiate a generic request to load it with an ad.
[bannerView_ loadRequest:[GADRequest request]];
}@

Method viewDidLoad seem to be not called.

Could you please help me make ads display on Iphone?
Thanks,
anngdo

I move this code to AppController.mm, it throws error in main() method
`bannerView_ = [[GADBannerView alloc]
initWithFrame:CGRectMake(0.0,
0,
kGADAdSizeBanner.size.width,
kGADAdSizeBanner.size.height)];

// Specify the ad's "unit identifier." This is your AdMob Publisher ID.
bannerView_.adUnitID = `“APP\_ID”;

// Let the runtime know which UIViewController to restore after taking
// the user wherever the ad goes and add it to the view hierarchy.
bannerView*.rootViewController = self.viewController;
// Initiate a generic request to load it with an ad.
];
bannerView*.delegate = self;
[viewController.view addSubview:bannerView*];@
When I remove this code
@@bannerView*.rootViewController = viewController;
the error gone but ads doen’t show.

Anybody help please…

Thanks,

fffucker vietnamese , sttupid dog