@simonbs @lextar @steveshepard Curious if you experience the same: When setting the new inlinePredictionType to yes, the prediction is triggered via setAttributedMarkedText. But when setting the marked range, the insertion caret disappears and does not re-appear even when removing and re-adding the UITextInteraction.
@simonbs @steveshepard @lextar @simsaens When not updating markedTextRange but my own separate property it seems to work as expected. Feels wrong though.
@knutknatter @steveshepard @lextar @simsaens Thanks for keeping us updated! 🙏 I’ve been a little scared to tackle this change. It looks kike something that could cause headaches 😄
@simonbs @steveshepard @lextar @simsaens no Problem! Except for the caret disappearing it was pretty straightforward. But also unsure how to incorporate the property while also supporting prior OS versions.
@simonbs @steveshepard @lextar @simsaens another update: I believe “refreshing” the UITextInteraction by removing and then re-adding it does not work at all. The caret does not appear. Anybody experiencing the same? This may be connected to the issue of switching between non-editable and editable.
@knutknatter @steveshepard @lextar @simsaens I’m removing the UITextInteraction and re-adding the editable interaction when the user initiates editing by tapping the text view. That causes rhetorical caret to be hidden until the user taps a second time. That sounds a lot like what you’re seeing.
@simonbs @knutknatter @steveshepard @simsaens it's not fixed on iOS 17 RC

@lextar @knutknatter @steveshepard @simsaens I believe I have a fix for the caret not appearing on iOS 17 when using UITextInteraction.

The issue seems to be that the UITextSelectionDisplayInteraction that's automatically created when using UITextInteraction isn't activated when the editable text interaction is added to the view. Manually activating it resolves the issue.

Unfortunately, this uses a bit of private API 🤷‍♂️

You can see my workaround is here: https://github.com/simonbs/Runestone/pull/314

Adds workaround for caret not appearing on iOS 17 by simonbs · Pull Request #314 · simonbs/Runestone

This works around an issue where the caret does not appear when editing starts on iOS 17 until the user have tapped the text view again. This is a regression in UITextInteraction and other develope...

GitHub
@lextar @knutknatter @steveshepard @simsaens This fix just made it past app review and is included in Runestone 1.3.20: https://apps.apple.com/dk/app/runestone-text-editor/id1548193893
Runestone Text Editor App - App Store

Download Runestone Text Editor by Simon B. Støvring on the App Store. See screenshots, ratings and reviews, user tips and more games like Runestone Text Editor.

App Store
@simonbs @lextar @knutknatter @simsaens Happy New Year! Thought I'd revisit this issue on iOS 18. It turns out the UITextSelectionDisplayInteraction is (now?) available in the interactions array which avoids using private API, and removing/adding the text interaction is no longer necessary.
@steveshepard @lextar @knutknatter @simsaens That’s great! Thanks for the heads up!