当我们的 iOS 应用程序在 iOS 10 Developer Preview SDK 上编译时,当启动应用程序的第一个视图控制器时,应用程序崩溃并出现以下异常:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIDeviceRGBColor countByEnumeratingWithState:objects:count:]: unrecognized selector sent to instance 0x17adb5a0'
*** First throw call stack:
(0x23c9b91b 0x23436e17 0x24474da3 0x24474f5f 0x24447e81 0x24446f25 0x286c8a0b 0x2857baa3 0x2834effb 0x28214a1f 0x28214971 0x28aa9ec1 0x28560d01 0x285846e5 0x28586d65 0x28223541 0x28586ca9 0x28586f91 0x2830ddb9 0x28586fcf 0x1c13b3 0x1beb89 0x1bf927 0x244c6655 0x23c5e58f 0x23c5e1c1 0x23c5c00d 0x23bab229 0x23bab015 0x2519bac9 0x2827d189 0xe3b65 0x23853873)
libc++abi.dylib: terminating with uncaught exception of type NSException
在我们应用程序的代码中,这个 UIDeviceRGBColor 选择器从未被调用。
有人有同样的问题吗?这是 iOS 10 Beta 的错误吗?
使用 iOS 10 Beta SDK 编译时,在运行 iOS 10 Beta 和 iOS 9 的设备上也会出现问题。
使用 iOS 9 SDK 编译应用程序时不会出现问题(不在 iOS 10 上,不在 iOS 9 上)
谢谢你。
此致。