So I have an UITableViewController with custom Cells defined in a separate .xib Files. It's working fine on IOS 13+ but it doesn't work on IOS 12-
I got this error: Unknown class TtC6myModule24UITableViewCell in Interface Builder file.
Following by Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UITableViewCell 0x7fb48e81a800> setValue:forUndefinedKey:]: this class **** is not key value coding-compliant for the key *.'
I've checked all my IBOutlets, and connections i even recreated the cells from scratch so that XCode can regenerate The identifiers, but it keeps crashing, i've been able to reproduce the problem on simulators running iOS 12 and lesser versions.
here is the stacktrace.
* Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UITableViewCell 0x7fb48e81a800> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key badgeImage.'
0 CoreFoundation 0x0000000109453b0b exceptionPreprocess + 171
1 libobjc.A.dylib 0x0000000108e73141 objcexceptionthrow + 48
2 CoreFoundation 0x0000000109453a59 -[NSException raise] + 9
3 Foundation 0x00000001064af00b -[NSObject(NSKeyValueCoding) setValue:forKey:] + 292
4 UIKit 0x00000001073a9e08 -[UIView(CALayerDelegate) setValue:forKey:] + 172
5 UIKit 0x00000001076efa09 -[UIRuntimeOutletConnection connect] + 109
6 CoreFoundation 0x00000001093f9e8d -[NSArray makeObjectsPerformSelector:] + 269
7 UIKit 0x00000001076ee3bf -[UINib instantiateWithOwner:options:] + 1856
8 UIKit 0x00000001074408b7 -[UITableView dequeueReusableViewOfType:withIdentifier:] + 402
9 UIKit 0x0000000107440d9b -[UITableView dequeueReusableCellWithIdentifier:forIndexPath:] + 71
10 packid 0x0000000104af30ee $s6packid7AccesVcC9tableView12cellForRowAtSo07UITableE4CellCSo0jE0C10Foundation9IndexPathVtF + 9598
11 packid 0x0000000104af5145 $s6packid7AccesVcC9tableView12cellForRowAtSo07UITableE4CellCSo0jE0C10Foundation9IndexPathVtFTo + 165
12 UIKit 0x0000000107453ab2 -[UITableView createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 750
13 UIKit 0x0000000107453cf8 -[UITableView createPreparedCellForGlobalRow:willDisplay:] + 74
14 UIKit 0x0000000107428639 -[UITableView updateVisibleCellsNow:isRecursive:] + 2845
15 UIKit 0x000000010745cccc -[UITableView performWithCachedTraitCollection:] + 111
16 UIKit 0x0000000107443e7a -[UITableView layoutSubviews] + 233
17 UIKit 0x00000001073aa55b -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1268
18 QuartzCore 0x000000010a11a904 -[CALayer layoutSublayers] + 146
19 QuartzCore 0x000000010a10e526 ZN2CA5Layer16layoutifneededEPNS11TransactionE + 370
20 QuartzCore 0x000000010a10e3a0 ZN2CA5Layer28layoutanddisplayifneededEPNS11TransactionE + 24
21 QuartzCore 0x000000010a09de92 ZN2CA7Context18committransactionEPNS11TransactionE + 294
22 QuartzCore 0x000000010a0ca130 ZN2CA11Transaction6commitEv + 468
23 QuartzCore 0x000000010a0cab37 ZN2CA11Transaction17observercallbackEP19_CFRunLoopObservermPv + 115
24 CoreFoundation 0x00000001093f9717 CFRUNLOOPISCALLINGOUTTOANOBSERVERCALLBACKFUNCTION + 23
25 CoreFoundation 0x00000001093f9687 CFRunLoopDoObservers + 391
26 CoreFoundation 0x00000001093de038 CFRunLoopRunSpecific + 440
27 UIKit 0x00000001072e108f -[UIApplication run] + 468
28 UIKit 0x00000001072e7134 UIApplicationMain + 159
29 packid 0x0000000104b6dd5b main + 75
30 libdyld.dylib 0x000000010ae5265d start + 1
31 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
I got this error: Unknown class TtC6myModule24UITableViewCell in Interface Builder file.
Following by Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UITableViewCell 0x7fb48e81a800> setValue:forUndefinedKey:]: this class **** is not key value coding-compliant for the key *.'
I've checked all my IBOutlets, and connections i even recreated the cells from scratch so that XCode can regenerate The identifiers, but it keeps crashing, i've been able to reproduce the problem on simulators running iOS 12 and lesser versions.
here is the stacktrace.
* Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UITableViewCell 0x7fb48e81a800> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key badgeImage.'
** First throw call stack:
0 CoreFoundation 0x0000000109453b0b exceptionPreprocess + 171
1 libobjc.A.dylib 0x0000000108e73141 objcexceptionthrow + 48
2 CoreFoundation 0x0000000109453a59 -[NSException raise] + 9
3 Foundation 0x00000001064af00b -[NSObject(NSKeyValueCoding) setValue:forKey:] + 292
4 UIKit 0x00000001073a9e08 -[UIView(CALayerDelegate) setValue:forKey:] + 172
5 UIKit 0x00000001076efa09 -[UIRuntimeOutletConnection connect] + 109
6 CoreFoundation 0x00000001093f9e8d -[NSArray makeObjectsPerformSelector:] + 269
7 UIKit 0x00000001076ee3bf -[UINib instantiateWithOwner:options:] + 1856
8 UIKit 0x00000001074408b7 -[UITableView dequeueReusableViewOfType:withIdentifier:] + 402
9 UIKit 0x0000000107440d9b -[UITableView dequeueReusableCellWithIdentifier:forIndexPath:] + 71
10 packid 0x0000000104af30ee $s6packid7AccesVcC9tableView12cellForRowAtSo07UITableE4CellCSo0jE0C10Foundation9IndexPathVtF + 9598
11 packid 0x0000000104af5145 $s6packid7AccesVcC9tableView12cellForRowAtSo07UITableE4CellCSo0jE0C10Foundation9IndexPathVtFTo + 165
12 UIKit 0x0000000107453ab2 -[UITableView createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 750
13 UIKit 0x0000000107453cf8 -[UITableView createPreparedCellForGlobalRow:willDisplay:] + 74
14 UIKit 0x0000000107428639 -[UITableView updateVisibleCellsNow:isRecursive:] + 2845
15 UIKit 0x000000010745cccc -[UITableView performWithCachedTraitCollection:] + 111
16 UIKit 0x0000000107443e7a -[UITableView layoutSubviews] + 233
17 UIKit 0x00000001073aa55b -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1268
18 QuartzCore 0x000000010a11a904 -[CALayer layoutSublayers] + 146
19 QuartzCore 0x000000010a10e526 ZN2CA5Layer16layoutifneededEPNS11TransactionE + 370
20 QuartzCore 0x000000010a10e3a0 ZN2CA5Layer28layoutanddisplayifneededEPNS11TransactionE + 24
21 QuartzCore 0x000000010a09de92 ZN2CA7Context18committransactionEPNS11TransactionE + 294
22 QuartzCore 0x000000010a0ca130 ZN2CA11Transaction6commitEv + 468
23 QuartzCore 0x000000010a0cab37 ZN2CA11Transaction17observercallbackEP19_CFRunLoopObservermPv + 115
24 CoreFoundation 0x00000001093f9717 CFRUNLOOPISCALLINGOUTTOANOBSERVERCALLBACKFUNCTION + 23
25 CoreFoundation 0x00000001093f9687 CFRunLoopDoObservers + 391
26 CoreFoundation 0x00000001093de038 CFRunLoopRunSpecific + 440
27 UIKit 0x00000001072e108f -[UIApplication run] + 468
28 UIKit 0x00000001072e7134 UIApplicationMain + 159
29 packid 0x0000000104b6dd5b main + 75
30 libdyld.dylib 0x000000010ae5265d start + 1
31 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException