-
Notifications
You must be signed in to change notification settings - Fork 730
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
fix: Updated workaround for iOS 16 UITextInput.SelectedTextRange
crashes
#9559
Conversation
…ashes Pro: It does not break app compatibility, selection works Con: This does not work _currently_ with the dynamic registrar [1] which is the default when building for iOS simulators. OTOH there's a workaround for that [2]. [1] Unless building with the iOS SDK for Xcode 14 (currently only previews) once xamarin/xamarin-macios#15712 is merged [2] Adding `--registrar=static` to the simulator builds will fix this, sadly build times will be longer (so better use [1] asap)
It looks like there's something the runtime tests don't like, but I'm not seeing any exceptions in the apps log. Maybe it's changing the runtime behavior of TextBox? |
@jeromelaban it should not (change the behaviour). I'll investigate this asap, thanks! |
So the crash here is like this:
|
@jeromelaban doh! That's why I could not duplicate it. That's the issue I fixed in xamarin-macios and requires using |
Excellent! Let's see if the CI is happier now ;) Thanks! |
@jeromelaban the CI still need another commit to add this flag. Resetting my mono tree to test it right now :) |
@spouliot I can confirm that it works with the static registrar ! |
SelectedRange's value is used here, so it seems we still need to read the proper content: uno/src/Uno.UI/Controls/Window.iOS.cs Line 389 in 300d0e1
|
@jeromelaban I forgot to include that change with my earlier commit. As far as I know (and tested) there's no issue marshalling the native |
GitHub Issue (If applicable): #9430
PR Type
What kind of change does this PR introduce?
What is the current behavior?
UITextInput.SelectedTextRange
crashes on iOS 16 betasWhat is the new behavior?
Updated workaround to avoid the runtime crash while keeping the
UITextInput.SelectedTextRange
functionality available.PR Checklist
Please check if your PR fulfills the following requirements:
Screenshots Compare Test Run
results.Other information
Pro: It does not break app compatibility, selection works
Con: This does not work currently with the dynamic registrar [1] which is the default when building for iOS simulators. OTOH there's a workaround for that [2].
[1] Unless building with the iOS SDK for Xcode 14 (currently only previews) once xamarin/xamarin-macios#15712 is merged
[2] Adding
--registrar=static
to the simulator builds will fix this, sadly build times will be longer (so better use [1] asap)Internal Issue (If applicable):