In session wwdc2023-10194 Design dynamic Live Activities at 04:53, it mentioned that we should use 'content replace transition' for animating in and out graphic elements and text.
The video shows some kind of animation combined with blurring and opacity changes.
But I can't seem to find code for doing this in SwiftUI or UIKit.
Does anyone know the API to achieve this? 🤔
Thank you for your help!
Design dynamic Live Activities
RSS for tagDiscuss the WWDC23 Session Design dynamic Live Activities
Posts under wwdc2023-10194 tag
5 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
I have a food delivery app similar to Uber Eat it was developed in Objective C now the requirement is to implement the Live activity for tracking the Active orders in live Activity. As i tried Live activity over the Swift it is working fine on all IOS Devices but when i implement that swift code into Objective C using all the standards by Bridging between Swift and Obj C copied the same code, There is no Error or Warning i am seeing in Live activity functionality in Objective C, but Live Activity UI can't seen on Lockscreen even i have checked in settings my app is showing that it supports Live Activity but no view.
Can somebody help me out in that how to integrate live activity into Objective C project?
Is it possible to get enabled status of app's live activity through areActivitiesEnabled inside other targets (other than main target)? seems it always returns true.
If you update live activity with alertConfiguration: argument, iPhone shows a notification (or expands dynamic island):
await runningActivity.update(content, alertConfiguration: .init(title: "Alert", body: "Done!", sound: .default))
Paired Watch presents a notification as well:
I cannot find a way to dismiss that live activity notification from Watch. Is there a way to remove it similarly to UNUserNotifications?
UNUserNotificationCenter.current().removeDeliveredNotifications(withIdentifiers: [notificationID])
How do you animate in live activities?
I've seen apps been able to update around 1 fps. For example with a character looping a dance animation.
How is this done?
I don't think you can call Activity.update() every second. Also it wouldn't run in the background all the time anyway?
Here's an example of Apple's own WWDC video with a bar animating
https://imgur.com/a/yywW7a8