Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-28181

iOS 14: Default date picker crashes when setting "dateTimeColor"

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Release 9.2.2
    • Component/s: iOS
    • Labels:
    • Environment:

      · iOS 14
      · MacOS 10.15.7
      · TiSDK 9.2.1.GA
      · Hyperloop 6.0.2
      · Alloy 1.15.2

    • Story Points:
      5
    • Sprint:
      2020 Sprint 21, 2020 Sprint 22

      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

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vijaysingh Vijay Singh
                Reporter:
                hknoechel Hans Knöchel
                Reviewer:
                Vijay Singh
                Tester:
                Satyam Sekhri
              • Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                    Git Integration