How you preview the live activity UI on development?
Yggdrasilqh opened this issue · comments
It's a helpful and amazing demo!
but I don't see any preview code on this demo. I wanna know how to preview the activity widget use the PreviewProvider
? or you just run entire app to preview the UI?
struct live_activities_Previews: PreviewProvider {
static var previews: some View {
live_activitiesEntryView(context: !how to create this!)
.previewContext(WidgetPreviewContext(family: .systemSmall))
}
}
Thanks!
Hi. I cannot find how to preview the live activities widget in Apple Developer Documentation.
The thing is still in beta. So, I simply run the app to preview the UI.
Or you may preview the widget design first, then copy the code back to the Live Widget(s).
Hope help :) @Yggdrasilqh
Hi. I cannot find how to preview the live activities widget in Apple Developer Documentation. The thing is still in beta. So, I simply run the app to preview the UI.
Or you may preview the widget design first, then copy the code back to the Live Widget(s).
Hope help :) @Yggdrasilqh
Oh, that's a good idea!
thanks for your reply. have a good day!
@Yggdrasilqh Sample is updated with preview (iOS 16.2 or above)
https://github.com/1998code/iOS16-Live-Activities#xcode-preview-ios-162-or-above