iOS.Crash.[__NSArrayM objectForKeyedSubscript:]
2015-05-27 19:16
513 查看
1. [__NSArrayM objectForKeyedSubscript:]: unrecognized selector sent to instance - source code and screenshot attached
http://stackoverflow.com/questions/21268539/nsarraym-objectforkeyedsubscript-unrecognized-selector-sent-to-instance
2. 关于objectforkeyedsubscript
http://nshipster.com/object-subscripting/
3. NSArray Returning String Instead of Dictionary
http://stackoverflow.com/questions/18782053/nsarray-returning-string-instead-of-dictionary
这是由于下面的调用预期返NSDictionary, 然后没有检查返回id 对象的真正类型,而直接
http://stackoverflow.com/questions/21268539/nsarraym-objectforkeyedsubscript-unrecognized-selector-sent-to-instance
2. 关于objectforkeyedsubscript
http://nshipster.com/object-subscripting/
3. NSArray Returning String Instead of Dictionary
http://stackoverflow.com/questions/18782053/nsarray-returning-string-instead-of-dictionary
这是由于下面的调用预期返NSDictionary, 然后没有检查返回id 对象的真正类型,而直接
jsonObject[@"key"]; 这样就导致该类的Crash发生。
id jsonObject = [NSJSONSerialization JSONObjectWithData:jsonResponse options:kNilOptions error:nil];
相关文章推荐
- iOS reason: '-[__NSArrayM objectForKeyedSubscript:]: unrecognized selector sent to instance 0x60800
- iOS: NSDictionary的方法objectForKeyedSubscript:
- -[__NSArrayI addObject:]: unrecognized selector与-[__NSArrayM objectForKeyedSubscript:]: unrecognized
- _NSInlineData objectForKeyedSubscript:
- [Objective-C] 重载objectAtIndexedSubscript和objectForKeyedSubscript方法实现subscripting
- [NSCFArray objectForKeyedSubscript:]
- IOS程序运行时崩溃日志setObjectForKey: object cannot be nil
- TMCache: fast object caching for iOS & OS X
- iPhone/iOS中保存自定义对象(Custom Object/Custom Class)的数组(NSMutableArray/NSArray)到NSUserDefaults
- iOS崩溃日志中[__NSSetM addObject:]和[__NSArrayM insertObject:atIndex:]的解决办法
- object file (xx.a(xx.o)) was built for newer iOS version (10.3) than being linked (10.2)
- 【已解决】iPhone/iOS中保存自定义对象(Custom Object/Custom Class)的数组(NSMutableArray/NSArray)到NSUserDefaults
- iOS积累--objectForKey与valueForKey在NSDictionary中的差异
- reason: '*** setObjectForKey: object cannot be nil (key: 1)'-crash!
- iOS 关于objectForKey返回类型是不是mutable
- iOS开发 解除警告:object file was built for newer iOS version (9.0) than being linked (7.0)
- Xcode7编译遇到building for iOS simulator, but linking in object file built for OSX, for architectu问题解决方案
- iOS NSUserDefaults [setValue:forKey:] [setObject:forKey:] <Objc> setValue(_,forKey:) set(_,forKey) <Swift 3>
- IOS开发之——objectForKey与valueForKey在NSDictionary中的差异
- IOS开发之——objectForKey与valueForKey在NSDictionary中的差异