Posted on Leave a comment

Challenge: Create an engaging tutorial

The DocC documentation compiler, available in Xcode 13, converts Markdown-based text into rich documentation for Swift frameworks and packages and displays it right in the Xcode documentation window. DocC also powers the interactive developer tutorials featured on developer.apple.com. In this challenge, we invite you to explore the tutorial functionality and design and build step-by-step instructions for an existing project you’ve created or an open source Swift package.

Begin the challenge

To get started writing a tutorial, add a Documentation Catalog to your existing project, or create a new framework project.

You’ll write your tutorial content in Markdown, and use directives to define specific types of pages and elements, like introductions, sections, steps, and assessments. Then, use the Build Documentation feature of Xcode — which runs the DocC compiler — to render your tutorial in a rich, interactive learning format.

diagram showing markdown translated to DocC tutorial format

Resources

Meet DocC documentation in Xcode

Discover how you can use DocC to build and share documentation for Swift packages and frameworks. We’ll show you how to begin generating documentation from your own code — or from third-party code you depend upon — and write and format it using Markdown. And we’ll also take you through the…

Create great documentation with DocC

Build interactive tutorials using DocC

Discover how you can author immersive tutorials from scratch with DocC. We’ll demonstrate how you can bring together rich instructions, example code, and images through the DocC syntax to showcase your Swift framework in action. And we’ll go over how to create progressive training that can…

Elevate your DocC documentation in Xcode

Great documentation can help people effectively and easily adopt your Swift framework. Discover how you can create rich, conceptual articles to accompany your API. You’ll learn best practices for writing articles, including how to structure your documentation, and find out how to create…

Visit the Apple Developer Forums

Building an Interactive Tutorial

SlothCreator: Building DocC Documentation in Xcode

Read the WWDC21 Challenges Terms and Conditions

Posted on Leave a comment

WWDC21 Daily Digest: Day 5

A Memoji staring into the screen of a MacBook Pro.

This is it! The final day of WWDC. (We can’t believe it, either.) Before we power down, however, we’ve got one more big day of events and activities for you.

Relive the week

It’s been a busy week — and we understand if you missed some of the action. Catch up quickly with our video recaps of Day 1, Day 2, Day 3, and Day 4.

Thursday@WWDC21

Wednesday@WWDC21

Tuesday@WWDC21

Monday@WWDC21

Day 5 in the WWDC pavilions

There’s still lots to explore in the pavilions. Discover how to design for Safari 15 in the Safari & Web pavilion. Learn how to practice audio haptic design in the Audio & Video pavilion. And find out how to build a research and care app in the Health & Fitness pavilion.

Design for Safari 15

Practice audio haptic design

Code-Along: Build a Research and Care app

Code-Along: Build a great Mac app in SwiftUI

Write a DSL in Swift using result builders

Explore advanced project configuration in Xcode

Create 3D workflows with USD

Accept these Friday challenges

The responses to the #WWDC21Challenges this week have been fantastic. You’ve captured 3D objects and designed SwiftUI interfaces for your apps in the style of old Apple design language. You’ve resolved pesky memory issues in code by capturing flags, and designed and created ShazamKit companion apps.

Developer Laurence Moroney built an app for the “Build an app using built-in Sound Classification” challenge that takes the built-in sound classes and renders them as emoji.

Developer Laurence Moroney built an app for the “Build an app using built-in Sound Classification” challenge that takes the built-in sound classes and renders them as emoji.

We’re wowed by the things you’ve created — and now, it’s the last day to show off your skills.

Explore #WWDC21Challenges on social media

Explore spatial audio soundscapes and learn how to craft compelling stories with multichannel audio. Build a prototype in SwiftUI. And solve a pitch-black maze entirely using VoiceOver.

Challenge: Prototype with SwiftUI

Challenge: Explore spatial audio soundscapes

Challenge: VoiceOver Maze

Drop in on the Digital Lounges

The WWDC21 Digital Lounges have been so much fun, but it’s almost time to say goodbye. The lounges will close at 5 p.m. PDT on Friday, but there’s still time to stop by SwiftUI Office Hours, meet the presenters in the Machine Learning lounge, and connect with the developer tools and accessibility teams. Don’t be shy — if you haven’t stopped by the Digital Lounges yet, we’d love to meet you still.

Explore the Accessibility Digital Lounge

Explore the Developer Tools Digital Lounge

Explore the Machine Learning Digital Lounge

Explore the SwiftUI Digital Lounge

Spotlight on accessibility

How do you approach creating apps for everyone? Learn from developers who are blind or deaf themselves as they discuss the process of making technology accessible. Discover how their unique perspectives have sparked innovation at their companies and helped make their apps even more inclusive.

Developer spotlight: Accessibility

Join our final Mindful Cooldown for Coding

There’s been so much excitement this week: At 3 p.m. PDT, wind down with one final Mindful Cooldown for Coding from our friends at Fitness+.

And that’s a wrap! Thank you for spending your week with us, watching sessions, participating in our Digital Lounges, asking questions in the Developer Forums and 1-to-1 labs, trying daily challenges, and having fun.

And remember: While WWDC21 may be over, our session and labs content will be available all year round in the Developer app for you to consult when you’re ready to start working on the next thing.

Posted on Leave a comment

Challenge: VoiceOver Maze

Speak bubble symbol with a pointing arrow location symbol inside

Can you escape from Castle Park using only VoiceOver? Challenge yourself to solve this puzzle while getting familiar with VoiceOver, an assistive technology for people who are blind and low-vision. VoiceOver is a screen reader that allows people who are blind and low-vision to completely operate Apple’s products. On iOS, people can touch and swipe on the screen in order to navigate items, with each item’s name and status spoken aloud using synthesized speech.

In this challenge, we invite you to escape the maze of Castle Park. But there’s a catch: There is no visual interface in this iOS app! You must rely completely on VoiceOver to navigate the maze and escape.

How to enable VoiceOver

You have a few options to enable or disable VoiceOver.

  • You can ask Siri to turn VoiceOver on or off for you at anytime.
  • You can use the Accessibility Shortcut in Settings > Accessibility and set the shortcut to VoiceOver. Now, when you triple click the side button (or Home button, depending on your device), you can quickly turn VoiceOver on or off.

Begin the challenge

To start this accessibility challenge, download the Xcode project linked below and run it on iPhone or iPad. Use VoiceOver to explore the app and make decisions to help you escape.

Tip:
Once you’ve enabled VoiceOver, there are three main gestures to help you navigate:

  • Touch to speak
  • Swipe left or right to move previous or next
  • Double-tap to activate

And once you complete this challenge, consider exploring how your own app behaves with VoiceOver. How can you make it better for people who rely on a screen reader to interact with their device?

SwiftUI Accessibility: Beyond the basics

Go beyond the basics to deliver an exceptional accessibility experience. Learn how to use the new SwiftUI Previews in Xcode to explore the latest accessibility APIs and create fantastic, accessible apps for everyone. Find out how you can customize the automatic accessibility built into SwiftUI to…

Tailor the VoiceOver experience in your data-rich apps

Learn how to present complex data through VoiceOver with the Accessibility Custom Content API. Discover how you can deliver accessibility information in a concise form, and only when someone wants it. We’ll show you how you can integrate AXCustomContent and help people who want VoiceOver enabled…

VoiceOver: App Testing Beyond The Visuals

VoiceOver provides spoken descriptions and braille output of onscreen elements. Learn how to go beyond the visuals to identify VoiceOver and functional issues to help improve the experience for all users.

Resources

WWDC21 Challenge: VoiceOver Maze

Enhance the VoiceOver experience in your app

Read the WWDC21 Challenges Terms and Conditions

Posted on Leave a comment

Challenge: Prototype with SwiftUI

Swiftui icon on blue background

While SwiftUI is a powerful framework, one of its key features is its simplicity. Designers with very little knowledge of code can easily create prototypes with human-readable syntax and interactive Xcode Previews. In this challenge, we invite you to say “hello, world” with a brilliant SwiftUI-based prototype.

Begin the challenge

What’s an app you’d love to build right now? Take charge of SwiftUI and Xcode Previews and turn that idea into a prototype: Explore what interfaces you can create with Xcode Preview, and let the tools write the code for you. (And pick up a little SwiftUI code knowledge along the way.)

Start fresh with a new Xcode project, or explore prototyping a new view in SwiftUI for your existing app. Need support, or want help from the community in prototyping? You can share prototyping projects in progress on the Developer Forums. Already working on a prototype in UIKit or AppKit? Explore creating a new view in SwiftUI.

