[GADSlot state]: unrecognized selector sent to instance in iphone - ios

I am new to iOS development.
I am trying to implementing admob ads in iOS in my phonegap app so I googled & found somveadmob without plugin.
after following all procedure,
I got an error MyApp[2388:70b] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[GADSlot state]: unrecognized selector sent to instance 0x10415920'**
so I google about & found that I have to change other Linker flags. (-ObjC)here
I have tried it but it is not working.
I am getting this error.
this solution also not working for me. [GADSlot state]: unrecognized selector sent to instance
2014-04-21 13:04:41.252 MyApp[2388:70b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[GADSlot state]: unrecognized selector sent to instance 0x10415920'
*** First throw call stack:
(
0 CoreFoundation 0x038a85e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x02acb8b6 objc_exception_throw + 44
2 CoreFoundation 0x03945903 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
3 CoreFoundation 0x0389890b ___forwarding___ + 1019
4 CoreFoundation 0x038984ee _CF_forwarding_prep_0 + 14
5 MyApp 0x0001a01e -[GADSlot isMakingRequest] + 36
6 MyApp 0x00019c7d -[GADSlot setAdType:andReloadRequest:] + 334
7 MyApp 0x00018a5e -[GADBannerView setAdSize:andReload:] + 512
8 MyApp 0x00019052 -[GADBannerView setAdSize:] + 62
9 MyApp 0x00019381 -[GADBannerView initWithAdSize:] + 171
10 MyApp 0x00003e17 -[MainViewController viewDidLoad] + 118
11 UIKit 0x0021c318 -[UIViewController loadViewIfRequired] + 696
12 UIKit 0x0021c5b4 -[UIViewController view] + 35
13 MyApp 0x00002997 -[AppDelegate application:didFinishLaunchingWithOptions:] + 763
14 UIKit 0x00102355 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 309
15 UIKit 0x00102b95 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1536
16 UIKit 0x001073a8 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 824
17 UIKit 0x0011b87c -[UIApplication handleEvent:withNewEvent:] + 3447
18 UIKit 0x0011bde9 -[UIApplication sendEvent:] + 85
19 UIKit 0x00109025 _UIApplicationHandleEvent + 736
20 GraphicsServices 0x038062f6 _PurpleEventCallback + 776
21 GraphicsServices 0x03805e01 PurpleEventCallback + 46
22 CoreFoundation 0x03823d65 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
23 CoreFoundation 0x03823a9b __CFRunLoopDoSource1 + 523
24 CoreFoundation 0x0384e77c __CFRunLoopRun + 2156
25 CoreFoundation 0x0384dac3 CFRunLoopRunSpecific + 467
26 CoreFoundation 0x0384d8db CFRunLoopRunInMode + 123
27 UIKit 0x00106add -[UIApplication _run] + 840
28 UIKit 0x00108d3b UIApplicationMain + 1225
29 MyApp 0x000025fd main + 95
30 MyApp 0x00002595 start + 53
)
libc++abi.dylib: terminating with uncaught exception of type NSException
please help me out.
main.m
#import <UIKit/UIKit.h>
int main(int argc, char *argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
int retVal = UIApplicationMain(argc, argv, nil, #"AppDelegate");//It highlight this line when exception accoure.
[pool release];
return retVal;
}
MainViewController.m
- (void) viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
bannerView_ = [[GADBannerView alloc]initWithAdSize:kGADAdSizeSmartBannerPortrait];
CGRect screenRect = [[UIScreen mainScreen] bounds];
CGFloat screenWidth = screenRect.size.width;
CGFloat screenHeight = screenRect.size.height;
CGFloat screenXPos = (screenWidth/2);
CGFloat screenYPos = screenHeight - kGADAdSizeBanner.size.height;
[bannerView_ setCenter:CGPointMake(screenXPos, screenYPos)];
bannerView_.adUnitID = MY_BANNER_UNIT_ID;
bannerView_.rootViewController = self;
[self.view addSubview:bannerView_];
GADRequest *request = [GADRequest request];
request.testing = NO;
[bannerView_ loadRequest:request];
}

I think, GADBannerView is not set up correctly. If you have the source for GADBannerView, examine it and see where the object reference is coming from.U should try to solve this error in that direction.
check ur admob version as well, becoz GDBBannerview is a part of Admob this might accour from that code.
or else try with other (older or newer version) of admob api.

Related

Terminating app due to uncaught exception 'NSInvalidArgumentException' unrecognized selector sent to instance Objective-C Singleton

I am debugging very old code that is still being used in our app due to a crash that it's causing in our app. The error is Objective-C related:
The crash:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[TrackService exit]: unrecognized selector sent to instance 0x281cb4380'
The code where it crashes:
#implementation TrackService
+ (TrackService *)sharedService
{
DEFINE_SHARED_INSTANCE_USING_BLOCK(^{
return [[self alloc] init];
});
}
/*
GCD Singleton
*/
#define DEFINE_SHARED_INSTANCE_USING_BLOCK(block) \
static dispatch_once_t pred = 0; \
__strong static id _sharedObject = nil; \
dispatch_once(&pred, ^{ \
_sharedObject = block(); \
}); \
\
return _sharedObject;
#endif
Stack Trace:
2020-02-11 09:49:35.737492+0200 TestApp[79860:6925721] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[TrackService exit]: unrecognized selector sent to instance 0x600001dc6380'
*** First throw call stack:
(
0 CoreFoundation 0x000000010ee3b1bb __exceptionPreprocess + 331
1 libobjc.A.dylib 0x000000010e3d9735 objc_exception_throw + 48
2 CoreFoundation 0x000000010ee59f44 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
3 CoreFoundation 0x000000010ee3fed6 ___forwarding___ + 1446
4 CoreFoundation 0x000000010ee41da8 _CF_forwarding_prep_0 + 120
5 TestApp 0x00000001029b6575 $s2017fromNavControllerSbSS_SDySSypGSgSo012UINavigationK0CSgtFySSSgcfU13_ + 165
6 TestApp 0x00000001029b663f $sSSSgIegg_So8NSStringCSgIeyBy_TR + 175
7 TestApp 0x000000010249decf -[TrackViewController exit:] + 1551
8 TestApp 0x000000010249e275 __36-[TrackViewController exit:]_block_invoke + 757
9 TestApp 0x000000010246834c -[TrackViewController pickAction:] + 220
10 UIKitCore 0x0000000115a2cecb -[UIApplication sendAction:to:from:forEvent:] + 83
11 UIKitCore 0x000000011516d95b __45-[_UIButtonBarTargetAction _invoke:forEvent:]_block_invoke + 154
12 UIKitCore 0x000000011516d894 -[_UIButtonBarTargetAction _invoke:forEvent:] + 152
13 UIKitCore 0x0000000115a2cecb -[UIApplication sendAction:to:from:forEvent:] + 83
14 UIKitCore 0x00000001154680bd -[UIControl sendAction:to:forEvent:] + 67
15 UIKitCore 0x00000001154683da -[UIControl _sendActionsForEvents:withEvent:] + 450
16 UIKitCore 0x000000011546731e -[UIControl touchesEnded:withEvent:] + 583
17 UIKitCore 0x0000000115a680a4 -[UIWindow _sendTouchesForEvent:] + 2729
18 UIKitCore 0x0000000115a697a0 -[UIWindow sendEvent:] + 4080
19 UIKitCore 0x0000000115a47394 -[UIApplication sendEvent:] + 352
20 UIKitCore 0x0000000115b1c5a9 __dispatchPreprocessedEventFromEventQueue + 3054
21 UIKitCore 0x0000000115b1f1cb __handleEventQueueInternal + 5948
22 CoreFoundation 0x000000010eda0721 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
23 CoreFoundation 0x000000010ed9ff93 __CFRunLoopDoSources0 + 243
24 CoreFoundation 0x000000010ed9a63f __CFRunLoopRun + 1263
25 CoreFoundation 0x000000010ed99e11 CFRunLoopRunSpecific + 625
26 GraphicsServices 0x00000001141fc1dd GSEventRunModal + 62
27 UIKitCore 0x0000000115a2b81d UIApplicationMain + 140
28 TestApp 0x000000010262672b main + 75
29 libdyld.dylib 0x0000000110ab5575 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
The code crashes on this line TrackService.shared().exit()
I think you need to change return [[self alloc] init]; to return [[TrackService alloc] init]; but maybe even rewrite it so that it no longer use the #define, as below.
+ (TrackService *)sharedService
{
static TrackService * t;
static dispatch_once_t onceToken;
dispatch_once ( & onceToken, ^ { t = [[TrackService alloc] init]; } );
return t;
}
The problem was that there was no implementation of the exit function even though it was defined in the .h file.

Error EXC_BAD_ACCESS when pressing button

When i press my button, i got a error of access.
the error : Thread 1 : EXC_BAD_ACCESS(code=1,address=0xd0a937db)
TTest.h
#interface TTtest : NSObject
{
UIButton *monBouton ;
UIImage *skin;
}
- (void)initTest :(UIView*)vueDonne;
-(void)test:(id)sender;
TTest.m
- (void)initTest :(UIView*)vueDonne
{
skin = [UIImage imageWithContentsOfFile: [[NSBundle mainBundle] pathForResource:#"boutonG" ofType:#"png"]];
monBouton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
monBouton.frame = CGRectMake(50, 50, 45, 50);
[monBouton setImage:skin forState:UIControlStateNormal];
[monBouton addTarget:self action:#selector(test:) forControlEvents:UIControlEventTouchDown];
[vueDonne addSubview: monBouton];
}
-(void)test:(id)sender //didn't work because i have the probleme
{
NSLog(#"test clicked");
}
testViewController.m
- (void)viewDidLoad
{
[super viewDidLoad];
TTtest *test =[[TTtest alloc] init];
[test initTest:_testView]; //View of my application
}
EDIT:
If i add monBouton = [[UIButton alloc] init];
I get a problem of SIGABRT
2014-10-26 16:47:22.827 testAsk[2134:a0b] -[CALayerArray test:]: unrecognized selector sent to instance 0xa141ea0
2014-10-26 16:47:22.831 testAsk[2134:a0b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[CALayerArray test:]: unrecognized selector sent to instance 0xa141ea0'
*** First throw call stack:
(
0 CoreFoundation 0x017395e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x014bc8b6 objc_exception_throw + 44
2 CoreFoundation 0x017d6903 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
3 CoreFoundation 0x0172990b ___forwarding___ + 1019
4 CoreFoundation 0x017294ee _CF_forwarding_prep_0 + 14
5 libobjc.A.dylib 0x014ce874 -[NSObject performSelector:withObject:withObject:] + 77
6 UIKit 0x0022c0c2 -[UIApplication sendAction:to:from:forEvent:] + 108
7 UIKit 0x0022c04e -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 61
8 UIKit 0x003240c1 -[UIControl sendAction:to:forEvent:] + 66
9 UIKit 0x00324484 -[UIControl _sendActionsForEvents:withEvent:] + 577
10 UIKit 0x003231fd -[UIControl touchesBegan:withEvent:] + 254
11 UIKit 0x0026934b -[UIWindow _sendTouchesForEvent:] + 386
12 UIKit 0x0026a184 -[UIWindow sendEvent:] + 1232
13 UIKit 0x0023de86 -[UIApplication sendEvent:] + 242
14 UIKit 0x0022818f _UIApplicationHandleEventQueue + 11421
15 CoreFoundation 0x016c283f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
16 CoreFoundation 0x016c21cb __CFRunLoopDoSources0 + 235
17 CoreFoundation 0x016df29e __CFRunLoopRun + 910
18 CoreFoundation 0x016deac3 CFRunLoopRunSpecific + 467
19 CoreFoundation 0x016de8db CFRunLoopRunInMode + 123
20 GraphicsServices 0x0368e9e2 GSEventRunModal + 192
21 GraphicsServices 0x0368e809 GSEventRun + 104
22 UIKit 0x0022ad3b UIApplicationMain + 1225
23 testAsk 0x000027bd main + 141
24 libdyld.dylib 0x01d75725 start + 0
25 ??? 0x00000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
The reason for the crash is that test object is dealloced when it receives the button action.
TTtest *test =[[TTtest alloc] init]; //dealloced after viewDidLoad
so try to make the test a property and use self.test.
self.test =[[TTtest alloc] init];
Doesn't look like you defined the selector "test"
-(void)test: (id) sender
NSLog(#"test clicked");
}

Calling method is causing Error creating LLDB target

I am trying to make my first Objective-C library. I am creating a method which will take in a UIImage and return NSMutableData. I have created the following:
+ (NSMutableData *)GetDataToSendToPrinter:(UIImage *)image
{
int maxWidth = 100;
BOOL drawerKick = YES;
BOOL compressionEnable = YES;
RasterDocument *rasterDoc = [[RasterDocument alloc] initWithDefaults:RasSpeed_Medium endOfPageBehaviour:RasPageEndMode_FeedAndFullCut endOfDocumentBahaviour:RasPageEndMode_FeedAndFullCut topMargin:RasTopMargin_Standard pageLength:0 leftMargin:0 rightMargin:0];
StarBitmap *starbitmap = [[StarBitmap alloc] initWithUIImage:image :maxWidth :false];
NSMutableData *commandsToPrint = [[NSMutableData alloc] init];
NSData *shortcommand = [rasterDoc BeginDocumentCommandData];
[commandsToPrint appendData:shortcommand];
shortcommand = [starbitmap getImageDataForPrinting:compressionEnable];
[commandsToPrint appendData:shortcommand];
shortcommand = [rasterDoc EndDocumentCommandData];
[commandsToPrint appendData:shortcommand];
if (drawerKick == YES) {
[commandsToPrint appendBytes:"\x07"
length:sizeof("\x07") - 1]; // KickCashDrawer
}
[starbitmap release];
[rasterDoc release];
return commandsToPrint;
}
Just for testing purposes, I am trying to call it from a button click event:
- (IBAction)DevButton_TouchUpInside:(id)sender {
UIImage *imageToPrint = [UIImage imageNamed:#"image1.png"];
// NSMutableData *commandsToPrint = [[NSMutableData alloc] init];
// *commandsToPrint=[self GetDataToSendToPrinter:imageToPrint];
//This is where I call it
NSMutableData *commandsToPrint = [self GetDataToSendToPrinter:imageToPrint];
int commandSize = (int)[commandsToPrint length];
unsigned char *dataToSentToPrinter = (unsigned char *)malloc(commandSize);
[commandsToPrint getBytes:dataToSentToPrinter];
NSString *portName = #"TCP:10.0.1.4";
NSString *portSettings = #"Standard";
NSMutableString *message;
SMPort *starPort = nil;
starPort = [SMPort getPort:portName :portSettings :10000];
[starPort writePort:dataToSentToPrinter :0 :commandSize];
}
However I keep getting the following crash when clicking on the button:
Warning: Error creating LLDB target at path '/Users/.../Library/Developer/Xcode/DerivedData/IOS_SDK-cjctcqoxudpegpadjbwitveqtkso/Build/Products/Debug-iphonesimulator/StarIO SDK.app'- using an empty LLDB target which can cause slow memory reads from remote devices.
2014-09-26 18:39:22.588 StarIO SDK[17823:513276] -[IOS_SDKViewControllerRasterMode GetDataToSendToPrinter:]: unrecognized selector sent to instance 0xb366260
2014-09-26 18:39:22.624 StarIO SDK[17823:513276] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[IOS_SDKViewControllerRasterMode GetDataToSendToPrinter:]: unrecognized selector sent to instance 0xb366260'
*** First throw call stack:
(
0 CoreFoundation 0x021c4df6 __exceptionPreprocess + 182
1 libobjc.A.dylib 0x01c49a97 objc_exception_throw + 44
2 CoreFoundation 0x021cca75 -[NSObject(NSObject) doesNotRecognizeSelector:] + 277
3 CoreFoundation 0x021159c7 ___forwarding___ + 1047
4 CoreFoundation 0x0211558e _CF_forwarding_prep_0 + 14
5 StarIO SDK 0x000428bb -[IOS_SDKViewControllerRasterMode DevButton_TouchUpInside:] + 107
6 libobjc.A.dylib 0x01c5f7cd -[NSObject performSelector:withObject:withObject:] + 84
7 UIKit 0x0042179d -[UIApplication sendAction:to:from:forEvent:] + 99
8 UIKit 0x0042172f -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 64
9 UIKit 0x00554a16 -[UIControl sendAction:to:forEvent:] + 69
10 UIKit 0x00554e33 -[UIControl _sendActionsForEvents:withEvent:] + 598
11 UIKit 0x0055409d -[UIControl touchesEnded:withEvent:] + 660
12 UIKit 0x00471aba -[UIWindow _sendTouchesForEvent:] + 874
13 UIKit 0x00472595 -[UIWindow sendEvent:] + 791
14 UIKit 0x00437aa9 -[UIApplication sendEvent:] + 242
15 UIKit 0x004478de _UIApplicationHandleEventFromQueueEvent + 20690
16 UIKit 0x0041c079 _UIApplicationHandleEventQueue + 2206
17 CoreFoundation 0x020e87bf __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
18 CoreFoundation 0x020de2cd __CFRunLoopDoSources0 + 253
19 CoreFoundation 0x020dd828 __CFRunLoopRun + 952
20 CoreFoundation 0x020dd1ab CFRunLoopRunSpecific + 443
21 CoreFoundation 0x020dcfdb CFRunLoopRunInMode + 123
22 GraphicsServices 0x03b8c24f GSEventRunModal + 192
23 GraphicsServices 0x03b8c08c GSEventRun + 104
24 UIKit 0x0041fe16 UIApplicationMain + 1526
25 StarIO SDK 0x000027e2 main + 130
26 libdyld.dylib 0x036f0ac9 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
I asume I am missing something really basic. It's the first Objective-C method I have created, I'm just looking at building a simple library I can then wrap in a Xamarin binding. Where am I going wrong?
You're calling a class method from an instance method.
+ (NSMutableData *)GetDataToSendToPrinter:(UIImage *)image //Should be called using the class name
- (IBAction)DevButton_TouchUpInside:(id)sender //Should be called using self
I'm not sure how that compiled actually, you should've gotten an error like this:
No visible #interface for IOS_SDKViewControllerRasterMode declares the selector 'GetDataToSendToPrinter:'
Per the log it spit out, it's not finding the function GetDataToSendToPrinter:. Try calling it as a class method:
NSMutableData *commandsToPrint = [IOS_SDKViewControllerRasterMode GetDataToSendToPrinter:imageToPrint];

How to add UIRefreshControl

I want to add UIRefreshControl to my app which fetches the records from the database when the table is pulled down , I have done the following code but it is giving me error like
2014-08-06 12:31:56.263 QuizUsindDB[1183:60b] -[ScoreViewController readScoreFromDatabase]: unrecognized selector sent to instance 0x8d3d8e0
2014-08-06 12:31:56.266 QuizUsindDB[1183:60b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[ScoreViewController readScoreFromDatabase]: unrecognized selector sent to instance 0x8d3d8e0'
*** First throw call stack:
(
0 CoreFoundation 0x018f81e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x016778e5 objc_exception_throw + 44
2 CoreFoundation 0x01995243 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
3 CoreFoundation 0x018e850b ___forwarding___ + 1019
4 CoreFoundation 0x018e80ee _CF_forwarding_prep_0 + 14
5 libobjc.A.dylib 0x0168982b -[NSObject performSelector:withObject:] + 70
6 UIKit 0x003393b9 -[UIApplication sendAction:to:from:forEvent:] + 108
7 UIKit 0x00339345 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 61
8 UIKit 0x0043abd1 -[UIControl sendAction:to:forEvent:] + 66
9 UIKit 0x0043afc6 -[UIControl _sendActionsForEvents:withEvent:] + 577
10 UIKit 0x0043ac06 -[UIControl sendActionsForControlEvents:] + 48
11 UIKit 0x00a227e9 -[UIRefreshControl _setRefreshControlState:notify:] + 404
12 UIKit 0x00a22650 -[UIRefreshControl setRefreshControlState:] + 48
21 CoreFoundation 0x0195d43e __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 14
22 CoreFoundation 0x0189e5cb __CFRunLoopRun + 1963
23 CoreFoundation 0x0189d9d3 CFRunLoopRunSpecific + 467
24 CoreFoundation 0x0189d7eb CFRunLoopRunInMode + 123
25 GraphicsServices 0x038ec5ee GSEventRunModal + 192
26 GraphicsServices 0x038ec42b GSEventRun + 104
27 UIKit 0x00337f9b UIApplicationMain + 1225
28 QuizUsindDB 0x0001038d main + 141
29 libdyld.dylib 0x01e41701 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Code for UIRefreshControl is given above:
-(void)pullToRefresh
{
self.refreshControl = [[UIRefreshControl alloc] init];
self.refreshControl.tintColor = [UIColor blackColor];
[self.refreshControl addTarget:self action:#selector(readScoreFromDatabase)
forControlEvents:UIControlEventValueChanged];
[self.myTable addSubview:self.refreshControl];
[self.refreshControl endRefreshing];
}
I have called [self pullToRefresh] in viewDidLoad .
I have the above code for initializing and calling a selector to refresh the table.
I am not able to recognise the error, can anyone point me out mistake.
Change this line:
[self.refreshControl endRefreshing];
To this:
[self.refreshControl beginRefreshing];
The endRefreshing method should be called after your table view has finished reloading data where necessary.
Also, the crash log indicates that your -[ScoreViewController readScoreFromDatabase]: function doesn't exist.

ABPeoplePickerNavigationController crashed while presentviewcontroller

Some one help me to fix this crash issue. I am not able to get the root cause of it.
ABPeoplePickerNavigationController *picker = [[ABPeoplePickerNavigationController alloc] init];
[self presentViewController:picker animated:YES completion:nil];
And I am getting the below crash, not sure why,
-[ABPeoplePickerNavigationController masterViewController]: unrecognized selector sent to instance 0xdd8cd40
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[ABPeoplePickerNavigationController masterViewController]: unrecognized selector sent to instance 0xdd8cd40'
*** First throw call stack:
(
0 CoreFoundation 0x03b5e5e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x031f28b6 objc_exception_throw + 44
2 CoreFoundation 0x03bfb903 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
3 CoreFoundation 0x03b4e90b ___forwarding___ + 1019
4 CoreFoundation 0x03b4e4ee _CF_forwarding_prep_0 + 14
5 UIKit 0x0271f544 -[UISearchDisplayController _areSearchContentsSplitViewMaster] + 63
6 UIKit 0x0271f6ac -[UISearchDisplayController _configureNewSearchBar] + 307
7 UIKit 0x0271ee63 -[UISearchDisplayController initWithSearchBar:contentsController:searchResultsTableViewStyle:] + 121
8 UIKit 0x0271ede5 -[UISearchDisplayController initWithSearchBar:contentsController:] + 55
9 AddressBookUI 0x03dffe5e -[ABMembersController contentView] + 1223
10 AddressBookUI 0x03e05d3e -[ABMembersViewController updateView] + 57
11 AddressBookUI 0x03e058b0 -[ABMembersViewController loadView] + 36
12 UIKit 0x0249d73e -[UIViewController loadViewIfRequired] + 78
13 UIKit 0x024c31a5 -[UINavigationController _layoutViewController:] + 39
14 UIKit 0x024c36bb -[UINavigationController _updateScrollViewFromViewController:toViewController:] + 235
15 UIKit 0x024c37b3 -[UINavigationController _startTransition:fromViewController:toViewController:] + 78
16 UIKit 0x024c472c -[UINavigationController _startDeferredTransitionIfNeeded:] + 645
17 UIKit 0x024c5349 -[UINavigationController __viewWillLayoutSubviews] + 57
18 UIKit 0x025fe39d -[UILayoutContainerView layoutSubviews] + 213
19 UIKit 0x024c1592 __53-[UINavigationController setNeedsDeferredTransition:]_block_invoke + 45
20 UIKit 0x023a6d33 ___afterCACommitHandler_block_invoke + 15
21 UIKit 0x023a6cde _applyBlockToCFArrayCopiedToStack + 403
22 UIKit 0x023a6b0a _afterCACommitHandler + 532
23 CoreFoundation 0x03b2653e __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30
24 CoreFoundation 0x03b2648f __CFRunLoopDoObservers + 399
25 CoreFoundation 0x03b043b4 __CFRunLoopRun + 1076
26 CoreFoundation 0x03b03b33 CFRunLoopRunSpecific + 467
27 CoreFoundation 0x03b0394b CFRunLoopRunInMode + 123
28 GraphicsServices 0x04df39d7 GSEventRunModal + 192
29 GraphicsServices 0x04df37fe GSEventRun + 104
30 UIKit 0x0238a94b UIApplicationMain + 1225
31 ShowRoomPrive 0x0026dfd5 main + 181
32 ShowRoomPrive 0x00002ba5 start + 53
)
libc++abi.dylib: terminating with uncaught exception of type NSException
use below code i think you had not added delegate and may this help you..
ABPeoplePickerNavigationController *picker =
[[ABPeoplePickerNavigationController alloc] init];
picker.peoplePickerDelegate = self;
[self presentViewController:picker animated:YES completion:nil];
or go through this url its will give you step by tutorial how to use it
http://yuvarajmanickam.wordpress.com/2012/09/19/get-contact-number-from-abpeoplepickernavigationcontroller-ios-apps/
or with apple documentation it is show helpfull
https://developer.apple.com/library/ios/documentation/ContactData/Conceptual/AddressBookProgrammingGuideforiPhone/Chapters/QuickStart.html

Resources