もっと詳しく

One of the coolest features Apple will introduce in iOS 16 is the Live Action feature on the new lock screen. While the company has already stated that it won’t be available in 16.0, what’s changed in beta 4 is that the Live Activity API is now available to developers, which means they can try it out and see how they can implement the feature on their apps. .

Now that the framework is available, Apple has also published documentation on how to display real-time data on the lock screen with Live Actions in iOS 16.

Interactive actions display and update the latest app data on the iPhone lock screen. This allows people to see the live information that matters most to them at a glance. To offer interactive actions, add code to an existing widget extension, or create a new widget extension if your app doesn’t already include one. Live Activities use WidgetKit and SwiftUI features for their lock screen user interface. The role of ActivityKit is to manage the lifecycle of each Live Activity: you use its API to request, update, and terminate the Live Activity.

In iOS 16, a Live Activity can be active for up to eight hours unless the app or user explicitly ends it. After this limit, the system automatically terminates the Live Activity if the user or application has not terminated it. In this final state, the Live Activity remains on the lock screen for up to four more hours before the system deletes it. The user can also delete it. As a result, Live Activity remains on the lock screen for no more than 12 hours.

Each Live Activity runs in its own sandbox and, unlike a widget, cannot access the network or receive location updates. In order to update the dynamic data of an active Live Activity, developers will have to use the ActivityKit framework in their application or allow their Live Activities to receive remote push notifications.

Apple demonstrated during the WWDC 2022 keynote that Live Activity can work for an Uber ride or see if your order is ready at Starbucks.

If you notice any changes in today’s new iOS 16 public beta or other new beta releases from Apple today, please let us know in the comments below or at Twitter @. Follow our full hands-on review of today’s releases right here on , today and through the rest of the week.

The post iOS 16 Live Activity API Now Available with Developer Beta 4 appeared first on Gamingsym.