I’ve been running through a good Cocos2d tutorial to implement iAds and am close to getting it implemented (I get iAd messages from the console)…
I keep coming back to this Warning on:
CCGLView *eaglView = [[CCDirector sharedDirector] openGLView];
“Instance method ‘-openGLView’ not found…”
I think it has something to do with the switch from calling GLView to CCGLView (cocos2d)…
By using type
CCGLView, I guess you are using cocos2d-iphone 2.x, while 1.x doesn’t haveCCGLViewbut haveEAGLView.In 1.x usually we access the property
openGLViewto get the OpenGL view object:In 2.x,
CCDirectorclass doesn’t have such a property. Instead,CCDirectoris now a subclass ofUIViewControlleron iOS (andNSObjecton Mac OS X). So, if you want to get the OpenGL view object on iOS, just do this:since
viewis a property ofUIViewController.