-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question]: Lock Screen Widget #4
Comments
@mariomurrent-softwaresolutions Yes I think this should also be possible. There are no extra configurations needed to add a widget to the lock screen so I don't see any problems. You should only add some new views which are designed to be used on the lock screen, and call them accordingly. In the Apple Developer docs they provided an example: struct EmojiRangerWidgetEntryView: View {
var entry: Provider.Entry
@Environment(\.widgetFamily) var family
@ViewBuilder
var body: some View {
switch family {
case .accessoryInline:
// Code to construct the view for the inline widget or watch complication.
case .accessoryRectangular:
// Code to construct the view for the rectangular Lock Screen widget or watch complication.
case .accessoryCircular:
// Code to construct the view for the circular Lock Screen widget or watch complication.
case .systemSmall:
// Code to construct the view for the small widget.
default:
// Code to construct the view for other widgets; for example, the system medium or large widgets.
}
}
} |
Very nice - i will try it out and let you know :) |
@mariomurrent-softwaresolutions did this work? |
Since I’m using the EAS build in managed workflow, where should this code be added? |
Maybe it's a dump question, but is it possible to use this widget as lockscreen widget as well?
The text was updated successfully, but these errors were encountered: