NativeScript / nativescript-datetimepicker

Plugin with date and time picking fields
Apache License 2.0
27 stars 26 forks source link

Crash on selection on iOS versions below 14 after latest iOS 14 hotfix #78

Closed AnthonyLenglet closed 3 years ago

AnthonyLenglet commented 3 years ago

Which platform(s) does your issue occur on?

Please, provide the following version numbers that your issue occurs with:

Please, tell us how to recreate the issue in as much detail as possible.

Trying to open the datepicker was fixed in iOS 14, but the fix broke every other iOS versions apparently, we're getting a huge flood of error with it

I'm thinking it might be due to this line, since color.ios turned into color for no real explanation, and the core-module still has an ios getter from what I've seen

-            nativePicker.setValueForKey(color.ios, "textColor");
+            if (this.SUPPORT_TEXT_COLOR) {
+                nativePicker.setValueForKey(color, 'textColor');
+            }
AnthonyLenglet commented 3 years ago

Xcode compilation with this test fix was happening as I was filling this:

            if (this.SUPPORT_TEXT_COLOR) {
                nativePicker.setValueForKey(color.ios, 'textColor');
            }

and I can confirm that this fixes the issue on iOS versions below 14 while still working under iOS 14, will make a PR ASAP !

mhtghn commented 3 years ago

@NathanWalker this issue is still there on NS 6 version of this plugin. I cant upgrade to NS 7 due to some plugins not compatible yet.

Can you please fix it for NS 6 app as well ?

AnthonyLenglet commented 3 years ago

@NathanWalker this issue is still there on NS 6 version of this plugin. I cant upgrade to NS 7 due to some plugins not compatible yet.

Can you please fix it for NS 6 app as well ?

thats odd, since I am using NS6 still, and the issue has been fixed on our end

mhtghn commented 3 years ago

Weird can you double check that you are using NS6 please, and which version of the plugin you have.

Im using the latest 1.2.3 and you can also see that the fix you provided in your PR has not been applied. https://github.com/NativeScript/nativescript-datetimepicker/blob/e35391ee31b1907bd6fd595c9e45cd48d80f3965/src/datetimepicker.ios.ts#L192

AnthonyLenglet commented 3 years ago

yep nevermind, the PR isn't closed yet https://github.com/NativeScript/nativescript-datetimepicker/pull/79

We have a local copy of the library that we built ourselves, didn't realise it wasn't merged yet, sorry !