问题
This error just started showing up following upgrade to 6.10.0, so a different issue to the other questions reporting this same issue. I've walked through the code and setting the Root View Controller of the GADBannerView doesn't take effect:
[self.adUnit setRootViewController:controller];
NSLog(@"Ad Unit: %@", [self.adUnit class]);
NSLog(@"Root VC: %@", [controller class]);
NSLog(@"Ad Unit Root VC: %@", [self.adUnit.rootViewController class]);
Results in:
2014-07-25 11:52:23.234 *** [16665:607] Ad Unit: GADBannerView
2014-07-25 11:52:23.235 *** [16665:607] Root VC: MyAppViewController
2014-07-25 11:52:23.235 *** [16665:607] Ad Unit Root VC: (null)
回答1:
Heard from Google:
"I checked with the engineers who said this is fixed at our head revision. They're still investigating why it happened in the first place though.
I don't have a date yet for when we'll be doing another release, so in the short term I'd recommend rolling back to 6.9 to address your immediate issue."
Ben
来源:https://stackoverflow.com/questions/24962670/google-mobile-ads-sdk-6-10-0-google-must-set-the-rootviewcontroller-property