@property (nonatomic,assign) BOol isMyFan;@property (nonatomic,assign) BOol isMyFollow;@property (nonatomic,assign) NSInteger cityID;@property (nonatomic,assign) NSInteger provinceID;@property (nonatomic,assign) NSInteger locationID;2015-07-14 21:33:17.264 ATOMPSGod[48894:607] -[__NSCFString charValue]: unrecognized selector sent to instance 0x79fb77002015-07-14 21:33:17.268 ATOMPSGod[48894:607] *** Caught exception setting key "isMyFollow" : -[__NSCFString charValue]: unrecognized selector sent to instance 0x79fb77002015-07-14 21:33:17.277 ATOMPSGod[48894:607] *** Terminating app due to uncaught exception 'NSinvalidargumentexception',reason: '-[__NSCFString charValue]: unrecognized selector sent to instance 0x79fb7700'*** First throw call stack:( 0 CoreFoundation 0x026201e4 __exceptionPreprocess + 180 1 libobjc.A.dylib 0x022ba8e5 objc_exception_throw + 44 2 CoreFoundation 0x026bd243 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275 3 CoreFoundation 0x0261050b ___forwarding___ + 1019 4 CoreFoundation 0x026100ee _CF_forwarding_prep_0 + 14 5 Foundation 0x01f3eb39 _NSSetCharValueForKeyWithMethod + 67 6 Foundation 0x01ee727f _NSSetUsingkeyvalueSetter + 256 7 Foundation 0x01ee6731 -[NSObject(NSkeyvalueCoding) setValue:forKey:] + 267 8 ATOMPSGod 0x0020f1a7 MTLValIDateAndSetValue + 311 9 ATOMPSGod 0x0020ef19 -[MTLModel initWithDictionary:error:] + 697 10 ATOMPSGod 0x0020eb9e +[MTLModel modelWithDictionary:error:] + 126 11 ATOMPSGod 0x000e3d54 -[MTLFMDBAdapter initWithFMResultSet:modelClass:error:] + 6836 12 ATOMPSGod 0x000e20fb +[MTLFMDBAdapter modelOfClass:fromFMResultSet:error:] + 139 13 ATOMPSGod 0x00139746 __25+[ATOMUserDAO fetchUser:]_block_invoke + 246 14 ATOMPSGod 0x00299cec __30-[FMDatabaseQueue inDatabase:]_block_invoke + 108 15 libdispatch.dylib 0x03c124d0 _dispatch_clIEnt_callout + 14 16 libdispatch.dylib 0x03bff740 _dispatch_barrIEr_sync_f_invoke + 58 17 libdispatch.dylib 0x03bff3ea dispatch_barrIEr_sync_f + 89 18 libdispatch.dylib 0x03bff90b dispatch_sync + 37 19 ATOMPSGod 0x00299c15 -[FMDatabaseQueue inDatabase:] + 341 20 ATOMPSGod 0x0013954e +[ATOMUserDAO fetchUser:] + 286 21 ATOMPSGod 0x00133c9e -[ATOMCurrentUser fetchCurrentUserInDB:] + 190 22 ATOMPSGod 0x0002e9f7 -[AppDelegate application:dIDFinishLaunchingWithOptions:] + 663 23 UIKit 0x02c3314f -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 309 24 UIKit 0x02c33aa1 -[UIApplication _callinitializationDelegatesForURL:payload:suspended:] + 1810 25 UIKit 0x02c38667 -[UIApplication _runWithURL:payload:launchOrIEntation:statusbarStyle:statusbarHIDden:] + 824 26 UIKit 0x02c4cf92 -[UIApplication handleEvent:withNewEvent:] + 3517 27 UIKit 0x02c4d555 -[UIApplication sendEvent:] + 85 28 UIKit 0x02c3a250 _UIApplicationHandleEvent + 683 29 GraphiCSServices 0x050cff02 _PurpleEventCallback + 776 30 GraphiCSServices 0x050cfa0d PurpleEventCallback + 46 31 CoreFoundation 0x0259bca5 __CFRUNLOOP_IS_CALliNG_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53 32 CoreFoundation 0x0259b9db __CFRunLoopDoSource1 + 523 33 CoreFoundation 0x025c668c __CFRunLoopRun + 2156 34 CoreFoundation 0x025c59d3 CFRunLoopRunspecific + 467 35 CoreFoundation 0x025c57eb CFRunLoopRunInMode + 123 36 UIKit 0x02c37d9c -[UIApplication _run] + 840 37 UIKit 0x02c39f9b UIApplicationMain + 1225 38 ATOMPSGod 0x00112cba main + 138 39 libdyld.dylib 0x03e466d9 start + 1)
libc abi.dylib:以NSException类型的未捕获异常终止
(LLDB)
使用变量视图更新:
key __NSCFString * @"isMyFollow" 0x79e50400obj ATOMUser * 0x79e46e30 0x79e46e30ATOMBaseModel ATOMBaseModel _bounDWeibo BOol NO '解决方法 原始答案:如果它适用于iPhone 5S及更高版本,它似乎是32/64位问题,因为自5S以来所有iPhone都是64位.更确切地说,对于32位系统,BOol是一个有符号的字符,而在64位下它是一个bool.NSDictionary *dict = @{@"BOol_Key": [NSNumber numberWithBool:YES]};BOol myBool = [[dict objectForKey:@"BOol_Key"] boolValue];'_bounDWechat BOol NO ''_isMyFan BOol NO ''_isMyFollow BOol NO ''_uID int 0 0_cityID NSInteger 0 0_provinceID NSInteger 0 0_locationID NSInteger 0 0_mobile Nsstring * nil 0x00000000_nickname Nsstring * nil 0x00000000_avatar Nsstring * nil 0x00000000_backgroundImage Nsstring * nil 0x00000000_sex NSInteger 0 0_attentionNumber NSInteger 11 11_fansNumber NSInteger 0 0_praiseNumber NSInteger 0 0_uploadNumber NSInteger 0 0_replyNumber NSInteger 0 0_proceedingNumber NSInteger 0 0_attentionUploadNumber NSInteger 0 0_attentionWorkNumber NSInteger 0 0forceUpdate BOol YES '\x01'value __NSCFString * @"0" 0x79e3e140error NSError ** NulL 0x00000000valIDatedValue __NSCFString * @"0" 0x79e3e140
您可以在此here上阅读更多内容.
更新:我认为您的问题有待处理在集合中存储BOol值.存储在obj-c集合中的BOol值包装在NSNumber对象中,因为集合只能保存对象.你应该像这样使用它:
或者您可以使用@(YES)代替[NSNumber numberWithBool:].如果您不使用boolValue,您可能会得到不可预测的结果.希望能帮助到你.
总结以上是内存溢出为你收集整理的ios – [__ NSCFString charValue]:无法识别的选择器发送到实例?全部内容,希望文章能够帮你解决ios – [__ NSCFString charValue]:无法识别的选择器发送到实例?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)