ios - Admob banner shown but crashes when tap. Crash only on iPhone, works fine on iPad -
i have universal binary app , start using admob. here code viewcontroller.
the banner shown expected when tap banner, app crashes. strangely, occurs on iphone. no problem ipad.
bannerview_ = [[gadbannerview alloc] initwithadsize:kgadadsizesmartbannerlandscape]; bannerview_.adunitid = @"myid"; cgrect screen_size = [[uiscreen mainscreen] bounds]; bannerview_.frame = cgrectmake(0.0, screen_size.size.width - bannerview_.bounds.size.height, bannerview_.bounds.size.width, bannerview_.bounds.size.height); //2nd line, screen_size.size.width - bannerview_.bounds.size.height works not screen_size.size.height - bannerview_.bounds.size.height bannerview_.rootviewcontroller = self; [self.view addsubview:bannerview_]; [bannerview_ loadrequest:[gadrequest request]];
this log whenever app crahes.
*** terminating app due uncaught exception 'uiapplicationinvalidinterfaceorientation', reason: 'supported orientations has no mutual orientation application, , shouldautorotate returning yes' *** first throw phone call stack: (0x2ec82f0b 0x39415ce7 0x2ec82e4d 0x31523bf9 0x315238d1 0x3159b57d 0x3159a5f9 0xefc04 0x3144b361 0x2ec86454 0x2ebd09a7 0x398fed53 0x398fed3f 0x399016c3 0x2ec4d681 0x2ec4bf4d 0x2ebb6769 0x2ebb654b 0x33b136d3 0x31515891 0x1d5a9 0x39913ab7) libc++abi.dylib: terminating uncaught exception of type nsexception
i have ideas or solutions this. give thanks in advance.
ios iphone objective-c ipad admob
No comments:
Post a Comment