flow_widget_ios 1.0.2
flow_widget_ios: ^1.0.2 copied to clipboard
iOS implementation of the flow_widget federated plugin.
flow_widget_ios #
iOS federated implementation for flow_widget.
Requirements #
- iOS 14.0 or later — WidgetKit requires iOS 14+.
- Live Activities / Dynamic Island require iOS 16.2+.
- CocoaPods and Swift Package Manager are both supported.
- Set your app's deployment target to at least 14.0:
# ios/Podfile
platform :ios, '14.0'
In Xcode: Runner target → General → Minimum Deployments → iOS 14.0.
Features #
- App Group
UserDefaultsstorage with typed wire codec - WidgetKit timeline reload via
WidgetCenter - Image persistence in the shared app group container
- Live Activities via ActivityKit (iOS 16.2+) with generic attributes
- Dynamic Island support when available
- Swift Package Manager + CocoaPods
Setup #
- Enable an App Group in your Runner target and widget extension.
- Pass the group id via
FlowWidgetOptions(appGroupId: 'group.dev.flowwidget'). - Register widget kinds with
FlowWidget.registerConfig(iosKind: ...).
Channel contract #
- Method channel:
dev.flow_widget/methods - Event channel:
dev.flow_widget/events
Live Activities #
The plugin uses a generic FlowWidgetActivityAttributes type with a
[String: String] content state. Complex values are JSON-encoded in the
string map. For custom ActivityAttributes types generated by the CLI, store
activity metadata in the shared container and render in your extension.