I'm taking the watchOS2Sampler project available online and trying to experiment with adding a Picker to the "Gradation" Scene, which currently has two buttons at bottom and an image in the middle. My goal is to try and control an image's location with the Digital crown.
If I add the Picker as is to the top of the scene, I am able to run the program but a scrollbar is created so the Digital Crown now controls that scroll instead of controlling the picker.
To try and reduce the overall height of the scene, I have tried to reduce the vertical size of the Picker. The problem is whenever I do this I get the following error as soon as I bring up that scene:
2015-11-05 14:07:32.458 watchOS2Sampler WatchKit Extension[11830:2672085] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<GradationInterfaceController 0x7c30a160> valueForUndefinedKey:]: this class is not key value coding-compliant for the key (null).'
Reducing the size of the image or the two buttons at the bottom of the screen also causes this error to occur.
Interestingly, increasing the vertical size of any of these elements does not cause a crash, though I still have the same scroll button problem.
I have seen a few people reporting a similar error when the XIB file is not in sync, but I don't understand how changing the size of an element would cause things to get out of sync, especially when it's only in one direction.
This issue happens on both the simulator and the device, and doing a full clean doesn't help.
Below is the full stack trace in case this helps:
*** First throw call stack:
(
0 CoreFoundation 0x00e17af4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x0087ddf4 objc_exception_throw + 50
2 CoreFoundation 0x00e17711 -[NSException raise] + 17
3 Foundation 0x004bee86 -[NSObject(NSKeyValueCoding) valueForUndefinedKey:] + 282
4 Foundation 0x00400060 _NSGetUsingKeyValueGetter + 105
5 Foundation 0x003fffef -[NSObject(NSKeyValueCoding) valueForKey:] + 288
6 WatchKit 0x001efe99 __48-[SPRemoteInterface handlePlist:fromIdentifier:]_block_invoke927 + 49
7 libdispatch.dylib 0x046db7b7 _dispatch_call_block_and_release + 15
8 libdispatch.dylib 0x046f940d _dispatch_client_callout + 14
9 libdispatch.dylib 0x046e205a _dispatch_main_queue_callback_4CF + 689
10 CoreFoundation 0x00d69bee __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 14
11 CoreFoundation 0x00d27964 __CFRunLoopRun + 2356
12 CoreFoundation 0x00d26d76 CFRunLoopRunSpecific + 470
13 CoreFoundation 0x00d26b8b CFRunLoopRunInMode + 123
14 Foundation 0x0043c601 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 308
15 Foundation 0x004e29cd -[NSRunLoop(NSRunLoop) run] + 82
16 libxpc.dylib 0x049de0b7 _xpc_objc_main + 486
17 libxpc.dylib 0x049e0e16 xpc_main + 215
18 Foundation 0x0060bc45 service_connection_handler + 0
19 PlugInKit 0x03c251f4 -[PKService run] + 582
20 WatchKit 0x00213f71 main + 146
21 libdyld.dylib 0x0471dae1 start + 1
22 ??? 0x00000001 0x0 + 1
Update: The picker component definitely seems to be the cause here, since removing that makes the crash go away, and I can then resize the remaining elements however I want. However there is nothing connected to the picker component (connecting things doesn't help either) so I don't know why this element would be causing the crash.