let content: FBSDKShareLinkContent = FBSDKShareLinkContent()
content.contentURL = NSURL(string: "https://www.google.com")
content.contentTitle = "ContentTitle"
content.contentDescription = "ContentDescription"
let shareDialog = FBSDKShareDialog();
shareDialog.mode = .Browser
shareDialog.shareContent = content
shareDialog.show()
This is the code I used to share.
While sharing i getting the crash like below
'NSInvalidArgumentException', reason: '-[FBSDKApplicationDelegate openBridgeAPIRequest:useSafariViewController:fromViewController:completionBlock:]: unrecognized selector sent to instance 0x7fa69031c9d0'
*** First throw call stack:
(
0 CoreFoundation 0x000000010c2f1e65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010bcd8deb objc_exception_throw + 48
2 CoreFoundation 0x000000010c2fa48d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x000000010c24790a ___forwarding___ + 970
4 CoreFoundation 0x000000010c2474b8 _CF_forwarding_prep_0 + 120
5 Store 0x000000010a42a858 -[FBSDKShareDialog _showBrowser:] + 417
6 Store 0x000000010a4297c8 -[FBSDKShareDialog show] + 327
7 Store 0x000000010a351d47 _TFC5Store25StorePlayerViewController17didTapShareButtonfS0_FSiT_ + 1847
8 Store 0x000000010a351e6a _TToFC5Store25StorePlayerViewController17didTapShareButtonfS0_FSiT_ + 42
9 Store 0x000000010a35acb0 _TTDFC5Store25StorePlayerViewController17didTapShareButtonfS0_FSiT_ + 48
10 Store 0x000000010a35231d _TTWC5Store25StorePlayerViewControllerS_31DopeMeterViewControllerDelegateS_FS1_17didTapShareButtonuRq_S1__fq_FSiT_ + 45
11 Store 0x000000010a3e24c9 _TFC5Store23DopeMeterViewController12OnShareClickfS0_FCSo8UIButtonT_ + 201
12 Store 0x000000010a3e254a _TToFC5Store23DopeMeterViewController12OnShareClickfS0_FCSo8UIButtonT_ + 58
13 UIKit 0x000000010c6a1194 -[UIApplication sendAction:to:from:forEvent:] + 92
14 UIKit 0x000000010c8106fc -[UIControl sendAction:to:forEvent:] + 67
15 UIKit 0x000000010c8109c8 -[UIControl _sendActionsForEvents:withEvent:] + 311
16 UIKit 0x000000010c80faf8 -[UIControl touchesEnded:withEvent:] + 601
17 UIKit 0x000000010c71049b -[UIWindow _sendTouchesForEvent:] + 835
18 UIKit 0x000000010c7111d0 -[UIWindow sendEvent:] + 865
19 UIKit 0x000000010c6bfb66 -[UIApplication sendEvent:] + 263
20 UIKit 0x000000010c699d97 _UIApplicationHandleEventQueue + 6844
21 CoreFoundation 0x000000010c21da31 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
22 CoreFoundation 0x000000010c21395c __CFRunLoopDoSources0 + 556
23 CoreFoundation 0x000000010c212e13 __CFRunLoopRun + 867
24 CoreFoundation 0x000000010c212828 CFRunLoopRunSpecific + 488
25 GraphicsServices 0x000000010f640ad2 GSEventRunModal + 161
26 UIKit 0x000000010c69f610 UIApplicationMain + 171
27 doopaadoo 0x00000001090a019d main + 109
28 libdyld.dylib 0x0000000112cb192d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
I search lot bt cant find any solution.
Related
My app keeps crashing whenever I tap on a UITextField that I add to my view programmatically. Here is the stack trace if it is of any help:
'NSInvalidArgumentException', reason: '-[Clifford_Bradford.OtherVehiclesViewController numOfOtherVehiclesUpdated:]: unrecognized selector sent to instance 0x7fd92a57f8d0'
*** First throw call stack:
(
0 CoreFoundation 0x0000000107e5dc65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x00000001099c8bb7 objc_exception_throw + 45
2 CoreFoundation 0x0000000107e650ad -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x0000000107dbb13c ___forwarding___ + 988
4 CoreFoundation 0x0000000107dbacd8 _CF_forwarding_prep_0 + 120
5 UIKit 0x00000001086fdd62 -[UIApplication sendAction:to:from:forEvent:] + 75
6 UIKit 0x000000010880f50a -[UIControl _sendActionsForEvents:withEvent:] + 467
7 UIKit 0x0000000108e26d39 -[UITextField _resignFirstResponder] + 256
8 UIKit 0x0000000108e26bab -[UITextField _finishResignFirstResponder] + 45
9 UIKit 0x000000010888078b -[UIResponder resignFirstResponder] + 114
10 UIKit 0x0000000108e26b04 -[UITextField resignFirstResponder] + 114
11 UIKit 0x0000000108880575 -[UIResponder becomeFirstResponder] + 284
12 UIKit 0x000000010876fb81 -[UIView(Hierarchy) becomeFirstResponder] + 99
13 UIKit 0x0000000108e26307 -[UITextField becomeFirstResponder] + 51
14 UIKit 0x0000000108ab5d4e -[UITextInteractionAssistant(UITextInteractionAssistant_Internal) setFirstResponderIfNecessary] + 177
15 UIKit 0x0000000108ab7dc0 -[UITextInteractionAssistant(UITextInteractionAssistant_Internal) oneFingerTap:] + 2263
16 UIKit 0x0000000108aad656 _UIGestureRecognizerSendActions + 262
17 UIKit 0x0000000108aac2f9 -[UIGestureRecognizer _updateGestureWithEvent:buttonEvent:] + 532
18 UIKit 0x0000000108ab0f16 ___UIGestureRecognizerUpdate_block_invoke662 + 51
19 UIKit 0x0000000108ab0e12 _UIGestureRecognizerRemoveObjectsFromArrayAndApplyBlocks + 254
20 UIKit 0x0000000108aa6e8d _UIGestureRecognizerUpdate + 2796
21 UIKit 0x000000010874a646 -[UIWindow _sendGesturesForEvent:] + 1041
22 UIKit 0x000000010874b272 -[UIWindow sendEvent:] + 666
23 UIKit 0x0000000108711541 -[UIApplication sendEvent:] + 246
24 UIKit 0x000000010871ecdc _UIApplicationHandleEventFromQueueEvent + 18265
25 UIKit 0x00000001086f959c _UIApplicationHandleEventQueue + 2066
26 CoreFoundation 0x0000000107d91431 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
27 CoreFoundation 0x0000000107d872fd __CFRunLoopDoSources0 + 269
28 CoreFoundation 0x0000000107d86934 __CFRunLoopRun + 868
29 CoreFoundation 0x0000000107d86366 CFRunLoopRunSpecific + 470
30 GraphicsServices 0x000000010be31a3e GSEventRunModal + 161
31 UIKit 0x00000001086fc8c0 UIApplicationMain + 1282
32 Clifford Bradford 0x0000000107c33bb7 main + 135
33 libdyld.dylib 0x000000010a0fe145 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException`.
It just points me to the first line of the AppDelegate.swift which doesn't really help me. Here is the corresponding code that adds the textField to the view. I would like to add that the contView is inside a scrollView.
var otherVehiclePlateNum:UITextField = UITextField(frame: CGRectMake(carLabel.bounds.origin.x + 15, carLabel.frame.maxY + 10, self.contView.frame.width - 30, 25))
otherVehiclePlateNum.placeholder = "TEST"
self.contView.addSubview(otherVehiclePlateNum)
Thanks so much for your help, I've been stuck on this.
Look at the first line: Does the method numOfOtherVehiclesUpdated: actually exist in the OtherVehiclesViewController class? Make sure that that if you're calling any #selectors that the colon matches the signature (i.e., you may have a numOfOtherVehiclesUpdated method, which isn't the same as numOfOtherVehiclesUpdated: which takes a parameter).
Look there first - you may be calling that by accident
Hello have crash app in IOS
This log:
2015-01-15 13:23:32.490 App[23898:1611888] <Google> Category methods are not loaded. Make sure you link the Google Mobile Ads library using one of the -ObjC, -force_load, or -all_load linker flags. See https://developers.google.com/mobile-ads-sdk/docs/#ios for more information.
2015-01-15 13:23:34.526 App[23898:1611888] registerForRemoteNotificationTypes: is not supported in iOS 8.0 and later.
2015-01-15 13:23:34.802 App[23898:1611888] +[NSDecimalNumber gad_negativeOne]: unrecognized selector sent to class 0x7d7400
2015-01-15 13:23:34.805 App[23898:1611888] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[NSDecimalNumber gad_negativeOne]: unrecognized selector sent to class 0x7d7400'
*** First throw call stack:
(
0 CoreFoundation 0x03278946 __exceptionPreprocess + 182
1 libobjc.A.dylib 0x02be0a97 objc_exception_throw + 44
2 CoreFoundation 0x03280465 +[NSObject(NSObject) doesNotRecognizeSelector:] + 277
3 CoreFoundation 0x031c93e7 ___forwarding___ + 1047
4 CoreFoundation 0x031c8fae _CF_forwarding_prep_0 + 14
5 App 0x000872ea -[GADStatisticDictionary decrementNumberForKey:shouldNotifyDelegate:] + 58
6 App 0x0007cc75 -[GADApplication init] + 512
7 App 0x0007ca45 __35+[GADApplication sharedApplication]_block_invoke + 55
8 libdispatch.dylib 0x03ecde2f _dispatch_client_callout + 14
9 libdispatch.dylib 0x03eb876c dispatch_once_f + 363
10 libdispatch.dylib 0x03eb85fc dispatch_once + 31
11 App 0x0007ca0c +[GADApplication sharedApplication] + 113
12 App 0x000780cd +[GADSlot initialize] + 67
13 libobjc.A.dylib 0x02be1461 _class_initialize + 576
14 libobjc.A.dylib 0x02be9fe5 lookUpImpOrForward + 339
15 libobjc.A.dylib 0x02be9e8d _class_lookupMethodAndLoadCache3 + 55
16 libobjc.A.dylib 0x02bf412f objc_msgSend + 139
17 App 0x00075f6a -[GADBannerView commonInitWithAdSize:] + 42
18 App 0x0007626e -[GADBannerView initWithCoder:] + 163
19 UIKit 0x00c5205e -[UIClassSwapper initWithCoder:] + 239
20 UIKit 0x00de7f1a UINibDecoderDecodeObjectForValue + 739
21 UIKit 0x00de7c2f -[UINibDecoder decodeObjectForKey:] + 371
22 UIKit 0x00c51bf1 -[UIRuntimeConnection initWithCoder:] + 189
23 UIKit 0x00de7f1a UINibDecoderDecodeObjectForValue + 739
24 UIKit 0x00de811c UINibDecoderDecodeObjectForValue + 1253
25 UIKit 0x00de7c2f -[UINibDecoder decodeObjectForKey:] + 371
26 UIKit 0x00c50ea7 -[UINib instantiateWithOwner:options:] + 1164
27 UIKit 0x00a73624 -[UIViewController _loadViewFromNibNamed:bundle:] + 270
28 UIKit 0x00a73dbb -[UIViewController loadView] + 295
29 UIKit 0x00a73fef -[UIViewController loadViewIfRequired] + 78
30 UIKit 0x00a74595 -[UIViewController view] + 35
31 UIKit 0x0096b825 -[UIWindow addRootViewControllerViewIfPossible] + 66
32 UIKit 0x0096bc99 -[UIWindow _setHidden:forced:] + 287
33 UIKit 0x0096bf50 -[UIWindow _orderFrontWithoutMakingKey] + 49
34 UIKit 0x0097a28d -[UIWindow makeKeyAndVisible] + 80
35 UIKit 0x00917776 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 3108
36 UIKit 0x0091ac0d -[UIApplication _runWithMainScene:transitionContext:completion:] + 1639
37 UIKit 0x009337d0 __84-[UIApplication _handleApplicationActivationWithScene:transitionContext:completion:]_block_invoke + 59
38 UIKit 0x0091981f -[UIApplication workspaceDidEndTransaction:] + 155
39 FrontBoardServices 0x05b799de __37-[FBSWorkspace clientEndTransaction:]_block_invoke_2 + 71
40 FrontBoardServices 0x05b7946f __40-[FBSWorkspace _performDelegateCallOut:]_block_invoke + 54
41 FrontBoardServices 0x05b8b425 __31-[FBSSerialQueue performAsync:]_block_invoke + 26
42 CoreFoundation 0x0319c1c0 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 16
43 CoreFoundation 0x03191ad3 __CFRunLoopDoBlocks + 195
44 CoreFoundation 0x03191238 __CFRunLoopRun + 936
45 CoreFoundation 0x03190bcb CFRunLoopRunSpecific + 443
46 CoreFoundation 0x031909fb CFRunLoopRunInMode + 123
47 UIKit 0x009191e4 -[UIApplication _run] + 571
48 UIKit 0x0091c8b6 UIApplicationMain + 1526
49 App 0x0005991d main + 141
50 libdyld.dylib 0x03ef9ac9 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Try to add -ObjC to Other Linker Flags in the Build Settings tab.
I'm trying to get some rows from DynamoDB in a Swift application. At the very last line in my code below I get a NSInvalidArgumentException. I think it must be because my request is not formatted correctly, but I don't know what is wrong. In the docs (batch operation sample) for the java sdk they use TableKeysAndAttributes, which doesn't seem to exist in the iOS SDK.
Here is my code:
var venueIdAttribute = AWSDynamoDBAttributeValue()
venueIdAttribute.N = "2164156"
var venueIdCondition = AWSDynamoDBCondition()
venueIdCondition.comparisonOperator = .EQ // Hash Key must always be Equals
venueIdCondition.attributeValueList = [venueIdAttribute]
var startDateAttribute = AWSDynamoDBAttributeValue()
var startString = String(format:"%1.0f", lastSyncDate.timeIntervalSince1970 * 1000)
startDateAttribute.N = String(format:"%1.0f", lastSyncDate.timeIntervalSince1970 * 1000)
var dateCondition = AWSDynamoDBCondition()
dateCondition.comparisonOperator = .GT
dateCondition.attributeValueList = [startDateAttribute];
var keysArray : NSArray = [["venueId" : venueIdCondition, "dateInterval" : dateCondition]]
var tableDict : NSDictionary = ["Keys":keysArray]
var requestMap : NSDictionary = ["myTable":tableDict]
var request : AWSDynamoDBBatchGetItemInput = AWSDynamoDBBatchGetItemInput()
request.requestItems = requestMap
request.returnConsumedCapacity = AWSDynamoDBReturnConsumedCapacity.Total
var response : BFTask = dynamoDB.batchGetItem(request) // This is synchronous
Here is the error:
2014-12-18 13:23:17.002 TouchDashboard[8066:503166] +[NSDictionaryI JSONKeyPathsByPropertyKey]: unrecognized selector sent to class 0x10a9930e8
2014-12-18 13:23:17.010 TouchDashboard[8066:503166] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[__NSDictionaryI JSONKeyPathsByPropertyKey]: unrecognized selector sent to class 0x10a9930e8'
*** First throw call stack:
(
0 CoreFoundation 0x000000010a6ebf35 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010c5b1bb7 objc_exception_throw + 45
2 CoreFoundation 0x000000010a6f2f4d +[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x000000010a64b27c ___forwarding_ + 988
4 CoreFoundation 0x000000010a64ae18 _CF_forwarding_prep_0 + 120
5 TouchDashboard 0x0000000109b1176a -[MTLJSONAdapter initWithModel:] + 490
6 TouchDashboard 0x0000000109b0fc47 +[MTLJSONAdapter JSONDictionaryFromModel:] + 87
7 TouchDashboard 0x00000001099a47c5 +[AZModelUtility JSONDictionaryFromMapMTLDictionary:] + 517
8 TouchDashboard 0x0000000109a91c5b 59+[AWSDynamoDBBatchGetItemInput requestItemsJSONTransformer]_block_invoke_2 + 75
9 TouchDashboard 0x0000000109b21718 -[MTLReversibleValueTransformer reverseTransformedValue:] + 88
10 TouchDashboard 0x0000000109b11b90 __32-[MTLJSONAdapter JSONDictionary]_block_invoke + 480
11 CoreFoundation 0x000000010a62d766 __65-[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:]_block_invoke + 102
12 CoreFoundation 0x000000010a62d66c -[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] + 204
13 TouchDashboard 0x0000000109b1192c -[MTLJSONAdapter JSONDictionary] + 300
14 TouchDashboard 0x0000000109b0fc5b +[MTLJSONAdapter JSONDictionaryFromModel:] + 107
15 TouchDashboard 0x00000001099a6829 -[AWSDynamoDB invokeRequest:HTTPMethod:URLString:targetPrefix:operationName:outputClass:] + 313
16 TouchDashboard 0x00000001099a6bd9 -[AWSDynamoDB batchGetItem:] + 153
17 TouchDashboard 0x000000010991a0d7 _TFC14TouchDashboard14ViewController9batchSyncfS0_FT_T_ + 10663
18 TouchDashboard 0x0000000109917349 _TFC14TouchDashboard14ViewController11viewDidLoadfS0_FT_T_ + 1161
19 TouchDashboard 0x0000000109917462 _TToFC14TouchDashboard14ViewController11viewDidLoadfS0_FT_T_ + 34
20 UIKit 0x000000010b41ea90 -[UIViewController loadViewIfRequired] + 738
21 UIKit 0x000000010b41ec8e -[UIViewController view] + 27
22 UIKit 0x000000010b33dca9 -[UIWindow addRootViewControllerViewIfPossible] + 58
23 UIKit 0x000000010b33e041 -[UIWindow _setHidden:forced:] + 247
24 UIKit 0x000000010b34a72c -[UIWindow makeKeyAndVisible] + 42
25 UIKit 0x000000010b2f5061 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 2628
26 UIKit 0x000000010b2f7d2c -[UIApplication _runWithMainScene:transitionContext:completion:] + 1350
27 UIKit 0x000000010b2f6bf2 -[UIApplication workspaceDidEndTransaction:] + 179
28 FrontBoardServices 0x000000010ebe92a3 __31-[FBSSerialQueue performAsync:]_block_invoke + 16
29 CoreFoundation 0x000000010a62153c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK + 12
30 CoreFoundation 0x000000010a617285 __CFRunLoopDoBlocks + 341
31 CoreFoundation 0x000000010a616a43 __CFRunLoopRun + 851
32 CoreFoundation 0x000000010a616486 CFRunLoopRunSpecific + 470
33 UIKit 0x000000010b2f6669 -[UIApplication _run] + 413
34 UIKit 0x000000010b2f9420 UIApplicationMain + 1282
35 TouchDashboard 0x000000010992ba2e top_level_code + 78
36 TouchDashboard 0x000000010992ba6a main + 42
37 libdyld.dylib 0x000000010cd8b145 start + 1
38 ??? 0x0000000000000001 0x0 + 1
AWSDynamoDBBatchGetItemInput's requestItems property needs to be a dictionary of the following key/value pair:
NSString (a table name) : AWSDynamoDBKeysAndAttributes (KeysAndAttributes)
Currently, you are passing an instance of NSDictionary as a value. Once you update your code snippet to use AWSDynamoDBKeysAndAttributes, it should work.
can someone give me a hint why i always geht an
"DSJSONRPC doesNotRecognizeSelector" when calling jsonrpc interface from XBMC?
Result in console:
*** JSON-RPC REQUEST:
{
id = 654509193;
jsonrpc = "2.0";
method = "Player.GetActivePlayers";
params = {
};
}
Code:
DSJSONRPC *jsonRPC = [[DSJSONRPC alloc] initWithServiceEndpoint:[NSURL URLWithString:#"http://192.168.1.101:8080/jsonrpc"]];
[jsonRPC callMethod:#"Player.GetActivePlayers" withParameters:#{ }
onCompletion:^(NSString *methodName, NSInteger callId, id methodResult, DSJSONRPCError *methodError, NSError* internalError)
Using DSJSONRPC from Demiurgic JSON RPC
Can't find the error - on XBMC a movie is playing at this time...
Thanks in advance,
cheese
here the error stack:
2013-12-22 22:02:52.846 XBMCapp[3529:70b] *** JSON-RPC REQUEST:
{
id = "-1698136466";
jsonrpc = "2.0";
method = "Player.GetActivePlayers";
params = {
};
}
2013-12-22 22:02:52.847 XBMCapp[3529:70b] Error:<DSJSONRPC: 0x95c11b0>
2013-12-22 22:02:52.847 XBMCapp[3529:70b] -[DSJSONRPC localizedDescription]: unrecognized selector sent to instance 0x95c11b0
2013-12-22 22:02:52.873 XBMCapp[3529:70b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[DSJSONRPC localizedDescription]: unrecognized selector sent to instance 0x95c11b0'
*** First throw call stack:
(
0 CoreFoundation 0x01ef25e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x018058b6 objc_exception_throw + 44
2 CoreFoundation 0x01f8f903 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
3 CoreFoundation 0x01ee290b ___forwarding___ + 1019
4 CoreFoundation 0x01ee24ee _CF_forwarding_prep_0 + 14
5 XBMCapp 0x000109ab -[DSJSONRPC callMethod:withParameters:onCompletion:] + 477
6 XBMCapp 0x000054df -[RootViewController nowplayingAction:] + 298
7 libobjc.A.dylib 0x01817874 -[NSObject performSelector:withObject:withObject:] + 77
8 UIKit 0x004780c2 -[UIApplication sendAction:to:from:forEvent:] + 108
9 UIKit 0x0074cc9b -[UIBarButtonItem(UIInternal) _sendAction:withEvent:] + 139
10 libobjc.A.dylib 0x01817874 -[NSObject performSelector:withObject:withObject:] + 77
11 UIKit 0x004780c2 -[UIApplication sendAction:to:from:forEvent:] + 108
12 UIKit 0x0047804e -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 61
13 UIKit 0x005700c1 -[UIControl sendAction:to:forEvent:] + 66
14 UIKit 0x00570484 -[UIControl _sendActionsForEvents:withEvent:] + 577
15 UIKit 0x0056f733 -[UIControl touchesEnded:withEvent:] + 641
16 UIKit 0x004b551d -[UIWindow _sendTouchesForEvent:] + 852
17 UIKit 0x004b6184 -[UIWindow sendEvent:] + 1232
18 UIKit 0x00489e86 -[UIApplication sendEvent:] + 242
19 UIKit 0x0047418f _UIApplicationHandleEventQueue + 11421
20 CoreFoundation 0x01e7b83f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
21 CoreFoundation 0x01e7b1cb __CFRunLoopDoSources0 + 235
22 CoreFoundation 0x01e9829e __CFRunLoopRun + 910
23 CoreFoundation 0x01e97ac3 CFRunLoopRunSpecific + 467
24 CoreFoundation 0x01e978db CFRunLoopRunInMode + 123
25 GraphicsServices 0x02d889e2 GSEventRunModal + 192
26 GraphicsServices 0x02d88809 GSEventRun + 104
27 UIKit 0x00476d3b UIApplicationMain + 1225
28 XBMCapp 0x0000234b main + 93
29 libdyld.dylib 0x02a2a70d start + 1
30 ??? 0x00000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
ok, found the problem - perhaps I have an old version of the JSON class...
There was an uninitialised error variable...
changing it to nil then everything works like a charm.
thanks anyway :)
I'm calling methods dynamically by name. this is the code I'm using:
NSString *methodName=[NSString stringWithFormat:#"%#HintButton",stringForPredicate];
SEL s = NSSelectorFromString(methodName);
[self performSelector:s withObject:hItem];
I Checked and s value is
AnotherSoundHintButton
I have the following method in my code:
- (void )AnotherSoundHintButton:(HintItem*) hItem {
[self PlaySound:hItem.hint];
}
but when I run my app I'm getting the following error:
2013-05-29 12:18:39.945 Game[19668:c07] -[SoundViewController AnotherSoundHintButton]: unrecognized selector sent to instance 0x8c60e90
2013-05-29 12:18:39.946 Game[19668:c07] Uncaught exception: -[SoundViewController AnotherSoundHintButton]: unrecognized selector sent to instance 0x8c60e90
2013-05-29 12:18:39.947 Game[19668:c07] Stack trace: (
0 CoreFoundation 0x01c4202e __exceptionPreprocess + 206
1 libobjc.A.dylib 0x019b5e7e objc_exception_throw + 44
2 CoreFoundation 0x01ccd4bd -[NSObject(NSObject) doesNotRecognizeSelector:] + 253
3 CoreFoundation 0x01c31bbc ___forwarding___ + 588
4 CoreFoundation 0x01c3194e _CF_forwarding_prep_0 + 14
5 libobjc.A.dylib 0x019c96b0 -[NSObject performSelector:withObject:] + 70
6 Game 0x00008ab9 -[SoundViewController alertView:clickedButtonAtIndex:] + 969
7 UIKit 0x00ced0bc -[UIAlertView(Private) _buttonClicked:] + 294
8 libobjc.A.dylib 0x019c9705 -[NSObject performSelector:withObject:withObject:] + 77
9 UIKit 0x008fd2c0 -[UIApplication sendAction:to:from:forEvent:] + 96
10 UIKit 0x008fd258 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 61
11 UIKit 0x009be021 -[UIControl sendAction:to:forEvent:] + 66
12 UIKit 0x009be57f -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 578
13 UIKit 0x009bd6e8 -[UIControl touchesEnded:withEvent:] + 546
14 UIKit 0x0092ccef -[UIWindow _sendTouchesForEvent:] + 846
15 UIKit 0x0092cf02 -[UIWindow sendEvent:] + 273
16 UIKit 0x0090ad4a -[UIApplication sendEvent:] + 436
17 UIKit 0x008fc698 _UIApplicationHandleEvent + 9874
18 GraphicsServices 0x02ab8df9 _PurpleEventCallback + 339
19 GraphicsServices 0x02ab8ad0 PurpleEventCallback + 46
20 CoreFoundation 0x01bb7bf5 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
21 CoreFoundation 0x01bb7962 __CFRunLoopDoSource1 + 146
22 CoreFoundation 0x01be8bb6 __CFRunLoopRun + 2118
23 CoreFoundation 0x01be7f44 CFRunLoopRunSpecific + 276
24 CoreFoundation 0x01be7e1b CFRunLoopRunInMode + 123
25 GraphicsServices 0x02ab77e3 GSEventRunModal + 88
26 GraphicsServices 0x02ab7668 GSEventRun + 104
27 UIKit 0x008f9ffc UIApplicationMain + 1211
28 Game 0x00002724 main + 164
29 Game 0x00002635 start + 53
)
Try this :
NSString *methodName=[NSString stringWithFormat:#"%#HintButton:",stringForPredicate];
The colon after "HintButton" is important.
add column(:) after AnotherSoundHintButton
AnotherSoundHintButton: