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 7e541b3a9..0186e2c4e 100644 --- a/src/assets/json/en/ios/wwdc/ios-wwdc-listnota11y.json +++ b/src/assets/json/en/ios/wwdc/ios-wwdc-listnota11y.json @@ -54,6 +54,17 @@ "raccourcis": "2023/2310197", "profils": ["All","What's new in..."] }, + { + "themes": "WWDC 2023", + "title": "What’s new in Swift", + "type": [], + "tests": [], + "verifier": [], + "resultat": [], + "exception": "", + "raccourcis": "2023/2310164", + "profils": ["All","Swift","What's new in..."] + }, { "themes": "WWDC 2023", "title": "What’s new in SwiftUI", diff --git a/src/en/mobile/images/iOSdev/wwdc23-10164_1.png b/src/en/mobile/images/iOSdev/wwdc23-10164_1.png new file mode 100644 index 000000000..18ebb4e74 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-10164_1.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-10164_10.png b/src/en/mobile/images/iOSdev/wwdc23-10164_10.png new file mode 100644 index 000000000..ffff8b18a Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-10164_10.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-10164_11.png b/src/en/mobile/images/iOSdev/wwdc23-10164_11.png new file mode 100644 index 000000000..59ac0f23a Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-10164_11.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-10164_12.png b/src/en/mobile/images/iOSdev/wwdc23-10164_12.png new file mode 100644 index 000000000..c8794942b Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-10164_12.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-10164_13.png b/src/en/mobile/images/iOSdev/wwdc23-10164_13.png new file mode 100644 index 000000000..a6f421ffe Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-10164_13.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-10164_14.png b/src/en/mobile/images/iOSdev/wwdc23-10164_14.png new file mode 100644 index 000000000..58f875e80 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-10164_14.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-10164_15.png b/src/en/mobile/images/iOSdev/wwdc23-10164_15.png new file mode 100644 index 000000000..f39f08a19 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-10164_15.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-10164_16.png b/src/en/mobile/images/iOSdev/wwdc23-10164_16.png new file mode 100644 index 000000000..016d8767b Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-10164_16.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-10164_17.png b/src/en/mobile/images/iOSdev/wwdc23-10164_17.png new file mode 100644 index 000000000..462e948b4 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-10164_17.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-10164_18.png b/src/en/mobile/images/iOSdev/wwdc23-10164_18.png new file mode 100644 index 000000000..b1bf39bc9 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-10164_18.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-10164_19.png b/src/en/mobile/images/iOSdev/wwdc23-10164_19.png new file mode 100644 index 000000000..6326f2be6 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-10164_19.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-10164_2.png b/src/en/mobile/images/iOSdev/wwdc23-10164_2.png new file mode 100644 index 000000000..6d00fd8c5 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-10164_2.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-10164_20.png b/src/en/mobile/images/iOSdev/wwdc23-10164_20.png new file mode 100644 index 000000000..00ba28795 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-10164_20.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-10164_21.png b/src/en/mobile/images/iOSdev/wwdc23-10164_21.png new file mode 100644 index 000000000..b8d614524 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-10164_21.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-10164_22.png b/src/en/mobile/images/iOSdev/wwdc23-10164_22.png new file mode 100644 index 000000000..0aa245664 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-10164_22.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-10164_23.png b/src/en/mobile/images/iOSdev/wwdc23-10164_23.png new file mode 100644 index 000000000..da1c842a6 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-10164_23.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-10164_3.png b/src/en/mobile/images/iOSdev/wwdc23-10164_3.png new file mode 100644 index 000000000..9a07eeb22 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-10164_3.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-10164_4.png b/src/en/mobile/images/iOSdev/wwdc23-10164_4.png new file mode 100644 index 000000000..dcf70561b Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-10164_4.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-10164_5.png b/src/en/mobile/images/iOSdev/wwdc23-10164_5.png new file mode 100644 index 000000000..b178a0906 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-10164_5.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-10164_6.png b/src/en/mobile/images/iOSdev/wwdc23-10164_6.png new file mode 100644 index 000000000..1384da6c5 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-10164_6.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-10164_7.png b/src/en/mobile/images/iOSdev/wwdc23-10164_7.png new file mode 100644 index 000000000..6898f48c9 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-10164_7.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-10164_8.png b/src/en/mobile/images/iOSdev/wwdc23-10164_8.png new file mode 100644 index 000000000..2ddc19ee3 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-10164_8.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-10164_9.png b/src/en/mobile/images/iOSdev/wwdc23-10164_9.png new file mode 100644 index 000000000..5f3641a45 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-10164_9.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-10164_Poster.png b/src/en/mobile/images/iOSdev/wwdc23-10164_Poster.png new file mode 100644 index 000000000..a76182ae5 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-10164_Poster.png differ diff --git a/src/en/mobile/ios/wwdc/nota11y/2023/2310164.md b/src/en/mobile/ios/wwdc/nota11y/2023/2310164.md new file mode 100644 index 000000000..2738e99fa --- /dev/null +++ b/src/en/mobile/ios/wwdc/nota11y/2023/2310164.md @@ -0,0 +1,213 @@ +--- +title : "What’s new in Swift" +abstract: "Discover powerful enhancements to the trait system in UIKit." + +displayToc: true +--- + +# WWDC 2023: What’s new in Swift +Find hereafter a detailed summary of a video that belongs to a [taxonomy of some WWDC footages](../../). + +The original video is available on the **Apple official website** ([session 10164](https://developer.apple.com/videos/play/wwdc2023/10164/)). +![](../../../../../images/iOSdev/wwdc23-10164_Poster.png) +"Join us for an update on Swift. We'll show you how APIs are becoming more extensible and expressive with features like **parameter packs and macros**. We'll also take you through improvements to interoperability and share how we're expanding **Swift's performance and safety benefits** everywhere from Foundation to large-scale distributed programs on the server." +
Hereafter, the underlined elements lead directly to the playback of the WWDC video at the appropriate moment. +
+![](../../../../../images/iOSdev/wwdc23-10164_1.png) +The `Swift` [open source project](https://developer.apple.com/videos/play/wwdc2023/10164/?time=40) has set up some changes in its operating mode to head towards a more efficient collaborative work. +
+ +## [Expressive code](https://developer.apple.com/videos/play/wwdc2023/10164/?time=164) +### [If/else & switch](https://developer.apple.com/videos/play/wwdc2023/10164/?time=172) +These two statements can be used as **expressions** to streamline the code writing. +![](../../../../../images/iOSdev/wwdc23-10164_2.png) +
+### [Result builder](https://developer.apple.com/videos/play/wwdc2023/10164/?time=231) +![](../../../../../images/iOSdev/wwdc23-10164_3.png) +
+### [Type parameter pack](https://developer.apple.com/videos/play/wwdc2023/10164/?time=294) +**The combination of the argument length with some abstraction types** may be reached through the use of `Any` as the type information with the variadic parameters but `Swift` `5.9` highlights a new concept called the **type parameter pack** to suggest a more elegant way of coding this use case. +![](../../../../../images/iOSdev/wwdc23-10164_4.png) +To increase the generics range, it could be interesting to add some **protocol** conformances to the initial types in order to work directly with them instead of types themselves. +
+### Macros + + +
+
+ +🎬 + +![](../../../../../images/iOSdev/wwdc23-10164_5.png) +Introduced in `Swift` `5.9`, the macros `API`s use the hash syntax for creating code that **transforms syntax at compile time**. +![](../../../../../images/iOSdev/wwdc23-10164_6.png) + +They may be defined through [module importing](https://developer.apple.com/videos/play/wwdc2023/10164/?time=695) or in [separate programs](https://developer.apple.com/videos/play/wwdc2023/10164/?time=771).
+ +
+ +🎬 + +As a possible **role** to be attached to a macro, the **freestanding expression** macro that creates a piece of code returning a value is highlighted through the new [Foundation Predicate](https://developer.apple.com/videos/play/wwdc2023/10164/?time=833) APIs. + +![](../../../../../images/iOSdev/wwdc23-10164_7.png) +
+ +
+ +🎬 + +Using the same syntax as property wrappers, the goal of an **attached macro** is to add very condensed code information while authoring with the at sign. +![](../../../../../images/iOSdev/wwdc23-10164_8.png) + +[Multiple roles](https://developer.apple.com/videos/play/wwdc2023/10164/?time=953) can also be assigned to this type of macro. +![](../../../../../images/iOSdev/wwdc23-10164_9.png) +
+ +
+ +🎬 + +Composed of different macro roles, the **new Observable macro** generates a SwiftUI dependencies automation for read properties with no needed wrapper. +![](../../../../../images/iOSdev/wwdc23-10164_10.png) +For quickly reaching the code regarding a [macro expansion](https://developer.apple.com/videos/play/wwdc2023/10164/?time=1114), it'll come handy to use the **new `Xcode` `15` feature** suggested in the menu when the macro is selected. + +![](../../../../../images/iOSdev/wwdc23-10164_11.png) +
+
+
+ +![](../../../../../images/iOSdev/wwdc23-10164_12.png) +
+ +## [Dates & JSON](https://developer.apple.com/videos/play/wwdc2023/10164/?time=1192) +**Dates** calculation and formatting plus **`JSON`** handling have been improved in `Swift` `5.9`. + +![](../../../../../images/iOSdev/wwdc23-10164_13.png) +
+ +## [Ownership](https://developer.apple.com/videos/play/wwdc2023/10164/?time=1415) +This new concept introduces many enhancements **for structs and enums**: +- Remove the **copyable** default implementation if need be ⟹ 🎬 + +- Add **consuming methods** that can be played only once and that invalidate the value after the method has been run ⟹ 🎬 + +- Add a **deinit** like classes ⟹ 🎬 + + +![](../../../../../images/iOSdev/wwdc23-10164_14.png) +## [C++ interoperability](https://developer.apple.com/videos/play/wwdc2023/10164/?time=1679) + + +
+
+ +🎬 + +![](../../../../../images/iOSdev/wwdc23-10164_15.png) +
+ +
+ +🎬 + +![](../../../../../images/iOSdev/wwdc23-10164_16.png) +
+ +
+ +🎬 + +![](../../../../../images/iOSdev/wwdc23-10164_17.png) +
+
+
+
+ +## [CMake support](https://developer.apple.com/videos/play/wwdc2023/10164/?time=1894) + +`Swift` support in `CMake` has been improved in order to encompass `C++` and `Swift` within a single target. +![](../../../../../images/iOSdev/wwdc23-10164_18.png) +
+ +## [Concurrency](https://developer.apple.com/videos/play/wwdc2023/10164/?time=1960) +![](../../../../../images/iOSdev/wwdc23-10164_19.png) +
+ +### [Tasks](https://developer.apple.com/videos/play/wwdc2023/10164/?time=2020) +![](../../../../../images/iOSdev/wwdc23-10164_20.png) +
+ +### [Actors](https://developer.apple.com/videos/play/wwdc2023/10164/?time=2081) +![](../../../../../images/iOSdev/wwdc23-10164_21.png) + +The **custom actor executors** are an appropriate way to introduce a [dedicated dispatch queue](https://developer.apple.com/videos/play/wwdc2023/10164/?time=2130) for instance. + +![](../../../../../images/iOSdev/wwdc23-10164_22.png) + +This [actors synchronization](https://developer.apple.com/videos/play/wwdc2023/10164/?time=2203) comes in handy thanks to the conformance of the **SerialExecutor protocol** that include new methods in `Swift` `5.9`. +
+ +### [Foundation DB](https://developer.apple.com/videos/play/wwdc2023/10164/?time=2300) +![](../../../../../images/iOSdev/wwdc23-10164_23.png) + +
+ diff --git a/src/en/mobile/ios/wwdc/nota11y/index.md b/src/en/mobile/ios/wwdc/nota11y/index.md index cc31a214b..6178da80a 100644 --- a/src/en/mobile/ios/wwdc/nota11y/index.md +++ b/src/en/mobile/ios/wwdc/nota11y/index.md @@ -24,10 +24,11 @@ The videos that may be of interest to **designers** are highlighted with a **ded