[TIMOB-28181] iOS 14: Default date picker crashes when setting "dateTimeColor"
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2020-10-27T21:27:03.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 9.2.2 |
Components | iOS |
Labels | datepicker |
Reporter | Hans Knöchel |
Assignee | Vijay Singh |
Created | 2020-10-08T08:37:16.000+0000 |
Updated | 2020-11-04T19:47:43.000+0000 |
Description
Taken from TiSlack:
---
Seems like iOS 14 doesn’t like the dateTimeColor property (causes crash when using a picker with type Ti.UI.PICKER_TYPE_DATE). — Is there any alternative way to change a picker’s text color?
*Crash Error (simulator & device)*
[INFO] -[_UIDatePickerIOSCompactView setHighlightsToday:]: unrecognized selector sent to instance 0x7f8e3d160e30
[INFO] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[_UIDatePickerIOSCompactView setHighlightsToday:]: unrecognized selector sent to instance 0x7f8e3d160e30'
---
The reason is that Titanium uses non-offical API's for this (reflection), which is generally okay but error prone for new releases. This year, Apple changed the UIDatePicker styles a lot, causing the initial implementation to break. The fix is to guard iOS 14 as well as the used datePickerStyle
(which I added for 9.2.0).
PR to fix this: https://github.com/appcelerator/titanium_mobile/pull/12167
PR (from [~hknoechel]) - https://github.com/appcelerator/titanium_mobile/pull/12167 Test case - 1.
2.
FR Passed Waiting for Jenkins build
merged to master, and backport PR merged to 9_2_X for 9.2.2 target
Verified on: Mac OS: 10.15.4 SDK: 9.3.0.v20201027065511, 9.2.2.v20201026120850 Appc CLI: 8.1.1 JDK: 11.0.4 Node: 10.17.0 Studio: 6.0.0.202005141803 Xcode: 12.0.1 iOS Simulator 14.0
Verified the fix with SDK 9.3.0.v20201027120230 & 9.2.2.v20201026120850. Closing.