UIContentView / UIContentConfiguration incompatible with Swift strict concurrency?

For grins, I tried turning on strict concurrency checking in Xcode with one of our existing apps. We have a lot of work to do!

But one thing that I ran across that it's not clear to me how to resolve (possibly because I haven't been following all of the concurrency changes super closely) is an apparent conflict between the UIContentView & UIContentConfiguration protocols (which have no concurrency annotations) and our current implementations (since UIView is marked @MainActor). I feel like there must be something obvious I'm missing.

Stack Overflow post with example code: https://stackoverflow.com/questions/74214256/are-custom-uicontentview-uicontentconfiguration-implementations-incompatible-w

Replies

Follow up: it appears that in the beta iOS 17 SDK, the UIContentView protocol, its members, and the method UIContentConfiguration.makeConfiguration() have all been marked with the @MainActor attribute.

  • Thanks for the update.

Add a Comment