Posted on Leave a comment

Further updates on StoreKit External Entitlement for dating apps in the Netherlands storefront

Following productive conversations with the Netherlands Authority for Consumers and Markets (ACM), today we’re introducing additional adjustments to Apple’s plan to comply with the regulator’s order pertaining to dating apps on the App Store in the Netherlands:

  • Developers of dating apps in the Netherlands can use the StoreKit External Purchase Entitlement, the StoreKit External Purchase Link Entitlement, or both entitlements.

  • In accordance with the ACM’s wishes, we’ve made adjustments to the user interface requirements announced this past March for developers who choose to use either or both of the entitlements.

  • We’ve adjusted the payment processing provider criteria for developers who wish to use either of the entitlements.

  • The 3 percent commission discount also applies to in-app purchases that qualify for a lower commission rate (for example, App Store Small Business Program enrollees or subscription services after one year of paid service — both of which already qualify for a 15% commission).

As a reminder, developers of dating apps who want to continue using Apple’s in-app purchase system — which we believe is the safest and most secure way for users to purchase digital goods and services — may do so and no further action is needed.

We don’t believe some of these changes are in the best interests of our users’ privacy or data security. Because Apple is committed to constructive engagement with regulators, we’re making the additional changes at the ACM’s request. As we’ve previously said, we disagree with the ACM’s original order and are appealing it.

Learn more

Posted on Leave a comment

Challenge: Menu bar extras with SwiftUI

And now, a brief message from your friend, the Mac menu bar:

Hi! 👋🏻 I’m the menu bar! I always love making File → New Friends. We might have first met in the early 1980s, but I’ve only gotten more powerful and helpful (Format → Font → Humble Brag).

I’ve always had opinions. During the 90s, I was the one who told you you were exceptional every night (Special → Sleep). I have constant viewpoints about what time it is. And I don’t mean to Window → Minimize my contributions, but even Siri wants to hang out with me.

I have enjoyed capturing your full attention for some years. But now I’ve decided to share the Spotlight. Menu bar extras have arrived in SwiftUI!

So here’s your challenge: Build me a menu bar extra in SwiftUI that I’d wear with pride. I’d drop down with joy if you’d make a little utility for me, and I’d be a click above ecstatic if you gave me the honor of hosting a small portion of your app.

Begin the challenge

To help you build a menu bar extra and complete the Mac menu bar’s challenge, we’ve compiled a few resources to help you get started:

Bring multiple windows to your SwiftUI app

Discover the latest SwiftUI APIs to help you present windows within your app’s scenes. We’ll explore how scene types like MenuBarExtra can help you easily build more kinds of apps using SwiftUI. We’ll also show you how to use modifiers that customize the presentation and behavior of your app…

MenuBarExtra

Explore the Human Interface Guidelines for menu bar extras

We welcome you to visit the SwiftUI Study Hall to collaborate on this challenge! Ask questions, connect with other developers, and share your creations.

And to close out this challenge, one more note from the menu bar:

Make sure you File → Share with me what you did on Twitter with the hashtag #WWDC22Challenges. We hope you’ve had a great Edit → Select All → WWDC22!

Posted on Leave a comment

WWDC22 Daily Digest: Friday

Welcome! It’s time for our final morning briefing. (We know — we can’t believe it’s Friday, either.) Before we power down for the week, however, we’ve got one more great day of events and activities.

Let’s begin by catching up on Day 4:

WWDC22 Day 4 recap

It’s time to review Day 4. Check out the Thursday highlights and tune in for a quick preview of the last day of WWDC22.

Send us your feedback about WWDC22

Spent time watching sessions, participating in Digital Lounges, attending labs, or trying out challenges this week as part of WWDC22? We’d love to know what you thought. Take five minutes out of your day — less time than a coffee break! — and fill out the WWDC22 Developer Survey.

Take part in the WWDC22 Developer Survey

Spotlight on sessions, Digital Lounges, and labs

Our final day packs in a bunch of great sessions: Discover how you can accelerate machine learning with Metal, bring multiple windows to your SwiftUI app, and learn how to optimize your app or game’s memory and battery consumption.

Accelerate machine learning with Metal

Discover how you can use Metal to accelerate your PyTorch model training on macOS. We’ll take you through updates to TensorFlow training support, explore the latest features and operations of MPS Graph, and share best practices to help you achieve great performance for all your machine learning…

Bring multiple windows to your SwiftUI app

