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

Wrap RichTextCoordinator.syncContextWithTextView() in DispatchQueue #14

Closed
wants to merge 1 commit into from

Conversation

chFlorian
Copy link

image

Xcode 14 produces runtime warnings for this function, as it updates the UI from a background thread. This PR wraps the function in `DispatchQueue.main.async`. An alternative would be to use `@MainActor`.

This PR should get tested before merging!

@chFlorian chFlorian closed this Nov 1, 2022
@chFlorian
Copy link
Author

Sorry, I got confused with the warning. I thought it was about using the background thread, while in fact this looks like an issue with the SwiftUI SDK in Xcode 14.0.

@danielsaidi
Copy link
Owner

Hi! Yeah, this has been really confusing and has affected a bunch of my open-source projects. I first started looking into adding async support, but since it causes other problems I decided to wait until Xcode 14.1 to see if it's solved there.

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 this pull request may close these issues.

None yet

2 participants