HomeiOS Developmentswiftui - Can't present MetalKit view inside iOS 17 widget

swiftui – Can’t present MetalKit view inside iOS 17 widget


I’ve created a easy view with MetalKit which renders a easy triangle and works simply tremendous in each XCode preview and iPhone Simulator w/ iOS 17.2.

Nonetheless when I attempt to use this View in my Widget I am getting this error and see no preview in XCode and simulator:

The physique of the Widget entries' view incorporates the next unsupported varieties: PlatformViewRepresentableAdaptor<ContentView>, PlatformViewRepresentableAdaptor<ContentView>

I am actually new to iOS improvement typically. Is it attainable to make use of MetalKit-based views in iOS 17 widgets to create wealthy animations and results?

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments