Xcode 12.5下使用RestKit的iOS Swift应用MKMapperOperation映射属性崩溃
Xcode 12 下 MKMapperOperation 属性映射崩溃问题
当MKMapperOperation尝试映射属性值时会抛出异常:
Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<RestKitExample.xx0x600002d463e0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key token.'

该代码在Xcode 11.x版本中运行完全正常,崩溃问题是升级到Xcode 12版本后才开始出现的。
已经尝试过以下方案,但问题仍未解决:
RestKit RKObjectMapping Swift 可选值适配方案
也已经在RestKit的Git代码仓库提交了对应issue,但目前也未得到有效的解决方案:
RestKit官方仓库issue #2562
内容的提问来源于stack exchange,提问作者MOHAMMAD ISHAQ
相关产品推荐
相关产品推荐

