iOS 14 widgets #3175
-
I’m building an app that would be perfect to have some of those iOS widgets on the home screen pages. Any idea how to go about incorporating that into my app? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
The home screen widgets are built with WidgetKit and, unfortunately, that appears to be out of scope for Capacitor. The widgets themselves are comprised of SwiftUI views (and a timeline of archived data states) which the system manages. There is no web view available. From your Capacitor app, you would need a plugin to which you can pass data for rendering. But all the real work would be in transforming that data into a timeline of native data structures and building the UI to display it in a native app extension. That's all highly specific to your app. |
Beta Was this translation helpful? Give feedback.
-
Hi, |
Beta Was this translation helpful? Give feedback.
The home screen widgets are built with WidgetKit and, unfortunately, that appears to be out of scope for Capacitor. The widgets themselves are comprised of SwiftUI views (and a timeline of archived data states) which the system manages. There is no web view available. From your Capacitor app, you would need a plugin to which you can pass data for rendering. But all the real work would be in transforming that data into a timeline of native data structures and building the UI to display it in a native app extension. That's all highly specific to your app.