Discover the latest SwiftUI APIs to help you present windows within your app’s scenes. We’ll explore how scene types like MenuBarExtra can help you easily build more kinds of apps using SwiftUI. We’ll also show you how to use modifiers that customize the presentation and behavior of your app…

Power down: Improve battery consumption

Discover how you can limit your power usage and help people get even more out of your app. We’ll show you how you can reduce battery drain from your app by making four key changes to your code. Learn how to add Dark Mode to your app and benefit from OLED displays, audit frame rates from secondary…

Profile and optimize your game’s memory

Learn how Apple platforms calculate and allocate memory for your game. We’ll show you how to use Instruments and the Game Memory template to profile your game, take a memory graph to monitor current memory use, and analyze it using Xcode Memory Debugger and command line tools. We’ll also explore…

Caught up on sessions for the day? Join us in the Digital Lounges for Q&As with our ARKit, WidgetKit, Metal teams, and more — and enjoy a live watch party with the presenter of “Explore the machine learning developer experience.”

Live from the Developer Center

The Developer Center played host to several developer podcasts during WWDC week, including Under the Radar, Swift by Sundell, Hacking with Swift, and The Talk Show.

Apple senior vice president of worldwide marketing Greg Joswiak and senior vice president of software engineering Craig Federighi chat with John Gruber during a taped broadcast of The Talk Show.

Apple senior vice president of worldwide marketing Greg Joswiak and senior vice president of software engineering Craig Federighi chat with John Gruber during a taped broadcast of The Talk Show.

Listen to Under the Radar to learn how you can visit the new Developer Center, catch up on all the new SwiftUI features in iOS 16 with Hacking with Swift, and — in an exclusive reveal — find out on The Talk Show the hair accessory senior vice president of software engineering Craig Federighi almost wore during the keynote.

The Talk Show: WWDC22

Hacking with Swift: What’s new in SwiftUI for iOS 16

Swift by Sundell: Swift 5.7, generics, and the road to Swift 6

Under the Radar: WWDC 2022 Special

Peek behind the design

WWDC22 may be winding down, but the Behind the Design series is just ramping up.

Starting June 27, check back weekly for behind-the-scenes interviews with the creators of our 2022 Apple Design Award-winning apps and games.

A WWDC22 wrap

Thanks for coming to a magical, memorable WWDC. It’s been an incredible week — welcoming people to the Developer Center and Apple Park, connecting online in the lounges and labs, exploring sessions and documentation — and we appreciate the opportunity to share it with you.

Posted on Leave a comment

Best of WWDC22

What’s new in UIKit

Discover the latest updates and improvements to UIKit and learn how to build better iPadOS, iOS, and Mac Catalyst apps. We’ll take you through UI refinements, productivity updates, API enhancements, and more. We’ll also help you explore improvements to performance, security, and privacy.

Posted on Leave a comment

Challenge: SwiftUI Animation Extravaganza!

Get your imagination ready for some high-quality visualization: We invite you to envision an animation and bring it to life using SwiftUI and Swift Playgrounds. Your animation can include text, shapes, colors, sounds, explosions, dancing cats — whatever brings you joy.

You could create a visualization that melts colors across an iPad screen as you tilt the device using CoreMotion, or code an animation that responds to environmental sounds from the microphone. Maybe your animation is generated by an AI; maybe it’s manually created through custom gestures.

Visit the Developer Tools Study Hall to collaborate on this challenge! Ask questions, connect with other developers, and share your creations.

Begin the challenge

To help get you started, check out the Animating Shapes project in Swift Playgrounds, which teaches you the basics of creating animations in SwiftUI and lets you browse a range of sample animations created using the framework. Use this as a jumping-off point for your own animation — or create a new project and start hacking from scratch.

Download Swift Playgrounds for macOS

Download Swift Playgrounds for iOS

Learn more about Swift Playgrounds

Need a bit of inspiration? Check out Animating Shapes, navigate to RollinRainbow.swift, and check out the wave effect applied across each column of a grid. Elsewhere, visit DancingDots.swift to see how you can use observable objects to animate a dynamic range of scale, color, and offset changes.

To find more resources, check out “Add rich graphics to your SwiftUI app” from WWDC21 or the web tutorial “Animating Views and Transitions.” And you can also explore using the SwiftUI Canvas to draw rich, dynamic graphics. Good luck!

Add rich graphics to your SwiftUI app

Learn how you can bring your graphics to life with SwiftUI. We’ll begin by working with safe areas, including the keyboard safe area, and learn how to design beautiful, edge-to-edge graphics that won’t underlap the on-screen keyboard. We’ll also explore the materials and vibrancy you can use…

