Невозможно отобразить вид MetalKit внутри виджета iOS 17.IOS

Программируем под IOS
Гость
Невозможно отобразить вид MetalKit внутри виджета iOS 17.

Сообщение Гость »


Я создал простое представление с помощью MetalKit, которое отображает простой треугольник и отлично работает как в предварительном просмотре XCode, так и в симуляторе iPhone с iOS 17.2.
Однако, когда я пытаюсь использовать этот в моем Я получаю эту ошибку и не вижу предварительного просмотра в XCode и симуляторе:

Код: Выделить всё

The body of the Widget entries' view contains the following unsupported types: PlatformViewRepresentableAdaptor, PlatformViewRepresentableAdaptor
I'm really new to iOS development in general. Is it possible to use MetalKit-based views in iOS 17 widgets to create rich animations and effects?
Edit: Thank you for pointing out that iOS is very restrictive when it comes to widget updates. However as I can tell this is not exactly the case for Standby mode when there's nothing else but max 2 widgets on screen. There are some 3rd party standby widgets with continuous, rich and smooth 60fps animations. For example:


Источник: https://stackoverflow.com/questions/779 ... -17-widget

Вернуться в «IOS»