-
-
Notifications
You must be signed in to change notification settings - Fork 423
support preferredDatePickerStyle in iOS 14 #211
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
support preferredDatePickerStyle in iOS 14 #211
Conversation
@vonovak do you want to review this PR? I'm not available to review because I'm using Xcode 11.5 and I did not want to update to Xcode 12 beta |
@luancurti You can install the XCode beta alongside 11.5. So far I've done this without issue when testing iOS14 stuff. |
I can't figure out how to do |
At the moment, I'm getting this error:
|
@SConaway I will take care of this PR :) (and the feature itself) |
Ok. Sounds good. Hope the little i did helps. |
a310997
to
9ee04d7
Compare
I noticed a crashing issue: When I open the picker on default and date, then switch to inline, the app crashes with this nice long log:
|
@SConaway which xcode version are you running? |
@SConaway with beta 4 I see the log in console but there is no crash. I don't think much can be done on our side here, our code is correct. Can you please confirm you have no crash with beta 4? |
Seems to have been a bug in iOS 14.0 beta 3. Just upgrading the simulator resolved it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@luancurti when merging, please do no forget to change the commit message as described here: #229 otherwise it won't trigger a release 🙂 I'm going to revert and reapply the PR now so semantic-release does all its magic. I'm also a little curious how it handles commits that were reverted 🙂 |
🎉 This PR is included in version 2.6.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Summary
The PR was opened by @SConaway, who raised the issue about weird appearance in ios 14. @vonovak took over most of the implementation
This adds support for preferredDatePickerStyle to the module. I took the android-only
display
prop and extended the support for ios too, as opposed to adding a new ios-only prop.The implementation was quite involved; for display:
spinner, compact and inline
we just assign those topreferredDatePickerStyle
but fordefault
we first need to find out what that is going to be, which is determined by the OS, and hence there is a async call across the bridge to find this out. The value could be cached I suppose, but that can be done later.I also refactored the example app so that all the possible combinations can be properly tested. That also means changing e2e tests 😅
this requires xcode 11 to build, so we'll make this a breaking change
This closes #203, closes #75
Test Plan
Build and test the example app on xcode 11 and xcode 12
What's required for testing (prerequisites)?
What are the steps to reproduce (after prerequisites)?
Compatibility
Checklist
README.md
CHANGELOG.md
example/App.js
)