Visit the Apple Developer Forums

Share your new SwiftUI views with us over the summer. We can’t wait to see what you can build with SwiftUI and Xcode Previews, and to hear about what you learn!

Resources

Code-Along: Build a great Mac app in SwiftUI

  • WWDC20

Introduction to SwiftUI

Explore the world of declarative-style programming: Discover how to build a fully-functioning SwiftUI app from scratch as we explain the benefits of writing declarative code and how SwiftUI and Xcode can combine forces to help you build great apps, faster.

Introducing SwiftUI

Read the WWDC21 Challenges Terms and Conditions

Posted on Leave a comment

Challenge: Explore spatial audio soundscapes

Person SF Symbol surrounded by speaker SF Symbols on a blue-green textured background

When you support multichannel audio in your app, game, or audiovisual content, you can add dimensionality to your storytelling, transport listeners out of a conventional audio experience, and bring people further into the worlds you’re creating. In this challenge, we invite you to explore a soundscape in intentional stereo, stereo spatialization, and multichannel formats, consider the differences between each, and brainstorm how spatial audio could enhance your own stories.

Begin the challenge

In the demo for “Immerse your app in spatial audio,” the presenter, Simon, has his spatial audio demonstration video ‘fail’ on him. After a few moments of panic and quick thinking, he decides he’s going to describe the events of this failed video — and as he does, those events begin to come to life. In each scene, different audio techniques create a fully-imagined environment for the audience to inhabit, drawing them into Simon’s described world.

Immerse your app in spatial audio

Discover how spatial audio can help you provide a theater-like experience for media in your apps and on the web. We’ll show you how you can easily bring immersive audio to those listening with compatible hardware, and how to automatically deliver different listening experiences depending on…

For this challenge, we’re inviting you to explore this demo and listen to the differences as you move between intentional stereo, spatialized stereo, and multichannel formats. You’ll need a pair of spatial audio-compatible accessories, like AirPods Pro, as well as a device running iOS 14 or macOS Big Sur. To explore the spatialized stereo format, you’ll need a device running iOS 15 or macOS Monterey. As you listen, consider how each version of the experience feels different.

Listen to the demo in intentional stereo
Watch the session on iOS 14 or macOS Big Sur in the Developer app or on developer.apple.com. You’ll hear this demo delivered in stereo, with visual cues on screen indicating the full surround experience.

What do you notice, listening to this experience? How does the audio shift and change as we move through each of Simon’s soundscapes?

Listen to the demo for “Immerse your app in spatial audio” in the Developer app

Listen to the demo in spatialized stereo
To hear the spatialized stereo version of “Immerse your app in spatial audio,” watch this demo on a device running the iOS 15 or macOS Monterey developer betas.

How does this change the experience for the listener compared to the intentional stereo version? Are there sounds or moments you find yourself noticing that you haven’t before?

Listen to the demo for “Immerse your app in spatial audio” in the Developer app

Listen to the demo in multichannel
You can stream a full multichannel mix of this demo in spatial audio on either iOS 14 or iOS 15 using the link below.

As you listen to this multichannel mix, divide the world into three distances: Background, foreground, and personal space. Think about where the sounds are coming from. What do these different distances and orientations add to the experience? How does the positioning of sound further enhance this story?

Listen to the demo for “Immerse your app in spatial audio” in multichannel audio

Now, think about a moment from your app, game or audiovisual content. How does the audio currently sound in this moment? How can you improve that experience by bringing distance and orientation into your soundscape? Where could supporting multichannel and spatial audio help draw people into your story?

Spatialize your experiences
With more support for spatial audio experiences coming with iOS 15 and macOS Monterey later this year, now is a great time to consider how you currently approach telling stories through audio. Listen to your stereo experiences on the developer betas and listen to how they change when played back in spatialize stereo. Consider how you can augment those existing moments by creating multichannel mixes. And explore what kinds of entirely new experiences you can provide listeners with spatial audio. For game designers, we also recommend watching “Discover geometry-aware audio with the Physical Audio Spatialization Engine (PHASE)” to learn about new ways you can create spatial audio experiences that adapt to the environment of your game.


