-
Notifications
You must be signed in to change notification settings - Fork 547
[UIKit] Make sure to invoke the correct constructor. Fixes #23122. #23127
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
Conversation
There are three constructors involved here: 1. (UIBarButtonSystemItem systemItem, EventHandler handler) 2. (UIBarButtonSystemItem systemItem, NSObject target, Selector action) 3. (UIBarButtonSystemItem systemItem, UIAction primaryAction, UIMenu menu) The first constructor is a manually written convenience constructor, and needs to call another constructor. Either the second or the third constructor works, but the third constructor is only available on iOS 16+, while the second is available on all iOS version. This means that calling the third constructor is a bad idea, because it won't work on anything before iOS 16. Unfortunately that's exactly what we did. So change the code to call the second constructor instead. This is a regression that was introduced in f431538. Fixes #23122.
✅ [CI Build #b839649] Build passed (Build macOS tests) ✅Pipeline on Agent |
💻 [CI Build #b839649] Tests on macOS X64 - Mac Sonoma (14) passed 💻✅ All tests on macOS X64 - Mac Sonoma (14) passed. Pipeline on Agent |
💻 [CI Build #b839649] Tests on macOS M1 - Mac Monterey (12) passed 💻✅ All tests on macOS M1 - Mac Monterey (12) passed. Pipeline on Agent |
💻 [CI Build #b839649] Tests on macOS M1 - Mac Ventura (13) passed 💻✅ All tests on macOS M1 - Mac Ventura (13) passed. Pipeline on Agent |
💻 [CI Build #b839649] Tests on macOS arm64 - Mac Sequoia (15) passed 💻✅ All tests on macOS arm64 - Mac Sequoia (15) passed. Pipeline on Agent |
🚀 [CI Build #b839649] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 117 tests passed 🎉 Tests counts✅ cecil: All 1 tests passed. Html Report (VSDrops) Download Pipeline on Agent |
✅ [PR Build #b839649] Build passed (Detect API changes) ✅Pipeline on Agent |
✅ API diff for current PR / commit.NET ( No breaking changes )✅ API diff vs stable.NET ( No breaking changes )ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
…23127) There are three constructors involved here: 1. (UIBarButtonSystemItem systemItem, EventHandler handler) 2. (UIBarButtonSystemItem systemItem, NSObject target, Selector action) 3. (UIBarButtonSystemItem systemItem, UIAction primaryAction, UIMenu menu) The first constructor is a manually written convenience constructor, and needs to call another constructor. Either the second or the third constructor works, but the third constructor is only available on iOS 16+, while the second is available on all iOS version. This means that calling the third constructor is a bad idea, because it won't work on anything before iOS 16. Unfortunately that's exactly what we did. So change the code to call the second constructor instead. This is a regression that was introduced in f431538. Fixes #23122.
…23127) There are three constructors involved here: 1. (UIBarButtonSystemItem systemItem, EventHandler handler) 2. (UIBarButtonSystemItem systemItem, NSObject target, Selector action) 3. (UIBarButtonSystemItem systemItem, UIAction primaryAction, UIMenu menu) The first constructor is a manually written convenience constructor, and needs to call another constructor. Either the second or the third constructor works, but the third constructor is only available on iOS 16+, while the second is available on all iOS version. This means that calling the third constructor is a bad idea, because it won't work on anything before iOS 16. Unfortunately that's exactly what we did. So change the code to call the second constructor instead. This is a regression that was introduced in f431538. Fixes #23122.
#23131) Backport of #23127 Fixes #23122 There are three constructors involved here: 1. (UIBarButtonSystemItem systemItem, EventHandler handler) 2. (UIBarButtonSystemItem systemItem, NSObject target, Selector action) 3. (UIBarButtonSystemItem systemItem, UIAction primaryAction, UIMenu menu) The first constructor is a manually written convenience constructor, and needs to call another constructor. Either the second or the third constructor works, but the third constructor is only available on iOS 16+, while the second is available on all iOS version. This means that calling the third constructor is a bad idea, because it won't work on anything before iOS 16. Unfortunately that's exactly what we did. So change the code to call the second constructor instead. This is a regression that was introduced in f431538. Fixes #23122. Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
…onstructor. (#23132) Backport of #23127 Fixes #23122 There are three constructors involved here: 1. (UIBarButtonSystemItem systemItem, EventHandler handler) 2. (UIBarButtonSystemItem systemItem, NSObject target, Selector action) 3. (UIBarButtonSystemItem systemItem, UIAction primaryAction, UIMenu menu) The first constructor is a manually written convenience constructor, and needs to call another constructor. Either the second or the third constructor works, but the third constructor is only available on iOS 16+, while the second is available on all iOS version. This means that calling the third constructor is a bad idea, because it won't work on anything before iOS 16. Unfortunately that's exactly what we did. So change the code to call the second constructor instead. This is a regression that was introduced in f431538. Fixes #23122. Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
There are three constructors involved here:
The first constructor is a manually written convenience constructor, and needs
to call another constructor. Either the second or the third constructor works,
but the third constructor is only available on iOS 16+, while the second is
available on all iOS version.
This means that calling the third constructor is a bad idea, because it won't
work on anything before iOS 16. Unfortunately that's exactly what we did.
So change the code to call the second constructor instead.
This is a regression that was introduced in f431538.
Fixes #23122.