On watchOS 11, buttons now have an implicit leading and trailing padding which is similar in length to the .scenePadding.
This works well in most cases, but sometimes it would be useful to be able to change the padding or remove it altogether, to fit with the rest of the screen's design.
Is there any way currently to remove this padding? Thank you.
Post
Replies
Boosts
Views
Activity
I would like to call my App Intent directly from my main app target, in an effort to start a live activity in the background when I receive a silent push notification from the server.
I have seen in one of the WWDC developer lounges on Slack that this should be possible. Here is how I tried doing it: (it was recommended like that in the lounge)
let appIntent = LiveActivityRefreshIntent()
Task {
try await appIntent()
}
But I get a compiler error:
Instance method 'callAsFunction(donate:)' requires the types '(some IntentResult).Value' and 'Never' be equivalent
It's strange because as far as I can tell, I cannot declare my perform method as returning Never. Here is the signature and return value of my App Intent's perform method:
func perform() async throws -> some IntentResult {
LiveActivityController.shared.updateLiveActivities()
return .result()
}
Is there still a way to call the app intent from my code? If so, how?