Note: if you’re curious about experimenting further with multichannel, you can try creating a multichannel audio experience of your own by exploring the binaural and surround mixing tools in digital audio workstations (DAWs) like Logic Pro X. (To properly mix and play back your audio in surround, however, you’ll need a multichannel speaker setup.)


Want to share your thoughts on this demo, or how you’d adapt your existing experiences for spatial audio? Head over to the Developer Forums.

Visit the Apple Developer Forums

Resources

Immerse your app in spatial audio

Discover how spatial audio can help you provide a theater-like experience for media in your apps and on the web. We’ll show you how you can easily bring immersive audio to those listening with compatible hardware, and how to automatically deliver different listening experiences depending on…

Discover geometry-aware audio with the Physical Audio Spatialization Engine (PHASE)

Explore how geometry-aware audio can help you build complex, interactive, and immersive audio scenes for your apps and games. Meet PHASE, Apple’s spatial audio API, and learn how the Physical Audio Spatialization Engine (PHASE) keeps the sound aligned with your experience at all times — helping…

Read the WWDC21 Challenges Terms and Conditions

Posted on Leave a comment

Challenge: Achievement Unlocked — Series Finale

Achievement symbol with an achievement icon that looks like a star in a circle.

When you create achievements that truly surprise and delight your players as they make their way through a game, you can help elicit a feeling of accomplishment, or even make the player laugh. Most of us have experienced playing games where we have unlocked some kind of achievement or trophy that stirs some of these emotions. This is exactly what we want you to consider when you create Game Center achievements for your apps or games — and now, we’re challenging you to show the developer community your best, funniest, strangest, and most delightful achievements.

Begin the challenge

This achievements challenge focuses on sequencing achievements to encourage people to complete a specific set of tasks. Progress-based achievements are the most common types of rewards players can earn, and coupling some of them together can help create an even stronger narrative within your app or game.

Whether your game is divided into chapters, levels, or some other way, today’s challenge is to create a series of at least 2-3 achievements that break up the narrative in a unique and interesting way. Think about how you might add titles and descriptions in both the locked and unlocked versions of the achievement that indicate to the player these are connected together and need to be unlocked in that specific order. (And as always, bonus points for puns and amazing alliteration.)

We welcome all achievements, new, old, existing, or imaginary: Show off your “Series Finale” achievements from one of your existing apps or games, or put your wordsmithery to work and create an entirely new set of achievements. You can share these with the developer community on the Developer Forums.

Best of all, we’ve made it easy for you to participate and dream up awesome achievements even if you haven’t yet implemented Game Center or you want to try writing something entirely new: Just download the attached Game Center achievement template.

Visit the Apple Developer Forums

Best practices for great achievements

It’s a lot of fun to create unique and engaging achievements to connect people with your app or game. Below are a few of our recommendations when thinking about writing and designing achievements.

Be creative with an achievement’s title, but straightforward with its description
Although most people appreciate entertaining titles, they expect an achievement’s description to specify how to earn it. If you were to create a WWDC21 achievement, for instance, you might write the following:

Title: Code Completionist
Description: Watched every WWDC21 Code-Along session.

Be succinct
The Game Center achievement card limits your title and description to two lines each before truncating the text — brevity is key to a great achievement.

Think inclusively
Follow the Human Interface Guidelines around inclusivity when creating achievements. The best jokes, puns, and wordplay are those that are intuitive and friendly to everyone who might interact with your app or game, and make players feel recognized and rewarded.

Add unique, high-quality images
People appreciate earning unique achievements that remind them of each accomplishment. When you create custom artwork, you can help that achievement stand out from the others in your app or game and make it more recognizable to people who interact with it.

You can learn more about how to design great achievements in Apple’s Human Interface Guidelines, and in the WWDC20 session “Design for Game Center.”

Design for Game Center

Get your game’s interface ready for Game Center. We’ll show you how to deliver personalized touches to the GameKit interface that provide a rich experience for players, with features like achievements, leaderboards, and multiplayer gaming. Learn how to customize your game’s access point, design…

Download the Achievement Unlocked Challenge material

Learn more about designing achievements

Read the WWDC21 Challenges Terms and Conditions

Posted on Leave a comment

Challenge: Focus on Focus APIs in SwiftUI

Image showing three text fields with one in focus

