diff --git a/src/assets/json/en/ios/wwdc/ios-wwdc-listnota11y.json b/src/assets/json/en/ios/wwdc/ios-wwdc-listnota11y.json index bd15a4804..a467158d3 100644 --- a/src/assets/json/en/ios/wwdc/ios-wwdc-listnota11y.json +++ b/src/assets/json/en/ios/wwdc/ios-wwdc-listnota11y.json @@ -32,6 +32,17 @@ "raccourcis": "2023/2310252", "profils": ["All","SwiftUI","Xcode"] }, + { + "themes": "WWDC 2023", + "title": "Design dynamic Live Activities", + "type": ["Live Activities"], + "tests": [], + "verifier": [], + "resultat": ["Design"], + "exception": "", + "raccourcis": "2023/23LiveActivities", + "profils": ["All"] + }, { "themes": "WWDC 2023", "title": "Expand on Swift macros", @@ -76,6 +87,17 @@ "raccourcis": "2023/23Keynote", "profils": ["All","Accessibility","Keyboard","Keynote"] }, + { + "themes": "WWDC 2023", + "title": "Meet ActivityKit", + "type": ["Live Activities"], + "tests": [], + "verifier": [], + "resultat": ["Design"], + "exception": "", + "raccourcis": "2023/23LiveActivities", + "profils": ["All"] + }, { "themes": "WWDC 2023", "title": "Perform accessibility audits for your app", @@ -109,6 +131,17 @@ "raccourcis": "2023/2310057", "profils": ["All","SwiftUI"] }, + { + "themes": "WWDC 2023", + "title": "Update Live Activities with push notifications", + "type": ["Live Activities"], + "tests": [], + "verifier": [], + "resultat": [], + "exception": "", + "raccourcis": "2023/23LiveActivities", + "profils": ["All"] + }, { "themes": "WWDC 2023", "title": "What’s new in SF Symbols 5", diff --git a/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_1.png b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_1.png new file mode 100644 index 000000000..7b72a884d Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_1.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_10.png b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_10.png new file mode 100644 index 000000000..0fbe4f6ac Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_10.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_11.png b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_11.png new file mode 100644 index 000000000..09f76fff8 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_11.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_12.png b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_12.png new file mode 100644 index 000000000..23d0c0d8c Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_12.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_13.png b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_13.png new file mode 100644 index 000000000..ed0c3636a Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_13.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_14.png b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_14.png new file mode 100644 index 000000000..b8a631a0a Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_14.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_15.png b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_15.png new file mode 100644 index 000000000..c6851eea6 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_15.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_16.png b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_16.png new file mode 100644 index 000000000..4df134f8d Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_16.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_17.png b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_17.png new file mode 100644 index 000000000..b88f2acc9 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_17.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_18.png b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_18.png new file mode 100644 index 000000000..bcb28e525 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_18.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_19.png b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_19.png new file mode 100644 index 000000000..d1de9e809 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_19.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_2.png b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_2.png new file mode 100644 index 000000000..abb39e102 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_2.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_20.png b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_20.png new file mode 100644 index 000000000..9282633ec Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_20.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_21.png b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_21.png new file mode 100644 index 000000000..980ccf327 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_21.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_22.png b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_22.png new file mode 100644 index 000000000..7e6679457 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_22.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_23.png b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_23.png new file mode 100644 index 000000000..8c316784a Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_23.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_24.png b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_24.png new file mode 100644 index 000000000..660b6e348 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_24.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_25.png b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_25.png new file mode 100644 index 000000000..7926a3b1d Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_25.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_26.png b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_26.png new file mode 100644 index 000000000..b12e2f337 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_26.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_27.png b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_27.png new file mode 100644 index 000000000..e0f4f8ed1 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_27.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_28.png b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_28.png new file mode 100644 index 000000000..59f97de6d Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_28.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_29.png b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_29.png new file mode 100644 index 000000000..a4cdabbac Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_29.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_3.png b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_3.png new file mode 100644 index 000000000..8b32ccdf6 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_3.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_30.png b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_30.png new file mode 100644 index 000000000..8d6e3c188 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_30.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_31.png b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_31.png new file mode 100644 index 000000000..acb8d647b Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_31.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_32.png b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_32.png new file mode 100644 index 000000000..badf2bbca Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_32.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_33.png b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_33.png new file mode 100644 index 000000000..2cdf4c330 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_33.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_34.png b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_34.png new file mode 100644 index 000000000..cf54a5042 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_34.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_35.png b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_35.png new file mode 100644 index 000000000..06d9343d9 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_35.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_36.png b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_36.png new file mode 100644 index 000000000..6c40b0727 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_36.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_37.png b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_37.png new file mode 100644 index 000000000..44d939e22 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_37.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_38.png b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_38.png new file mode 100644 index 000000000..5fdd8a8e0 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_38.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_39.png b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_39.png new file mode 100644 index 000000000..8f568140e Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_39.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_4.png b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_4.png new file mode 100644 index 000000000..f73fd6b0e Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_4.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_40.png b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_40.png new file mode 100644 index 000000000..f59fc1f52 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_40.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_41.png b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_41.png new file mode 100644 index 000000000..c1f68c7bc Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_41.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_42.png b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_42.png new file mode 100644 index 000000000..880c1f43d Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_42.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_43.png b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_43.png new file mode 100644 index 000000000..f4b1c3978 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_43.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_44.png b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_44.png new file mode 100644 index 000000000..2018328eb Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_44.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_5.png b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_5.png new file mode 100644 index 000000000..df0bd4178 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_5.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_6.png b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_6.png new file mode 100644 index 000000000..10fad7188 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_6.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_7.png b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_7.png new file mode 100644 index 000000000..1e16ec80a Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_7.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_8.png b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_8.png new file mode 100644 index 000000000..57ceed2d4 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_8.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_9.png b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_9.png new file mode 100644 index 000000000..444b813b1 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_9.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_Poster.png b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_Poster.png new file mode 100644 index 000000000..a747e82c5 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-LiveActivities_Poster.png differ diff --git a/src/en/mobile/ios/test.md b/src/en/mobile/ios/test.md index 1e1b9e9cb..d7a701491 100644 --- a/src/en/mobile/ios/test.md +++ b/src/en/mobile/ios/test.md @@ -243,11 +243,20 @@ Since Xcode 11, the Accessibility Inspector tool provides a specific [Color  The Xcode IDE contains a very interesting tool entitled **Accessibility Inspector**. -Its goal and way of being used won't be developed here because they're perfectly explained in these detailed videos [`Auditing` `Your` `Apps` `for` `Accessibility`](../wwdc/2016/407/) and [`Accessibility` `Inspector`](../wwdc/2019/#accessibility-inspector) that are highly recommended to be watched. +Its goal and way of being used won't be developed here because they're perfectly explained in these detailed videos: +- [`Auditing` `Your` `Apps` `for` `Accessibility`](../wwdc/2016/407/), + +- [`Accessibility` `Inspector`](../wwdc/2019/#accessibility-inspector), + +- [`Perform` `accessibility` `audits` `for` `your` `app`](../wwdc/nota11y/2023/2310035/) + +... that are highly recommended to be watched.

### Code testing -Many kinds of tests (unit tests...) may be set up by the developers in order to maintain a stable and reliable code over time. +Many kinds of tests (unit tests...) may be set up by the developers in order to maintain a **stable and reliable code** over time. These good practice ensure functional continuity by being informed of any deviation introduced in subsequent developments. + +Take a look at the [`Perform` `accessibility` `audits` `for` `your` `app`](../wwdc/nota11y/2023/2310035/) video if further information are necessary to include **automation elements** in your tests for instance.

diff --git a/src/en/mobile/ios/wwdc/nota11y/2023/23LiveActivities.md b/src/en/mobile/ios/wwdc/nota11y/2023/23LiveActivities.md new file mode 100644 index 000000000..86b572ee8 --- /dev/null +++ b/src/en/mobile/ios/wwdc/nota11y/2023/23LiveActivities.md @@ -0,0 +1,475 @@ +--- +title : "Live Activities" +abstract: "Learn the best way to create graphically rich layouts for the Live Activities." + +displayToc: true +--- + +# WWDC 2023: Live Activities +Find hereafter a detailed summary of three videos that belong to a [taxonomy of some WWDC footages](../../). + +The original videos are available on the **Apple official website** ([session 10184](https://developer.apple.com/videos/play/wwdc2023/10184/), [session 10185](https://developer.apple.com/videos/play/wwdc2023/10185/), [session 10194](https://developer.apple.com/videos/play/wwdc2023/10194/)). +![](../../../../../images/iOSdev/wwdc23-LiveActivities_Poster.png) +"Live Activities are a glanceable way for someone to keep track of the progress of a task within your app. We'll teach you how you can **create helpful experiences** for the Lock Screen, the Dynamic Island, and StandBy. Learn how to **update your app's Live Activities**, monitor activity state, and take advantage of WidgetKit and SwiftUI to build richer experiences." + +"Discover how you can remotely **update Live Activities** in your app when you push content through **Apple Push Notification service** (APNs). We'll show you how to configure your first Live Activity push locally so you can quickly iterate on your implementation. **Learn best practices** for determining your push priority and configuring alerting updates, and explore how to further improve your Live Activities with relevance score and stale date." + +"Live Activities allow your app to display live information in key system locations on iOS and iPadOS. Learn the best way to **create graphically rich layouts** that update seamlessly on the Lock Screen, in StandBy, and in the Dynamic Island. **Incorporate interactivity and animation** to help people stay in touch with live updating events from your app as they navigate outside of your app." + +
Hereafter, the underlined elements **lead directly to the playback of the WWDC video** at the appropriate moment. +
+ +## [Overview](https://developer.apple.com/videos/play/wwdc2023/10184/?time=41) +**Live Activities** are the best way to follow an event or a task progression in real time instead of using a [huge number of notifications](https://developer.apple.com/videos/play/wwdc2023/10194?time=41) to reach the same goal. +![](../../../../../images/iOSdev/wwdc23-LiveActivities_1.png) + +They can be displayed through the **Dynamic Island** available after a certain [model of iPhone](https://developer.apple.com/videos/play/wwdc2023/10184/?time=66) (the compact, minimal and expanded presentations are explained in the [BuildUI](#build) section). + +![](../../../../../images/iOSdev/wwdc23-LiveActivities_2.png) + +The new **[`Standby`](https://developer.apple.com/videos/play/wwdc2023/101/?time=1916)** feature and **`iPadOS` `17`** are [good candidates](https://developer.apple.com/videos/play/wwdc2023/10184/?time=127) for these activities to improve the user experience supported by the `API`. + +![](../../../../../images/iOSdev/wwdc23-LiveActivities_3.png) + +Based on the **Activity framework** used by `SwiftUI` and `WidgetKit`, the `Live Activities` rely on some [best practices](https://developer.apple.com/videos/play/wwdc2023/10184/?time=197) to be followed. + +![](../../../../../images/iOSdev/wwdc23-LiveActivities_4.png) + +
+ +## Design +### [Lock Screen](https://developer.apple.com/videos/play/wwdc2023/10194?time=78) + +![](../../../../../images/iOSdev/wwdc23-LiveActivities_11.png) + +Located above the usual notifications on the lock screen, the `Live Activities` should have a dedicated interface so as to be undoubtedly identified. +
+ + + +
+
+ +🎬 + +The importance of maintaining a **graphical consistency** shouldn't be removed in the `Dark Mode`. +![](../../../../../images/iOSdev/wwdc23-LiveActivities_12.png) + +Using [bold colors](https://developer.apple.com/videos/play/wwdc2023/10194?time=182) is a good way to **highlight some elements** in the widget. +![](../../../../../images/iOSdev/wwdc23-LiveActivities_13.png) + +The layout should **adapt the display of information** according to their [relevance](https://developer.apple.com/videos/play/wwdc2023/10194?time=224). +![](../../../../../images/iOSdev/wwdc23-LiveActivities_14.png) +
+ +
+ +🎬 + +Whatever the native default transitions (numeric or replace content transitions...) or some customized ones, **smoothness** with **unoverlapping** and **fading** are important notions to be taken into account for transitions in the widget. +
+ +
+ +🎬 + +It's crucial to notify the user by means of an alert if an **update** requires his attention. + +![](../../../../../images/iOSdev/wwdc23-LiveActivities_15.png) + +The **standard notification sound** combined with the **screen lighting** are the essential elements that point out an alert that should be highlighted by a specific graphical element as well. +
+
+
+
+ +### [Standby](https://developer.apple.com/videos/play/wwdc2023/10194?time=364) +This `iOS 17` **[new feature](https://developer.apple.com/videos/play/wwdc2023/101/?time=1916)** has an **2X scale-up** process regarding the widget size so as to make the most of the screen size. + +![](../../../../../images/iOSdev/wwdc23-LiveActivities_16.png) + +It automatically **tailors the background color** to the `Live Activity`'s but [special attention](https://developer.apple.com/videos/play/wwdc2023/10194?time=387) must be paid to the highlighted graphic elements that divide parts in the widget. + +![](../../../../../images/iOSdev/wwdc23-LiveActivities_17.png) + +Besides checking the color contrast for accessibility, it's vital to inspect the widget's in order to have the [best rendering](https://developer.apple.com/videos/play/wwdc2023/10194?time=442) that's offered by the **night mode** feature. +![](../../../../../images/iOSdev/wwdc23-LiveActivities_18.png) +
+ +### [Dynamic Island](https://developer.apple.com/videos/play/wwdc2023/10194?time=463) +![](../../../../../images/iOSdev/wwdc23-LiveActivities_19.png) + +[Smoothness and fluidity](https://developer.apple.com/videos/play/wwdc2023/10194/?time=537) are the main keywords that go with the `Dynamic Island` for outlining the essential information through animations. +![](../../../../../images/iOSdev/wwdc23-LiveActivities_20.png) + +It's of a [major importance](https://developer.apple.com/videos/play/wwdc2023/10194/?time=577) to have **fluent rounded shapes** with the `Dynamic Island` edges... + +![](../../../../../images/iOSdev/wwdc23-LiveActivities_21.png) + +... and converting **non rounded shapes** into a blurry element is also a good trick to get an harmonious fit. + +![](../../../../../images/iOSdev/wwdc23-LiveActivities_22.png) + +Some necessary advice should be known for perfectly designing the **[three size classes](https://developer.apple.com/videos/play/wwdc2023/10194/?time=666)** of the `Dynamic Island` detailed in the [BuildUI](#build) section. + + +
+
+ +🎬 + +This view aims at keeping on using one's device whithout losing sight on the most important information about some running activities. +For this purpose, it's highly recommended to **avoid useless spaces** around the [sensor region](https://developer.apple.com/videos/play/wwdc2023/10194/?time=700). + +![](../../../../../images/iOSdev/wwdc23-LiveActivities_23.png) + +When [alerting](https://developer.apple.com/videos/play/wwdc2023/10194/?time=738) the user about a crucial information, it's better to **expand the view** instead of sending a notification. + +![](../../../../../images/iOSdev/wwdc23-LiveActivities_24.png) +
+ +
+ +🎬 +![](../../../../../images/iOSdev/wwdc23-LiveActivities_26.png) + +When expanded, the view should keep the **same information at the same location** in order to [be coherent](https://developer.apple.com/videos/play/wwdc2023/10194/?time=797) and avoid a cognitive work for the user. + +![](../../../../../images/iOSdev/wwdc23-LiveActivities_25.png) + +Better is the [refinement](https://developer.apple.com/videos/play/wwdc2023/10194/?time=806) regarding the spaces around the graphic items, better will be the user experience and more undetected will be the sensor region. + +![](../../../../../images/iOSdev/wwdc23-LiveActivities_27.png) +
+ +
+ +🎬 + +Appearing when switching between **multiple apps** while `Live Activities` are still alive, the minimal view aims at providing a relevant information through a teeny-weeny area that must be refined when devising the app. + +![](../../../../../images/iOSdev/wwdc23-LiveActivities_28.png) +
+
+
+
+ +## [Lifecycle](https://developer.apple.com/videos/play/wwdc2023/10184/?time=305) + + +
+
+ +🎬 + +Few milestones are mandatory for this first lifecycle step: +1. Implement the **ActivityAttributes** protocol to describe the dynamic and static contents. + +2. Define a structure to outline the state and the configuration of the activity. + +3. Request and start the `Live Activity`. + +![](../../../../../images/iOSdev/wwdc23-LiveActivities_5.png) +
+ +
+ +🎬 + +When updating an activity, it's important to: +- **Identify** what needs to be updated, + +- **Create an alert** for informing the user the update occurs if need be. + +![](../../../../../images/iOSdev/wwdc23-LiveActivities_6.png) +
+ +
+ +🎬 + +Using the **ActivityStateUpdates** structure is the best way to observe the **four states** an activity may encounter (started, finished, dismissed, stale) so as to provide the appropriate command to be executed as quick as possible. + +![](../../../../../images/iOSdev/wwdc23-LiveActivities_7.png) +
+ +
+ +🎬 + +Before ending an activity, it's important to **create a final content** combined with the **policy** the system should remove the `Live Activity`. + +![](../../../../../images/iOSdev/wwdc23-LiveActivities_8.png) +
+
+
+
+ + +## [Build UI](https://developer.apple.com/videos/play/wwdc2023/10184/?time=647) + + +
+
+ +Besides the **`Lock Screen UI`** that displays the `Live Activities` under a usual notification aspect, it's important to notice that the specific **`Dynamic Island`** is made up of three distinct presentations: + +- **[compact](https://developer.apple.com/videos/play/wwdc2023/10184/?time=774)**: when the owner app is the only one to fire an activity, + +- **[minimal](https://developer.apple.com/videos/play/wwdc2023/10184/?time=855)**: when more than one app starts a `Live Activity`, + +- **[expanded](https://developer.apple.com/videos/play/wwdc2023/10184/?time=905)**: when one of the previous two presentations is touched and held. + +
+ +![](../../../../../images/iOSdev/wwdc23-LiveActivities_10.png) +
+ +
+ +To realize the interface introduced in the previous tab, the `Live Activity` configuration should be put in the **[WidgetBundle](https://developer.apple.com/videos/play/wwdc2023/10184/?time=650)**. + +The implementation for the **`Lock` `Screen` `UI`** concerns the [first closure](https://developer.apple.com/videos/play/wwdc2023/10184/?time=710) of the configuration while the second one deals with the **`Dynamic` `Island`** whose size classes are detailed in the `User interface` tab of this section. + +![](../../../../../images/iOSdev/wwdc23-LiveActivities_9.png) +
+
+
+
+
+ +## Notifications +### [Preparations](https://developer.apple.com/videos/play/wwdc2023/10185/?time=134) +The basic understanding of what the interactions between an app, its content server and the **A**pple **P**ush **N**otification **S**ervice are is of a great help for integrating the push updates. + + +![](../../../../../images/iOSdev/wwdc23-LiveActivities_29.png) + +Configuring `Xcode` and implementing the proper code for handling push tokens are madatory milestones. + + + +
+
+ +🎬 + +Adding the push notifications service in `Xcode` is necessary for `ActivityKit` to request push tokens. +![](../../../../../images/iOSdev/wwdc23-LiveActivities_30.png) +
+ +
+ +🎬 + +Few lines of code are required for enabling and handling push updates. +![](../../../../../images/iOSdev/wwdc23-LiveActivities_31.png) +
+
+
+
+ +Due to the **push token uniqueness for each activity**, it's crucial to be aware of the appropriate one when [dealing with the updates](https://developer.apple.com/videos/play/wwdc2023/10185/?time=335). +![](../../../../../images/iOSdev/wwdc23-LiveActivities_32.png) + +### [First push update](https://developer.apple.com/videos/play/wwdc2023/10185/?time=364) +Sending a push update relies on an `HTTP` request to `APNs`. +![](../../../../../images/iOSdev/wwdc23-LiveActivities_33.png) + + +
+
+ +🎬 + +Besides the normal `HTTP` headers to be used, the **`APNs` headers are threefold**. + +![](../../../../../images/iOSdev/wwdc23-LiveActivities_34.png) +
+ +
+ +🎬 + +The first `APNs` payload to be sent is made up of **three essential fields**. + +![](../../../../../images/iOSdev/wwdc23-LiveActivities_36.png) +
+
+
+
+ +For [testing](https://developer.apple.com/videos/play/wwdc2023/10185/?time=502), using **command lines** may be the quickest way to achieve one's goal through executing a **[curl command](https://developer.apple.com/videos/play/wwdc2023/10185/?time=565)** for sending the `APNs` request. + +![](../../../../../images/iOSdev/wwdc23-LiveActivities_37.png) + +### [Debugging updates failures](https://developer.apple.com/videos/play/wwdc2023/10185/?time=619) +![](../../../../../images/iOSdev/wwdc23-LiveActivities_35.png) + +### [Priorities](https://developer.apple.com/videos/play/wwdc2023/10185/?time=672) +Priorities have different purposes and their characteristics may impact the way they will be introduced in an app. + +![](../../../../../images/iOSdev/wwdc23-LiveActivities_38.png) + +When [frequent updates](https://developer.apple.com/videos/play/wwdc2023/10185/?time=775) are necessary, useful details have to be taken into account for avoiding the cons of such events. + +![](../../../../../images/iOSdev/wwdc23-LiveActivities_39.png) + +Even though enabled, the **[user has still control](https://developer.apple.com/videos/play/wwdc2023/10185/?time=810)** over the updates frequency of which the server needs to be aware. + +![](../../../../../images/iOSdev/wwdc23-LiveActivities_40.png) +
+ +### [Alerts](https://developer.apple.com/videos/play/wwdc2023/10185/?time=849) +In order to point out some elements or events for capturing the user's attention, the `APNs` payload is added a [complementary object](https://developer.apple.com/videos/play/wwdc2023/10185/?time=861) for which **[localization](https://developer.apple.com/videos/play/wwdc2023/10185/?time=896)** and **[sound customization](https://developer.apple.com/videos/play/wwdc2023/10185/?time=919)** are possible. + +![](../../../../../images/iOSdev/wwdc23-LiveActivities_41.png) +
+ +### Miscellaneous +**Ending a `Live Activity`** is triggered thanks to a [new event value](https://developer.apple.com/videos/play/wwdc2023/10185/?time=946) in the `APNs` payload. +![](../../../../../images/iOSdev/wwdc23-LiveActivities_42.png) + +**Informing** the user of **[outdated updates](https://developer.apple.com/videos/play/wwdc2023/10185/?time=987)** can be displayed through an [added stale date field](https://developer.apple.com/videos/play/wwdc2023/10185/?time=1004) in the `APNs` payload and a [dedicated property](https://developer.apple.com/videos/play/wwdc2023/10185/?time=996) in the `ActivityConfiguration`. + +![](../../../../../images/iOSdev/wwdc23-LiveActivities_43.png) + +**Ordering the notification stack** on the `Lock Screen` in case of [multiple `Live Activities`](https://developer.apple.com/videos/play/wwdc2023/10185/?time=1027) is handled by the system with the ones with more important updates set near the top. +Besides, the most important `Live Activity` is also displayed in the `Dynamic Island` by the system that follows the indication of the **relevant-score field** in the `APNs` payload. + +![](../../../../../images/iOSdev/wwdc23-LiveActivities_44.png) +
\ No newline at end of file diff --git a/src/en/mobile/ios/wwdc/nota11y/index.md b/src/en/mobile/ios/wwdc/nota11y/index.md index 9c1496192..352dabe01 100644 --- a/src/en/mobile/ios/wwdc/nota11y/index.md +++ b/src/en/mobile/ios/wwdc/nota11y/index.md @@ -24,15 +24,18 @@ The videos that may be of interest to **designers** are highlighted with a **ded