Animating Views and Transitions

Canvas

Share your SwiftUI animations on Twitter with the hashtag #WWDC22Challenges, or show off your work in the Developer Tools Study Hall. And if you’d like to discuss animation or other aspects of SwiftUI and Swift Playgrounds, join the teams at events throughout the remainder of the week at WWDC22.

Explore #WWDC22Challenges on social media

Read the WWDC22 Challenges Terms and Conditions

Posted on Leave a comment

Challenge: Private Access Tokens

Private Access Tokens are powerful tools that prove when HTTP requests are coming from legitimate devices without disclosing someone’s identity. This proof can help you reduce how often you show CAPTCHAs to people. They are simple to set up and test — and so we’re inviting you in this challenge to try out Private Access Tokens on your own server.

Before you begin, be sure to watch “Replace CAPTCHAs with Private Access Tokens” for an overview of the feature.

Replace CAPTCHAs with Private Access Tokens

Don’t be captured by CAPTCHAs! Private Access Tokens are a powerful alternative that help you identify HTTP requests from legitimate devices and people without compromising their identity or personal information. We’ll show you how your app and server can take advantage of this tool to add…

Begin the challenge

It’s easy to add support for Private Access Tokens on your servers: Your server can send an HTTP authentication challenge to request clients to present a token that is signed by a token issuer you trust. You can then validate tokens using that issuer’s public key.

Choose a Token Issuer
To adopt Private Access tokens, you’ll first need to choose a token issuer. Your server must include the token issuer’s hostname and public key in challenges sent to clients. You can test with token issuers from Cloudflare and Fastly when using iOS 16 and macOS Ventura. For each issuer, you can look up the public key using the URL format https://<issuer name>/.well-known/token-issuer-directory. You can fetch one of the following URLs from your server to get the issuer information:

Cloudflare — https://demo-pat.issuer.cloudflare.com/.well-known/token-issuer-directory Fastly — https://demo-issuer.private-access-tokens.fastly.com/.well-known/token-issuer-directory

Learn more about Private Access Tokens and Cloudflare

Learn more about Private Access Tokens and Fastly

Token Challenge and Redemption
To send a challenge, your server needs to post a HTTP 401 response to a request made by the client with a “WWW-Authenticate” header containing a “PrivateToken” challenge. This header contains two attributes: “challenge”, which contains a TokenChallenge structure in base64url encoding; and “token-key”, which contains a token issuer’s public key using base64url encoding.

WWW-Authenticate: PrivateToken challenge=, token-key=

The TokenChallenge structure contains the type of token, the hostname of the issuer, an optional context to bind to your challenge, and the hostname of your server. iOS 16 and macOS Ventura support token type 2, which uses publicly verifiable RSA Blind Signatures.

struct { uint16_t token_type; // 0x0002, in network-byte order uint16_t issuer_name_length; // Issuer name length, in network-byte order char issuer_name[]; // Hostname of the token issuer uint8_t redemption_context_length; // Redemption context length (0 or 32) uint8_t redemption_context[]; // Redemption context, either 0 or 32 bytes uint16_t origin_info_length; // Origin info length, in network-byte order char origin_info[]; // Hostname of your server
} TokenChallenge; 

Token responses come in an “Authorization” header. This contains the “token” attribute, which is a RSA Blind Signature token using base64url encoding. Use the token issuer’s public key to verify this token.

Authorization: PrivateToken token=

Note: When you send token challenges, don’t block the main page load. Make sure that any clients that don’t support tokens still can access your website!

Adopt the “PrivateToken” HTTP authentication scheme

Issuance Protocol for Publicly Verifiable Tokens

Now that you know how to set up Private Access Tokens, explore sending token challenges in your own website. Test your site with clients that support Private Access Tokens — and ones that don’t! — and discover how you can make your CAPTCHAs only show for clients that don’t support Private Access Tokens.

Have questions about adopting this feature? Check out our Q&A on Private Access Tokens on Thursday morning. And don’t forget to share your CAPTCHA-free experiences on Twitter with the hashtag #WWDC22Challenges!

Explore #WWDC22Challenges on social media

Read the WWDC22 Challenges Terms and Conditions

Posted on Leave a comment

WWDC22 Daily Digest: Thursday

It’s Day 4 of WWDC and a fresh round of Digital Lounges, labs, and activities awaits you. Before we kick off Thursday, catch up on yesterday’s dispatch:

WWDC22 Day 3 recap

Your Day 3 status report is here. Catch up on the latest from WWDC22 and discover what’s coming to a Thursday near you.

