Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with iOS 14 #68

Closed
mreall opened this issue Sep 21, 2020 · 19 comments · Fixed by #69
Closed

Issues with iOS 14 #68

mreall opened this issue Sep 21, 2020 · 19 comments · Fixed by #69

Comments

@mreall
Copy link

mreall commented Sep 21, 2020

If the demo apps cannot help and there is no issue for your problem, tell us about it

The plugin worked fine on NS6. But after updating to NS7 the plugin's UI doesn't fully load and the app crashes when the "Cancel" or "Done" buttons are tapped.

Which platform(s) does your issue occur on?

  • iOS 14
  • emulator: iPhone 8

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

  • CLI: 7.0.8
  • Cross-platform modules: 7.0.3
  • Runtime(s): @nativescript/ios is 7.0.0
  • Plugin(s):
  "dependencies": {
    "@nativescript/core": "~7.0.0",
    "@nativescript/theme": "~2.3.0",
    "nativescript-modal-datetimepicker": "^1.2.2",
    "nativescript-vue": "~2.8.0"
  },
  "devDependencies": {
    "@babel/core": "~7.1.0",
    "@babel/preset-env": "~7.1.0",
    "@nativescript/ios": "7.0.0",
    "@nativescript/webpack": "~3.0.0",
    "babel-loader": "~8.0.0",
    "nativescript-vue-template-compiler": "~2.8.0",
    "node-sass": "^4.7.1",
    "vue-loader": "~15.9.3"
  },

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

Add the component to a page per the instructions and run the app. When attempting to load the plugin the screen looks like the following. Clicking either button crashes the app.
modal-datetimepicker-bug

Is there any code involved?

Download a sample project

@shiv19
Copy link
Collaborator

shiv19 commented Sep 21, 2020

Hi @mreall
We haven't upgraded this plugin to support {N} 7 yet.
We'll be updating it very soon before the end of this week :)

@OPADA-Eng
Copy link

Same here. with NS 6 and ios 14.

@adrianpdaluz
Copy link

Same here. with NS 6 and ios 14.

We're also getting the same issue on NS 6 and iOS 14

@mreall mreall changed the title Issues with Nativescript 7 and iOS 14 Issues with iOS 14 Sep 22, 2020
@deivdev
Copy link

deivdev commented Sep 23, 2020

same error, NS7 and iOS 14.

@alonstar alonstar mentioned this issue Sep 24, 2020
@OPADA-Eng
Copy link

Any updates?

@mreall
Copy link
Author

mreall commented Sep 28, 2020

Hi @shiv19, thanks for working on this fix. It looks like a PR has also been submitted. Do you have an update on when you'll have a working version published?

@shiv19
Copy link
Collaborator

shiv19 commented Sep 28, 2020

@mreall thanks for letting me know about the PR, will release this soon and leave a message here :)

@shiv19
Copy link
Collaborator

shiv19 commented Sep 29, 2020

@mreall
Please upgrade to [email protected]
I've upgraded the plugin demo and made sure it works on iOS 14.
Thanks to @alonstar :)

@adrianpdaluz
Copy link

Thanks for your help on this. I just updated to the latest version that has the fixes for iOS14 but noticed that the picker is not centered on both tablet and phone devices.
Screen Shot

@mreall
Copy link
Author

mreall commented Sep 29, 2020

@shiv19 and @alonstar, thanks for providing the update. I upgraded and am now getting the following error:

***** Fatal JavaScript exception - application has been terminated. *****
NativeScript encountered a fatal error: Uncaught TypeError: Cannot read property 'osVersion' of undefined
at
../node_modules/nativescript-modal-datetimepicker/modal-datetimepicker.js(file: node_modules/nativescript-modal-datetimepicker/modal-datetimepicker.ios.js:44:61)

The issue appears to be that you're still using tns-core-modules instead of @nativescript/core. When the code is compiled to javascript it creates the following code. NS7 doesn't use tns-core-modules anymore.

Line 4: var platform_1 = require("tns-core-modules/platform");
...
Line 44: var SUPPORT_DATE_PICKER_STYLE = parseFloat(platform_1.device.osVersion) >= 14.0;

@shiv19
Copy link
Collaborator

shiv19 commented Sep 29, 2020

@mreall my bad!
I only updated the demo app and changed the tns-core-modules imports there.
I didn't check the imports in the plugin source.
Just a minute.. Let me fix that quick

@shiv19
Copy link
Collaborator

shiv19 commented Sep 29, 2020

@mreall
Please use v2.0.0 for NativeScript 7 :)
v1.2.3 and below is for {N} 6 and below.

@mreall
Copy link
Author

mreall commented Sep 29, 2020

@shiv19 thanks for fixing that so quickly! It's now working for me on {N} 7 and iOS 14. I have the same problem that @adrianpdaluz reported with the spinner not centered on the screen, but otherwise no issues.

@shiv19
Copy link
Collaborator

shiv19 commented Sep 29, 2020

Ah! Sorry I missed the comment by @adrianpdaluz
I'll see if I can center that

@shiv19
Copy link
Collaborator

shiv19 commented Sep 29, 2020

@mreall @adrianpdaluz
In v2.0.1 the picker view should be centered properly :)

@adrianpdaluz
Copy link

@shiv19
Thanks again for your help on this. Could you also do another build for NS6. We have some plugin dependencies that are still not working for NS7 so we haven't finished our migration yet.

@mreall
Copy link
Author

mreall commented Sep 30, 2020

Thanks again @shiv19. It's now centered properly in 2.0.1 for {N} 7 on iOS 14.

@shiv19
Copy link
Collaborator

shiv19 commented Sep 30, 2020

@adrianpdaluz
Use https://www.npmjs.com/package/nativescript-modal-datetimepicker/v/1.2.4
[email protected] :)

@adrianpdaluz
Copy link

@shiv19 thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants