- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
在我将 xcode 升级到新版本 (6.0.1) 之后,我在运行我的应用程序时遇到了 NSUnknownKeyException。
四处寻找解决方案,我发现这个问题通常出现在 xib 中的“死”导出引用,但在我的情况下,当我从 sqlite 数据库获取数据时会发生。我使用 FMDB 和 BZObjectStore 库来处理我的数据库。
这是我的控制台输出:
2014-10-15 15:30:24.894 PBWines[59418:428758] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<BZObjectStoreRelationshipModel 0x79f65420> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key hash.'
*** First throw call stack:
(
0 CoreFoundation 0x02485df6 __exceptionPreprocess + 182
1 libobjc.A.dylib 0x0210fa97 objc_exception_throw + 44
2 CoreFoundation 0x02485a11 -[NSException raise] + 17
3 Foundation 0x01d97d5e -[NSObject(NSKeyValueCoding) setValue:forUndefinedKey:] + 282
4 Foundation 0x01cf3d88 _NSSetUsingKeyValueSetter + 115
5 Foundation 0x01cf3d0d -[NSObject(NSKeyValueCoding) setValue:forKey:] + 267
6 PBWines 0x00131de8 -[BZObjectStoreModelMapper select:condition:db:] + 1336
7 PBWines 0x00134c02 -[BZObjectStoreModelMapper relationshipObjectsWithCondition:relationshipRuntime:db:] + 162
8 PBWines 0x001346be -[BZObjectStoreModelMapper relationshipObjectsWithObject:attribute:relationshipRuntime:db:] + 686
9 PBWines 0x00146a31 -[BZObjectStoreReferenceMapper saveObjectsSub:db:error:] + 15361
10 PBWines 0x00142de2 -[BZObjectStoreReferenceMapper saveObjects:db:error:] + 274
11 PBWines 0x0014c06d -[BZObjectStoreReferenceMapper registerRuntime:db:error:] + 925
12 PBWines 0x0014b3d8 -[BZObjectStoreReferenceMapper runtimeWithClazz:db:error:] + 232
13 PBWines 0x001401a9 -[BZObjectStoreReferenceMapper fetchObjects:condition:db:error:] + 233
14 PBWines 0x0010cbb7 __46-[BZObjectStore fetchObjects:condition:error:]_block_invoke + 231
15 PBWines 0x001083c7 __40-[BZObjectStore inTransactionWithBlock:]_block_invoke + 279
16 PBWines 0x00194bf1 __46-[FMDatabaseQueue beginTransaction:withBlock:]_block_invoke + 273
17 libdispatch.dylib 0x02b6ae1f _dispatch_client_callout + 14
18 libdispatch.dylib 0x02b4f5bf _dispatch_barrier_sync_f_invoke + 144
19 libdispatch.dylib 0x02b4ecf3 dispatch_barrier_sync_f + 105
20 libdispatch.dylib 0x02b4f6cf dispatch_barrier_sync + 54
21 PBWines 0x00194a85 -[FMDatabaseQueue beginTransaction:withBlock:] + 197
22 PBWines 0x00194e8c -[FMDatabaseQueue inTransaction:] + 108
23 PBWines 0x001081ce -[BZObjectStore inTransactionWithBlock:] + 382
24 PBWines 0x0010c92a -[BZObjectStore fetchObjects:condition:error:] + 410
25 PBWines 0x000a2d7e -[PBWPaesiViewController viewDidLoad] + 702
26 UIKit 0x00c50d54 -[UIViewController loadViewIfRequired] + 771
27 UIKit 0x00c869cd -[UINavigationController _layoutViewController:] + 42
28 UIKit 0x00c86f3c -[UINavigationController _updateScrollViewFromViewController:toViewController:] + 235
29 UIKit 0x00c87040 -[UINavigationController _startTransition:fromViewController:toViewController:] + 90
30 UIKit 0x00c87fdb -[UINavigationController _startDeferredTransitionIfNeeded:] + 669
31 UIKit 0x00c88c52 -[UINavigationController __viewWillLayoutSubviews] + 57
32 UIKit 0x00dfaebc -[UILayoutContainerView layoutSubviews] + 213
33 UIKit 0x00b849c0 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 608
34 libobjc.A.dylib 0x02125771 -[NSObject performSelector:withObject:] + 70
35 QuartzCore 0x0294827f -[CALayer layoutSublayers] + 152
36 QuartzCore 0x0293c105 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 397
37 QuartzCore 0x0293bf60 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 26
38 QuartzCore 0x0289a676 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 284
39 QuartzCore 0x0289ba3c _ZN2CA11Transaction6commitEv + 392
40 QuartzCore 0x02961789 +[CATransaction flush] + 52
41 UIKit 0x00af77e6 -[UIApplication _reportMainSceneUpdateFinished:] + 39
42 UIKit 0x00af8761 -[UIApplication _runWithMainScene:transitionContext:completion:] + 3163
43 UIKit 0x00b10d30 __84-[UIApplication _handleApplicationActivationWithScene:transitionContext:completion:]_block_invoke + 59
44 UIKit 0x00af6d7f -[UIApplication workspaceDidEndTransaction:] + 155
45 FrontBoardServices 0x04ca59de __37-[FBSWorkspace clientEndTransaction:]_block_invoke_2 + 71
46 FrontBoardServices 0x04ca546f __40-[FBSWorkspace _performDelegateCallOut:]_block_invoke + 54
47 FrontBoardServices 0x04cb7425 __31-[FBSSerialQueue performAsync:]_block_invoke + 26
48 CoreFoundation 0x023a97a0 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 16
49 CoreFoundation 0x0239f0b3 __CFRunLoopDoBlocks + 195
50 CoreFoundation 0x0239ef0b __CFRunLoopRun + 2715
51 CoreFoundation 0x0239e1ab CFRunLoopRunSpecific + 443
52 CoreFoundation 0x0239dfdb CFRunLoopRunInMode + 123
53 UIKit 0x00af6744 -[UIApplication _run] + 571
54 UIKit 0x00af9e16 UIApplicationMain + 1526
55 PBWines 0x000bb7ed main + 141
56 libdyld.dylib 0x02b96ac9 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
在此先感谢您的帮助。
最佳答案
我已经发布了 BZObjectStore 1.3.13。
你能运行'pod update'然后重试吗?
谢谢
关于ios - Objective-C NSUnknownKeyException setValue :forUndefinedKey:,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26384235/
这个问题已经有答案了: Xcode - How to fix 'NSUnknownKeyException', Reason: "… this class is not key value codin
我尝试为 ios 做一个非常简单的应用程序。在 View 之间切换。当它在日志中启动此错误时: Terminating app due to uncaught exception 'NSUnknown
一两天前开始学习 Swift。我遇到这个错误的次数比我想的要多——本质上,我意识到它与 IBOutlets 有关。删除 Storyboard 中的所有 socket 和按钮/对象,然后手动重新添加它们
这个问题已经有答案了: Xcode - How to fix 'NSUnknownKeyException', Reason: "… this class is not key value codin
我对 Objective C 和 iOS 编程很陌生,并且遇到了这个非常奇怪的错误。相关应用程序使用我使用 NSObject 制作的自定义类型的一组预设值来初始化 NSMutableArray。这是由
This question already has answers here: Xcode - How to fix 'NSUnknownKeyException', reason: … this c
我在这里查看了这个问题的答案,但它们似乎都没有解决我遇到的问题,而且大多数其他答案都不是快速的,但我尝试了我理解的答案。 所有类名称都匹配, socket 具有正确的名称,并且没有未定义的 socke
这个问题在这里已经有了答案: Xcode - How to fix 'NSUnknownKeyException', reason: … this class is not key value c
这个问题在这里已经有了答案: Xcode - How to fix 'NSUnknownKeyException', reason: … this class is not key value c
app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this c
我在框架中有一个带有相应 xib 的自定义 View 。在界面生成器中,我将文件所有者和 View 本身设置为我的 UIView (TotalTokenCountView) 子类。我还在自定义 Vie
这个问题在这里已经有了答案: this class is not key value coding-compliant for the key view [duplicate] (7 个答案) 关
我的程序显示了这个问题。谁能告诉我哪里出了问题? "2016-08-26 17:21:00.548 SegundaTentativa[2347:203583] *** Terminating app
我最近为我的应用实现了一个新 View ,它有一个 UICollectionView 作为要加载的图像的网格: class MemoriesView: UIViewController, UIColl
因此,我正在学习一个教程,并确保我完全按照作者的要求进行操作,并且我的代码抛出了以下错误。 2014-10-01 22:26:14.545 stopwatch2[3503:861733] *** Te
这个问题在这里已经有了答案: Xcode - How to fix 'NSUnknownKeyException', reason: … this class is not key value co
这个问题已经有答案了: Xcode - How to fix 'NSUnknownKeyException', Reason: "… this class is not key value codin
这个问题已经有答案了: Xcode - How to fix 'NSUnknownKeyException', Reason: "… this class is not key value codin
这个问题已经有答案了: Class is not key value coding-compliant [duplicate] (8 个回答) 已关闭 8 年前。 我不断收到此类错误,并且应用程序崩溃
我对 swift 很陌生,我正在 iTunes U 上学习斯坦福大学类(class)。我一直遵循得很好,但我遇到了一个我无法理解的错误: 2015-06-29 18:45:35.080 calcula
我是一名优秀的程序员,十分优秀!