7
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

iOS8ではconstraintにuser define runtime attributeに値を設定しても落ちないが、iOS7では落ちる

Posted at

間違えてstroyboardのuser define runtime attributeに値を追加してしまったときに、気づきにくいバグになってしまう。
エラーのメモがてら記録しておきます。

2014-10-20 18:37:10.180 app-qa[44937:70b] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<NSLayoutConstraint 0x7ff527238d90> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key keyPath.'
*** First throw call stack:
(
	0   CoreFoundation                      0x000000010c1e1795 __exceptionPreprocess + 165
	1   libobjc.A.dylib                     0x000000010bf3d991 objc_exception_throw + 43
	2   CoreFoundation                      0x000000010c265e69 -[NSException raise] + 9
	3   Foundation                          0x0000000109fb503a -[NSObject(NSKeyValueCoding) setValue:forKey:] + 259
	4   CoreFoundation                      0x000000010c1dd700 -[NSArray makeObjectsPerformSelector:] + 224
	5   UIKit                               0x000000010b0ea1a5 -[UINib instantiateWithOwner:options:] + 1112
	6   UIKit                               0x000000010af8c4a1 -[UIViewController _loadViewFromNibNamed:bundle:] + 245
	7   UIKit                               0x000000010af8cade -[UIViewController loadView] + 112
	8   UIKit                               0x000000010af8cdfd -[UIViewController loadViewIfRequired] + 75
	9   UIKit                               0x000000010af8d1bd -[UIViewController view] + 29
	10  UIKit                               0x000000010afa37a5 -[UINavigationController _startCustomTransition:] + 628
	11  UIKit                               0x000000010afae9b5 -[UINavigationController _startDeferredTransitionIfNeeded:] + 401
	12  UIKit                               0x000000010afaf4f8 -[UINavigationController __viewWillLayoutSubviews] + 43
	13  UIKit                               0x000000010b0c37e1 -[UILayoutContainerView layoutSubviews] + 202
	14  UIKit                               0x000000010aefcb27 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 354
	15  QuartzCore                          0x000000010abcfa22 -[CALayer layoutSublayers] + 151
	16  QuartzCore                          0x000000010abc4589 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 363
	17  QuartzCore                          0x000000010abc440a _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
	18  QuartzCore                          0x000000010ab39694 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 252
	19  QuartzCore                          0x000000010ab3a70c _ZN2CA11Transaction6commitEv + 394
	20  QuartzCore                          0x000000010ab3ad79 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 89
	21  CoreFoundation                      0x000000010c1acff7 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
	22  CoreFoundation                      0x000000010c1acf67 __CFRunLoopDoObservers + 391
	23  CoreFoundation                      0x000000010c18c6d2 __CFRunLoopRun + 946
	24  CoreFoundation                      0x000000010c18bf33 CFRunLoopRunSpecific + 467
	25  GraphicsServices                    0x000000010e6e23a0 GSEventRunModal + 161
	26  UIKit                               0x000000010aea1043 UIApplicationMain + 1010
	27  app-qa                              0x000000010807413b main + 155
	28  libdyld.dylib                       0x000000010c7a05fd start + 1
	29  ???                                 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
7
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?