Skip to content

Commit

Permalink
-iOS: new WWDC23 video {'Prototype with Xcode Playgrounds'}.
Browse files Browse the repository at this point in the history
  • Loading branch information
XLE22 committed Jan 4, 2024
1 parent 3372482 commit 62eab88
Show file tree
Hide file tree
Showing 20 changed files with 285 additions and 14 deletions.
13 changes: 12 additions & 1 deletion src/assets/json/en/ios/wwdc/ios-wwdc-listnota11y.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"resultat": [],
"exception": "",
"raccourcis": "",
"profils": ["All","Accessibility","Dark Mode","Debugging","DocC","Formatting","Instruments","Keyboard","Keynote","Localization","Optimization","Platforms State...","Regex","Shortcuts","Swift","Swift Playgrounds","SwiftUI","What's new in...","Xcode"]
"profils": ["All","Accessibility","Dark Mode","Debugging","DocC","Formatting","Instruments","Keyboard","Keynote","Localization","Optimization","Platforms State...","Regex","Shortcuts","Swift","Swift Playgrounds","SwiftUI","What's new in...","Xcode","Xcode Playgrounds"]
},
{
"themes": "WWDC 2023",
Expand Down Expand Up @@ -153,6 +153,17 @@
"raccourcis": "2023/23PlatformsSotU",
"profils": ["All","Accessibility","Platforms State...","Swift","SwiftUI","Xcode"]
},
{
"themes": "WWDC 2023",
"title": "Prototype with Xcode Playgrounds",
"type": [],
"tests": [],
"verifier": [],
"resultat": [],
"exception": "",
"raccourcis": "2023/2310250",
"profils": ["All","Xcode Playgrounds"]
},
{
"themes": "WWDC 2023",
"title": "Unleash the UIKit trait system",
Expand Down
Binary file added src/en/mobile/images/iOSdev/wwdc23-10250_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/en/mobile/images/iOSdev/wwdc23-10250_10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/en/mobile/images/iOSdev/wwdc23-10250_11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/en/mobile/images/iOSdev/wwdc23-10250_12.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/en/mobile/images/iOSdev/wwdc23-10250_13.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/en/mobile/images/iOSdev/wwdc23-10250_14.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/en/mobile/images/iOSdev/wwdc23-10250_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/en/mobile/images/iOSdev/wwdc23-10250_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/en/mobile/images/iOSdev/wwdc23-10250_4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/en/mobile/images/iOSdev/wwdc23-10250_5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/en/mobile/images/iOSdev/wwdc23-10250_6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/en/mobile/images/iOSdev/wwdc23-10250_7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/en/mobile/images/iOSdev/wwdc23-10250_8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/en/mobile/images/iOSdev/wwdc23-10250_9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
259 changes: 259 additions & 0 deletions src/en/mobile/ios/wwdc/nota11y/2023/2310250.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,259 @@
---
title : "Prototype with Xcode Playgrounds"
abstract: "Speed up feature development by prototyping new code with Xcode Playgrounds."

displayToc: true
---

# WWDC 2023: Prototype with Xcode Playgrounds
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 10250](https://developer.apple.com/videos/play/wwdc2023/10250/)).

![](../../../../../images/iOSdev/wwdc23-10250_Poster.png)

"**Speed up** feature development by **prototyping new code** with Xcode Playgrounds, eliminating the need to keep rebuilding and relaunching your project to verify your changes. We'll show you how **using a playground in your project** or package can help you try out your code in various scenarios and take a close look at the returned values, including **complex structures and user interface elements**, so you can quickly iterate on a feature before integrating it into your project."

</br>Hereafter, the underlined elements **lead directly to the playback of the WWDC video** at the appropriate moment.
</br>

## Overview
The entire presentation is based on a [basic&nbsp;app](https://developer.apple.com/videos/play/wwdc2023/10250/?time=75) that will be enhanced to achieve specific goals and become [much&nbsp;more&nbsp;efficient](#finalApp).

![](../../../../../images/iOSdev/wwdc23-10250_AppStarter.png)
A playground is an **interactive environment** in which code can be written and executed while real-time results are displayed nearby.</br>
The **Xcode Playgrounds** [streamline&nbsp;the&nbsp;code&nbsp;writing](https://developer.apple.com/videos/play/wwdc2023/10250/?time=124) and save time through skipping a project rebuild and relaunch while easily testing some code snippets.

**Starting** a new `Xcode` playground is [quite&nbsp;easy](https://developer.apple.com/videos/play/wwdc2023/10250/?time=160) with its **running** [speed&nbsp;up](https://developer.apple.com/videos/play/wwdc2023/10250/?time=195) and its [defaults&nbsp;settings](https://developer.apple.com/videos/play/wwdc2023/10250/?time=216).

![](../../../../../images/iOSdev/wwdc23-10250_2.png)

</br>

## [Type&nbsp;information](https://developer.apple.com/videos/play/wwdc2023/10250/?time=267)
New in `Xcode 15`, a brief detail of each row is highlighted through the inline result item.

![](../../../../../images/iOSdev/wwdc23-10250_3.png)

</br>

## [Source&nbsp;code](https://developer.apple.com/videos/play/wwdc2023/10250/?time=317)
`Xcode 15` points out the source code that produces the displayed result.
![](../../../../../images/iOSdev/wwdc23-10250_4.png)

</br>

## Protocols
<ul class="nav nav-tabs" role="tablist">
<li class="nav-item" role="presentation">
<a class="nav-link active"
data-bs-toggle="tab"
href="#XcodePlaygroundsProtocols1"
id="XcodePlaygroundsProtocols1_tab"
role="tab"
aria-selected="true">Custom&nbsp;string&nbsp;protocol</a>
</li>
<li class="nav-item" role="presentation">
<a class="nav-link"
data-bs-toggle="tab"
href="#XcodePlaygroundsProtocols2"
id="XcodePlaygroundsProtocols2_tab"
role="tab"
aria-selected="false">Custom&nbsp;display&nbsp;protocol</a>
</li>
</ul>

<div class="tab-content">
<div class="tab-pane show active" id="XcodePlaygroundsProtocols1" role="tabpanel">

<a alt="Click to playback the footage at the appropriate moment regarding the custom string protocol" href="https://developer.apple.com/videos/play/wwdc2023/10250/?time=337">🎬</a>

Instead of having elements with empty labels, a **description can be added** thanks to the **CustomStringConvertible** protocol.
![](../../../../../images/iOSdev/wwdc23-10250_5.png)
</div>

<div class="tab-pane" id="XcodePlaygroundsProtocols2" role="tabpanel">

<a alt="Click to playback the footage at the appropriate moment regarding the custom display protocol" href="https://developer.apple.com/videos/play/wwdc2023/10250/?time=434">🎬</a>

The **CustomPlaygroundDisplayConvertible** protocol is the best way to show an element description dedicated to the **playground representation**.

![](../../../../../images/iOSdev/wwdc23-10250_6.png)
</div>
</div>
</br>
</br>

## [Filters](https://developer.apple.com/videos/play/wwdc2023/10250/?time=571)
<ul class="nav nav-tabs" role="tablist">
<li class="nav-item" role="presentation">
<a class="nav-link active"
data-bs-toggle="tab"
href="#XcodePlaygroundsFilters1"
id="XcodePlaygroundsFilters1_tab"
role="tab"
aria-selected="true">Hovering</a>
</li>
<li class="nav-item" role="presentation">
<a class="nav-link"
data-bs-toggle="tab"
href="#XcodePlaygroundsFilters2"
id="XcodePlaygroundsFilters2_tab"
role="tab"
aria-selected="false">User&nbsp;interface</a>
</li>
<li class="nav-item" role="presentation">
<a class="nav-link"
data-bs-toggle="tab"
href="#XcodePlaygroundsFilters3"
id="XcodePlaygroundsFilters3_tab"
role="tab"
aria-selected="false">String&nbsp;catalog</a>
</li>
</ul>

<div class="tab-content">
<div class="tab-pane show active" id="XcodePlaygroundsFilters1" role="tabpanel">

<a alt="Click to playback the footage at the appropriate moment regarding the hovering" href="https://developer.apple.com/videos/play/wwdc2023/10250/?time=604">🎬</a>

Hovering over the different inline results will toggle some highlight in their source code ranges.

![](../../../../../images/iOSdev/wwdc23-10250_7.png)
</div>

<div class="tab-pane" id="XcodePlaygroundsFilters2" role="tabpanel">

<a alt="Click to playback the footage at the appropriate moment regarding the user interface" href="https://developer.apple.com/videos/play/wwdc2023/10250/?time=647">🎬</a>

New in `Xcode 15`, the user interface provides a **split view** to improve the display of the history values.

![](../../../../../images/iOSdev/wwdc23-10250_8.png)
</div>

<div class="tab-pane" id="XcodePlaygroundsFilters3" role="tabpanel">

<a alt="Click to playback the footage at the appropriate moment regarding the string catalog" href="https://developer.apple.com/videos/play/wwdc2023/10250/?time=726">🎬</a>

The new string catalog is also an efficient way to offer a reliable solution for some specific downsides.

![](../../../../../images/iOSdev/wwdc23-10250_9.png)
</div>
</div>
</br>
</br>

## Maps
Using an `Xcode` playground for maps requires some cautions for a better experience:

1. When retrieving documentation, providing code examples that can be easily used in a playground is a great way to save time.

2. In order to avoid needless calls, it might be interesting to activate the **manual mode** of playground execution.

3. The **source editor gutter** points out the lines to be executed.

4. Using the playgrounds **live view** involves some mandatory items to be applied.

5. The **eye icon in the sidebar** might be of a great help regarding a map view troubleshooting.

6. Activate the `Live View` through the `Editor Options`.

</br>

<ul class="nav nav-tabs" role="tablist">
<li class="nav-item" role="presentation">
<a class="nav-link active"
data-bs-toggle="tab"
href="#XcodePlaygroundsMaps1"
id="XcodePlaygroundsMaps1_tab"
role="tab"
aria-selected="true">1</a>
</li>
<li class="nav-item" role="presentation">
<a class="nav-link"
data-bs-toggle="tab"
href="#XcodePlaygroundsMaps2"
id="XcodePlaygroundsMaps2_tab"
role="tab"
aria-selected="false">2</a>
</li>
<li class="nav-item" role="presentation">
<a class="nav-link"
data-bs-toggle="tab"
href="#XcodePlaygroundsMaps3"
id="XcodePlaygroundsMaps3_tab"
role="tab"
aria-selected="false">3</a>
</li>
<li class="nav-item" role="presentation">
<a class="nav-link"
data-bs-toggle="tab"
href="#XcodePlaygroundsMaps4"
id="XcodePlaygroundsMaps4_tab"
role="tab"
aria-selected="false">4</a>
</li>
<li class="nav-item" role="presentation">
<a class="nav-link"
data-bs-toggle="tab"
href="#XcodePlaygroundsMaps5"
id="XcodePlaygroundsMaps5_tab"
role="tab"
aria-selected="false">5</a>
</li>
<li class="nav-item" role="presentation">
<a class="nav-link"
data-bs-toggle="tab"
href="#XcodePlaygroundsMaps6"
id="XcodePlaygroundsMaps6_tab"
role="tab"
aria-selected="false">6</a>
</li>
</ul>

<div class="tab-content">
<div class="tab-pane show active" id="XcodePlaygroundsMaps1" role="tabpanel">

<a alt="Click to playback the footage at the appropriate moment regarding the third party element" href="https://developer.apple.com/videos/play/wwdc2023/10250/?time=897">🎬</a>

![](../../../../../images/iOSdev/wwdc23-10250_10.png)
</div>

<div class="tab-pane" id="XcodePlaygroundsMaps2" role="tabpanel">

<a alt="Click to playback the footage at the appropriate moment regarding the manual mode of playground execution" href="https://developer.apple.com/videos/play/wwdc2023/10250/?time=1013">🎬</a>
![](../../../../../images/iOSdev/wwdc23-10250_1.png)
</div>

<div class="tab-pane" id="XcodePlaygroundsMaps3" role="tabpanel">

<a alt="Click to playback the footage at the appropriate moment regarding the source editor gutter" href="https://developer.apple.com/videos/play/wwdc2023/10250/?time=1053">🎬</a>
![](../../../../../images/iOSdev/wwdc23-10250_14.png)
</div>

<div class="tab-pane" id="XcodePlaygroundsMaps4" role="tabpanel">

<a alt="Click to playback the footage at the appropriate moment regarding the playground live view" href="https://developer.apple.com/videos/play/wwdc2023/10250/?time=1105">🎬</a>
![](../../../../../images/iOSdev/wwdc23-10250_13.png)
</div>

<div class="tab-pane" id="XcodePlaygroundsMaps5" role="tabpanel">

<a alt="Click to playback the footage at the appropriate moment regarding the eye icon shortcut" href="https://developer.apple.com/videos/play/wwdc2023/10250/?time=1163">🎬</a>
![](../../../../../images/iOSdev/wwdc23-10250_11.png)
</div>

<div class="tab-pane" id="XcodePlaygroundsMaps6" role="tabpanel">

<a alt="Click to playback the footage at the appropriate moment regarding the live view in the editor options" href="https://developer.apple.com/videos/play/wwdc2023/10250/?time=1297">🎬</a>
![](../../../../../images/iOSdev/wwdc23-10250_12.png)
</div>
</div>
</br>
</br>

Following the preceding logic results in the [final&nbsp;app](https://developer.apple.com/videos/play/wwdc2023/10250/?time=1380) with efficient code writing made possible by the `Xcode Playgrounds`.

<a name="finalApp"></a>

![](../../../../../images/iOSdev/wwdc23-10250_AppFinal.png)
27 changes: 14 additions & 13 deletions src/en/mobile/ios/wwdc/nota11y/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,20 @@ The videos that may be of interest to **designers** are highlighted with a **ded

<section class="visually-hidden" id="wwdcTests" aria-hidden="true">
<h2 id="hhwwdc2023" class="pt-5">WWDC 2023</h2>
<p id="hwwdc79">WWDC 2023 Bring widgets to life</p>
<p id="hwwdc78">WWDC 2023 Bring widgets to new places</p>
<p id="hwwdc77">WWDC 2023 Build accessible apps with SwiftUI and UIKit</p>
<p id="hwwdc76">WWDC 2023 Build programmatic UI with Xcode Previews</p>
<p id="hwwdc75">WWDC 2023 Design dynamic Live Activities</p>
<p id="hwwdc74">WWDC 2023 Expand on Swift macros</p>
<p id="hwwdc73">WWDC 2023 Explore pie charts and interactivity in Swift Charts</p>
<p id="hwwdc72">WWDC 2023 Generalize APIs with parameter packs</p>
<p id="hwwdc71">WWDC 2023 Keynote</p>
<p id="hwwdc70">WWDC 2023 Make features discoverable with TipKit</p>
<p id="hwwdc69">WWDC 2023 Meet ActivityKit</p>
<p id="hwwdc68">WWDC 2023 Perform accessibility audits for your app</p>
<p id="hwwdc67">WWDC 2023 Platforms State of the Union</p>
<p id="hwwdc80">WWDC 2023 Bring widgets to life</p>
<p id="hwwdc79">WWDC 2023 Bring widgets to new places</p>
<p id="hwwdc78">WWDC 2023 Build accessible apps with SwiftUI and UIKit</p>
<p id="hwwdc77">WWDC 2023 Build programmatic UI with Xcode Previews</p>
<p id="hwwdc76">WWDC 2023 Design dynamic Live Activities</p>
<p id="hwwdc75">WWDC 2023 Expand on Swift macros</p>
<p id="hwwdc74">WWDC 2023 Explore pie charts and interactivity in Swift Charts</p>
<p id="hwwdc73">WWDC 2023 Generalize APIs with parameter packs</p>
<p id="hwwdc72">WWDC 2023 Keynote</p>
<p id="hwwdc71">WWDC 2023 Make features discoverable with TipKit</p>
<p id="hwwdc70">WWDC 2023 Meet ActivityKit</p>
<p id="hwwdc69">WWDC 2023 Perform accessibility audits for your app</p>
<p id="hwwdc68">WWDC 2023 Platforms State of the Union</p>
<p id="hwwdc67">WWDC 2023 Prototype with Xcode Playgrounds</p>
<p id="hwwdc66">WWDC 2023 Unleash the UIKit trait system</p>
<p id="hwwdc65">WWDC 2023 Update Live Activities with push notifications</p>
<p id="hwwdc64">WWDC 2023 What’s new in SF Symbols 5</p>
Expand Down

0 comments on commit 62eab88

Please sign in to comment.