Admob get error on Xcode - objective-c

I developed an app and I want to add Admob.
I can't run Admob test Bannerview.
Code:
// 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];
//bannerView_.frame = CGRectMake(0, 200, 320, 50);
// Specify the ad's "unit identifier." This is your AdMob Publisher ID.
bannerView_.adUnitID = #"a15188d33246d24";
// 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.view2 addSubview:bannerView_];
// Initiate a generic request to load it with an ad.
[bannerView_ loadRequest:[GADRequest request]];
And the error is:
tableViewKullanimi[13107:c07] <Google> To get test ads on this device, call:
request.testDevices = [NSArray arrayWithObjects:GAD_SIMULATOR_ID, nil];
2013-05-07 17:29:28.154 tableViewKullanimi[13107:c07] -[GADObjectPrivate changeState:]: unrecognized selector sent to instance 0xa360320
2013-05-07 17:29:28.155 tableViewKullanimi[13107:c07] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[GADObjectPrivate changeState:]: unrecognized selector sent to instance 0xa360320'
*** First throw call stack:
(0x1ed2012 0x1a85e7e 0x1f5d4bd 0x1ec1bbc 0x1ec194e 0x7cc45 0x7e7c6 0x7c1ae 0x2da1 0xaab1c7 0xaab232 0x9fa3d5 0x9fa76f 0x9fa905 0xfb33ab6 0xa03917 0x9c796c 0x9c894b 0x9d9cb5 0x9dabeb 0x9cc698 0x1d1cdf9 0x1d1cad0 0x1e47bf5 0x1e47962 0x1e78bb6 0x1e77f44 0x1e77e1b 0x9c817a 0x9c9ffc 0x27fd 0x2725)
libc++abi.dylib: terminate called throwing an exception

Add the -all_load flag to "Other Linker Flags" and it should work.
The "test banners" must be enabled in AdMob www

Related

Unexpected Crash on iPhone X on launching the application

Application is working fine on all devices including iPhone 8 except iPhone X.
Scenario is setting a viewcontrooller as the topviewcontroller on Push of navigation system and removing them on pop of navigation controller system. On launching on iPhoneX it crashes with the following error. This is the Push Method.
- (void)pushViewController:(MTRViewController *)viewControler {
self.viewControllers = [self.viewControllers arrayByAddingObject:vc];
viewControler.navigationController = self;
self.topViewController = viewControler;
}
This is the error log.
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[MTRWindowViewController _isLayingOutTopViewController]: unrecognized selector sent to instance 0x7fa629c11d50'
*** First throw call stack:

Cannot share from iOS to GooglePlus

I'm working on social package in my app and I developed sharing using multiple social networks. While implementing Google+ SDK for iOS, I logged in and retrieved my account information, but when I start sharing, the application crashes
id<GPPNativeShareBuilder> shareBuilder = [[GPPShare sharedInstance] nativeShareDialog];
[shareBuilder setPrefillText:obj_featured.title];
UIImage *image = [self captureScreenShot];
[shareBuilder attachImage:image];
[shareBuilder open];
Simply, I commented and test every line, the problem is with the -open function.
The error appears for me when running over real device is:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[1]'
*** First throw call stack:
(0x2e783fd3 0x38ffcccf 0x2e6c2463 0x2e6c222b 0x1e7cd5 0x1c014f 0x1e9f31 0x1ea21d 0x1ea429 0x1c07f3 0x201179 0x2f16cc73 0x2e74f25b 0x2e74e72b 0x2e74cf1f 0x2e6b7f0f 0x2e6b7cf3 0x33610663 0x3100316d 0x106131 0x39509ab7)
libc++abi.dylib: terminating with uncaught exception of type NSException

KTPhotoBrowser push to KTTumbsViewController

I am trying to use KTPhotoBrowser to use its thumbnail view capabilities. I have some difficulties to push to the viewController that was derived from KTThumbsViewController. It seems the navigationController can only push to UIViewController:
- (void)showSDWebImageSample
{
KTThumbsViewController *newController = [[KTThumbsViewController alloc] init];
[self.navigationController pushViewController:newController animated:YES];
}
and the header file for KTThumbsViewController includes:
#interface KTThumbsViewController : UIViewController <KTThumbsViewDataSource>
I grabbed the code from the provided sample. But it gives me the following runtime error:
-[KTThumbsViewController copyWithZone:]: unrecognized selector sent to instance 0x8877130
2012-10-30 14:52:03.004 myCases_MD[36941:c07] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[KTThumbsViewController copyWithZone:]: unrecognized selector sent to instance 0x8877130'
Could anyone help me please?
Cheers,

program crashes when trying to present modal view controller

I want to load another xib, and use this simple code:
AddElementViewController *viewToLoad = [[AddElementViewController alloc] initWithNibName:#"AddElementViewController" bundle:nil];
viewToLoad.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
[self presentModalViewController:viewToLoad animated:YES];
for some reason it throws me out with this output:
2012-03-11 11:56:57.990 Weesh[14650:11603] -[MainViewController AddPressed:]: unrecognized selector sent to instance 0x7b55b40
2012-03-11 11:56:57.991 Weesh[14650:11603] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[MainViewController AddPressed:]: unrecognized selector sent to instance 0x7b55b40'
*** First throw call stack:
(0x13da052 0x198ed0a 0x13dbced 0x1340f00 0x1340ce2 0x13dbec9 0x32a5c2 0x32a55a 0x3cfb76 0x3d003f 0x3cf2fe 0x34fa30 0x34fc56 0x336384 0x329aa9 0x22c7fa9 0x13ae1c5 0x1313022 0x131190a 0x1310db4 0x1310ccb 0x22c6879 0x22c693e 0x327a9b 0x1cad 0x1c15)
terminate called throwing an exception(lldb)
do you have any idea what can cause it?
Somewhere in your code (it seems to be in AddElementViewController implementation) you are sending message AddPressed: to object of class MainViewController.
The call stack and crash error says that there are no method AddPressed: in class MainViewController.
Try to find all places where you are calling AddPressed: (first of all check loadView, viewDidLoad, viewWillAppear, viewDidAppear, init of AddElementViewController class) and check the type of receiver.

Exception: unrecognized selector ... when trying to push a view controller on Navigation stack

I am trying to push a view controller on the navigation stack with following code in my buttonPressed method
-(IBAction) viewButtonPressed:(id)sender {
PersonDetailViewController *personDetailViewController = [[PersonDetailViewController alloc] initWithNibName:#"PersonDetailViewController" bundle:nil];
[self.navigationController pushViewController:personDetailViewController animated:YES];
[personDetailViewController release];
}
I ran the debugger and it throws the exception after followin line is stepped over from above code.
[self.navigationController pushViewController:personDetailViewController animated:YES];
This is pretty standard call ... it has worked many times before without any problems. Any idea what am I missing here?
I am stuck at this point and not able to drill down further.
Here are the error messages on the console after running the debugger
2009-10-30 18:15:11.127 Untitled[6089:20b] * -[NSCFString image]: unrecognized selector sent to instance 0x3050
2009-10-30 18:15:11.129 Untitled[6089:20b] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSCFString image]: unrecognized selector sent to instance 0x3050'
2009-10-30 18:15:11.130 Untitled[6089:20b] Stack: (
807902715,
2460638779 ...
The problem was in one of the init methods where I was setting the back button item incorrectly.
I would start by looking inside the view lifecycle methods - viewWillAppear, viewDidAppear etc. - in the PersonDetailViewController class for invocations of a method named image on some object instance.
You can also try stepping through these methods in an attempt to narrow down where this invocation is made.