With device input — as with all things in life — where you put your focus matters. Focus can help people move through your app, whether they’re using the keyboard, Siri Remote, Apple Watch Digital Crown, or accessibility features — and you can make that experience even better with SwiftUI’s Focus APIs.

Begin the challenge

Our challenge to you: Find a part of your app where you can use the SwiftUI Focus APIs to fine-tune that interaction. That could include testing a great new tvOS implementation, polishing keyboard-driven navigation, or crafting a great accessibility experience.

Need support, or want help from the community as you explore the Focus APIs? You can share your progress in the Developer Forums.

Visit the Apple Developer Forums

Resources

Direct and reflect focus in SwiftUI

With device input — as with all things in life — where you put focus matters. Discover how you can move focus in your app with SwiftUI, programmatically dismiss the keyboard, and build large navigation targets from small views. Together, these APIs can help you simplify your app’s interface…

SwiftUI Accessibility: Beyond the basics

Go beyond the basics to deliver an exceptional accessibility experience. Learn how to use the new SwiftUI Previews in Xcode to explore the latest accessibility APIs and create fantastic, accessible apps for everyone. Find out how you can customize the automatic accessibility built into SwiftUI to…

Read the WWDC21 Challenges Terms and Conditions

Posted on Leave a comment

Challenge: Memgraph Capture the Flag

Flag symbol on grey background

In the “Detect and diagnose memory issues” session at WWDC21, we explored how debugging memory problems can help improve your app’s performance, while “Symbolication: Beyond the basics” showcased debug symbols and how symbolication helps us connect the dots during code debugging. Now, it’s time to put those new skills to work.

If you like solving puzzles, you’re in the right place. One of our engineers has hidden a memory easter egg in our secret app. We’re trying to track it down but all we know is that it has format flag_<unknown_string_here>@WWDC. You’ll have to use the command line tools offered by macOS to investigate the memory issue, recover missing symbols, and and capture the rogue flag.

Begin the challenge

To get started, download the challenge .zip attached to this article and unzip the folder. We also have a message from our engineer to get you on the right track: “Memgraph is a special binary plist. What can you find in its properties?”

Download the Memgraph Capture the Flag Challenge material

And once you’ve explored the challenge, check out one solution to find the flag.

Challenge: Solution to “Memgraph Capture The Flag”

The “Memgraph Capture the Flag” challenge invites you to learn and practice memory debugging and symbolication with command line tools. If you haven’t yet attempted the challenge or otherwise don’t want to be spoiled on the necessary steps to complete it, we recommend returning to the…

You can solve these kinds of puzzles and track down memory issues in your own app, too. Try creating reference cycles in your app, saving a memgraph, and tracing them back to your source code. And for more debugging details, check out the WWDC21 sessions below.

Resources

Symbolication: Beyond the basics

Discover how you can achieve maximum performance and insightful debugging with your app. Symbolication is at the center of tools such as Instruments and LLDB to help bridge the layers between your application’s runtime and your source code. Learn how this process works and the steps you can take…

Detect and diagnose memory issues

Discover how you can understand and diagnose memory performance problems with Xcode. We’ll take you through the latest updates to Xcode’s tools, explore Metrics, check out the memgraph collection feature in XCTest, and learn how to catch regressions using a Performance XCTest.

Read the WWDC21 Challenges Terms and Conditions

Posted on Leave a comment

Challenge: Create amazing documentation

Swift packages icon of brown box with swift icon on it

Explore Xcode’s new documentation features and learn how to add documentation to your own framework or package — or to your favorite open source project. For this challenge, we’re asking you to create documentation for your own framework or package (or your favorite open source project). Use Xcode 13 to build documentation from the header comments in your Swift framework, and add a Documentation Catalog to organize your content.

Begin the challenge