Spotlight on sessions, Digital Lounges, and labs

We’ve got a packed Thursday for you! Discover the latest updates to Vision, learn how to write for interfaces and collaborate with Messages, find out how to use SwiftUI with UIKit, create complications with WidgetKit, and — a WWDC first! — watch “Design for Arabic” delivered in Arabic by presenter Mohamed Samir.

What’s new in Vision

Learn about the latest updates to Vision APIs that help your apps recognize text, detect faces and face landmarks, and implement optical flow. We’ll take you through the capabilities of optical flow for video-based apps, show you how to update your apps with revisions to the machine learning…

Design for Collaboration with Messages

Discover how you can design great collaboration experiences using Apple platforms. We’ll show you how to combine the Share Sheet, live editing notifications, Messages, FaceTime, and your app’s existing collaboration features to help people connect and collaborate effortlessly. (Note: API will…

Writing for interfaces

The words and phrases you choose for your app matter. Whether you’re writing an alert, building an onboarding experience, or describing an image for accessibility, learn how you can design through the lens of language and help people get the most from your app. We’ll show you how to create clear,…

Use SwiftUI with UIKit

Learn how to take advantage of the power of SwiftUI in your UIKit app. Build custom UICollectionView and UITableView cells seamlessly with SwiftUI using UIHostingConfiguration. We’ll also show you how to manage data flow between UIKit and SwiftUI components within your app. To get the most out…

Design for Arabic · صمّم بالعربي

تعرّف على المبادئ الأساسية لتصميم الواجهات الرقمية باللغة العربية. سواء كنت تود تصميم تطبيق أو لعبة خصيصًا للاستخدام العربي، أو تود ترجمة تطبيق من لغة أخرى إلى…

And once you’re finished watching sessions for the day, join the Digital Lounges for more great Q&A from our design, photos, and Swift teams as well as live watch parties with the presenter of “Explore design navigation on iOS.”

Thursday is also your final day to request a lab appointment for a conversation with Apple engineers and designers. Come say hi and ask your questions!

Trivia Night is back

WWDC Trivia Night returns tonight at 6 p.m. PT in the Developer Tools Lounge. Put your brain to the test on such pressing questions as: What was the first supported programming language for Mac development? What’s the deal with 9:41? Come test your wits, compete with your friends and Apple staff, and suggest questions to stump the experts in the room.

Where we’re going, we don’t need roads

We’re going back in time with our Thursday Throwback SwiftUI challenge! Create a SwiftUI view that reimagines your app clothed in the interfaces of the past. Dress your UI up in the grayscale style of System 6, the linen of early iPhoneOS, or another time period entirely! Visit the SwiftUI Study Hall to collaborate on the “Throwback Thursday” coding challenge. Ask questions, connect with other developers, and share your creations or on Twitter using the hashtag #WWDC22Challenges.

Headphones on

An immersive app doesn’t only look and feel great — it has to sound incredible, too. During WWDC, we spoke with four Apple Design Award finalists about the sensational sounds of their apps and games: the incredible and immersive soundscape app Odio; the elegant and jazz-fueled Please, Touch the Artwork; the longstanding mindfulness resource Headspace; and the gorgeous tap-along rhythm game A Musical Story.

Sound advice

Inside the sublime audio of four Apple Design Award finalists.

Spin the music of WWDC

And speaking of music: Give our official WWDC playlists a listen — they’re perfect if you need chill background music or a little audio kick to get you going.

Listen to WWDC22 playlists on Apple Music

Have fun out there, and we’ll see you tomorrow to close out WWDC22!

Posted on Leave a comment

Challenge: Bindless ray tracing

Mirror, mirror on the … other mirror. In this challenge, we invite you to explore bindless rendering in Metal 3 and reflect rays on mirrored surfaces.

Thanks to the bindless enhancements in Metal 3, the HybridRendering sample app looks better than ever. It makes all scene resources available to its shaders using Argument Buffers, then uses Metal ray tracing to produce reflections on metallic surfaces — like the ones below.

But as beautifully as the app has drawn this scene, there’s still a limitation: It’s unable to show reflections within reflections, like the mirrored floor reflecting the mirrored sphere.

In fairness: It’s hard to show mirrors reflecting mirrors! Light infinitely bounces between the two surfaces, creating a situation that can’t be solved computationally. Ray tracing apps work around this issue by adding a limited number of light (or ray) “bounces” in the scene to provide more realism.

In this challenge, we invite you to extend that ray tracing code and increase your image’s realism by adding one (or more) extra ray bounces.

Begin the challenge

Before entering this hall of mirrors, we recommend first watching “Go bindless with Metal 3.” After you watch, download the “Rendering reflections in real time using ray tracing” sample code — we’ll be using it for this challenge.

Go bindless with Metal 3

Learn how you can unleash powerful rendering techniques like ray tracing when you go bindless with Metal 3. We’ll show you how to make your app’s bindless journey a joy by simplifying argument buffers, allocating acceleration structures from heaps, and benefitting from the improvements to the…

Rendering reflections in real time using ray tracing

The app has a dedicated compute pass that calculates reflections from a thin G-Buffer containing positions and normals for each pixel in the image.

The ray tracing shader reads this data and uses it with the camera’s view direction to calculate the direction of the reflected rays. It then uses Metal to trace these rays, find intersections, and shade reflections.

raytracing::ray r;
r.origin = positions.read(tid).xyz;
r.direction = normalize(directions.read(tid).xyz);
r.min_distance = 0.1;
r.max_distance = FLT_MAX; raytracing::intersector<raytracing::instancing, raytracing::triangle_data> inter;
inter.assume_geometry_type( raytracing::geometry_type::triangle );
auto intersection = inter.intersect( r, accelerationStructure, 0xFF );
if ( intersection.type == raytracing::intersection_type::triangle )
{ }

This produces the following image:

But there’s a problem! The fire trucks are missing from the sphere’s reflection on the floor. We challenge you to reveal the missing trucks by modifying the ray tracing shader, rtReflection, to add an additional ray trace step.

To complete this challenge, you’ll:

  1. Use the reflected normal and intersection position to calculate the next bounce of rays.
  2. Extract the material shading logic into a helper function that allows you to shade reflections within the reflections.
  3. Combine all reflected colors and write them into the outImage.

When you’re done, use the screenshot tool, GPU Debugger, or QuickTime to capture your solution and show us your work by posting it on Twitter with the hashtag #WWDC22Challenges. And if you’d like to discuss bindless ray tracing and other Graphics & Games topics, join the team at events throughout the remainder of the week at WWDC22.

Explore #WWDC22Challenges on social media

Read the WWDC22 Challenges Terms and Conditions

Posted on Leave a comment

Challenge: Design for superheroic navigation

Calling all designers: We’re inviting you to use your powers to design a “super” navigation experience for an app that helps our developer heroes fight code-tastrophes and design disasters.

In this challenge, you’ll design a tab bar and screen of a fictional app to help your favorite superheroes. Whatever kind of app you decide to create, your challenge is to organize its core functionality into sections on a tab bar.

Bonus: If you’re feeling super-creative, design the root screen of one of that app’s tabs. What would your heroes need to view? What actions would they take? (Note: Though you’re just designing one screen, the features designed in this view should work in harmony with the other tabs in your proposed app.)

We also welcome you to visit the Design Study Hall to collaborate on this challenge! Ask questions, connect with other developers, and share your creations.

Begin the challenge

To get started, we recommend watching “Explore design navigation for iOS” to learn how you can take advantage of existing navigation structures to simplify complex interactions in your app without compromising its personality. Explore best practices and common pitfalls when working with tab bars, modality, and more.

We also recommend checking out “Writing for interfaces” to find out more about creating clear, conversational, and helpful labels and writing in your app.

Explore navigation design for iOS

Familiar navigation patterns can help people easily explore the information within your app — and save them from unnecessary confusion. We’ll show you how to take advantage of existing navigation structures to simplify complex interactions in your app without compromising its personality. Learn…

Writing for interfaces

The words and phrases you choose for your app matter. Whether you’re writing an alert, building an onboarding experience, or describing an image for accessibility, learn how you can design through the lens of language and help people get the most from your app. We’ll show you how to create clear,…

Once you’re ready to start designing, visit the Apple Design Resources page to download the iOS design template and get access to tab bar symbols and iOS system colors. We also recommend downloading and exploring the SF Symbols app to create compelling iconography for your tab bar.

iOS apps can have between two and five tabs — so consider which features would be most relevant for the superhero app you’re designing. Don’t forget to use descriptive and succinct labels for each tab!

Apple Design Resources

Download SF Symbols

Show us your super work by posting it on Twitter with the hashtag #WWDC22Challenges, or share your work in the Design Study Hall. And if you’d like to discuss other Design topics, join the team at events all throughout the remainder of the week at WWDC22.

Explore #WWDC22Challenges on social media

Read the WWDC22 Challenges Terms and Conditions