Open up your project in Xcode, and start adding documentation comments in your source by using Swift DocC markdown syntax. DocC uses the comments you write in your source code as the content for the documentation pages it generates. At a minimum, add basic documentation comments to the framework’s public symbols for DocC to use as their single-sentence abstracts or summaries. Here’s an example:

 public struct Sloth { public var species: Species

Once you’ve finished your documentation, select Product > Build Documentation to generate your source docs for Quick Help and the Developer Documentation window.

Xcode documentation window displaying information about sloths

Need help writing or constructing your documentation? You can share your progress on the Developer Forums.

Visit the Apple Developer Forums

Resources

Read the WWDC21 Challenges Terms and Conditions

Posted on Leave a comment

Challenge: Voice Control Synonyms

Icon of speech bubble with question mark in it on purple background

Challenge yourself to make your app accessible through Voice Control and provide support for voice-based interaction. Voice Control is a feature built into iOS, iPadOS, and macOS, and empowers those who can’t use traditional input devices to control their Mac, iPhone, and iPad entirely with their voices. For people with motor limitations, having full voice control of their devices is truly transformative. People can gesture with their voices to click, swipe, and tap anywhere — they can do everything someone could do with a mouse or with touch. On iOS and iPadOS, Voice Control has the additional option to show Item Names, which place a name next to each tappable item. In this challenge, we’ll be making the “Show Names” experience better.

Voice Control in Podcasts on iOS: “Show names.”

Suppose that you create a button that looks like a paper airplane. What do you say to tap? “Tap send”? “Tap reply”? “Tap airplane”? In UIKit you can use the accessibilityUserInputLabels string array to respond to these prompts, while in SwiftUI you’d use the .accessibilityInputLabels modifier.

How to enable Voice Control

To use Voice Control, go to Settings > Accessibility > Voice Control. If it’s your first time enabling this setting, you’ll be asked to Set Up Voice Control and download a short file.

Once Voice Control has been set up, you can enable it in a few different ways:

  • You can ask Siri to turn Voice Control on or off for you at anytime.
  • You can use the Accessibility Shortcut in Settings > Accessibility and set the shortcut to Voice Control. Now, when you triple click the side button (or Home button, depending on your device), you can quickly turn Voice Control on or off.

Use Voice Control to interact with iPhone

Begin the challenge

We’re challenging you to make your app’s UI as easy to navigate by voice as possible and improve the Voice Control experience in your app. Start by turning on Voice Control by visiting Settings > Accessibility > Voice Control, and enable Overlay > Show Names.

Next, take a screenshot of your interface with the “Show names” overlay displaying on top of it. Explore what it’s like to navigate your app by Voice Control alone. What experience are you giving people right now? Are you struggling with any common tasks? How could you make it better?

Once you’ve spent some time with your app in Voice Control mode, it’s time to make some improvements. Here are a few tweaks you can make to your code to make your experience better for everyone.

Explore accessibilityInputLabels
First, you can implement accessibilityInputLabels to create short, concise labels that someone could easily speak by voice.

Button(action: { sendMessage = true
}) { Image(systemName: "paperplane") .font(.title) .accessibilityInputLabels(["send", "reply", "airplane"])
}

Tips:

  • Your primary string is the first string in the array, and will be the one that Voice Control shows on screen.
  • Brevity is key: use short, succinct words.
  • Localize your strings using NSLocalizedString and avoid special symbols in your labels.
  • When it comes to number of synonyms, add them judiciously. Limit the number of possible strings to a max of 4, as to not overload the recognition system.

You may have multiple elements in your UI that could be described the same way: One example is an image browser, where each image might be described as “Screenshot”. You can rely on Voice Control’s disambiguation feature in these cases to keep your label names short. When someone says “Screenshot”, a list of numbers will appear over all elements named “Screenshot” for someone to choose from.

Two screenshots with voice control labels, showing Voice Control’s disambiguation feature

Shorten label names
If your app already incorporates accessibilityLabel, you’ve done a lot of the work already — but your labels may be too long to speak! You can take advantage of accessibilityUserInputLabels (or, in SwiftUI, .accessibilityInputLabels) to keep the speakable label short, while leaving the valuable information your current accessibilityLabel conveys to an audience that relies on it.

two views with voice control labels shown, comparing “birthday plans edited 4 days ago” versus “birthday plans”

Share your experiences
As you add support for Voice Control to your app, share your implementation with the developer community. After you’ve made changes or improvements to your app, take another screenshot of your UI with the “Show names” overlay enabled. Share “before” and “after” screenshots on the Developer Forums. (And don’t forget to add alt text to your screenshot images on platforms that support it!)

Resources

Visit the Apple Developer Forums

Voice Control

accessibilityUserInputLabels

accessibilityInputLabels(_:)

Read the WWDC21 Challenges Terms and Conditions