https://developer.apple.com/videos/play/wwdc2024/10135/ View in English [ ] * Global Nav Open Menu Global Nav Close Menu * Apple Developer Search Cancel * Apple Developer * News * Discover * Design * Develop * Distribute * Support * Account * [ ] Cancel [*]Only search within "" Quick Links 5 Quick Links [ ] Videos Open Menu Close Menu * Collection * Topics * All Videos * About More Videos [gobackward] [goforward5] Streaming is available in most browsers, and in the Developer app. * Overview * Code * What's new in Xcode 16 Discover the latest productivity and performance improvements in Xcode 16. Learn about enhancements to code completion, diagnostics, and Xcode Previews. Find out more about updates in builds and explore improvements in debugging and Instruments. Chapters + 0:00 - Introduction + 0:29 - Updates in editing + 0:33 - Code completion + 1:01 - Adopting Swift 6 data-race safety guarantees + 2:49 - Improvements to Previews + 6:22 - Updates in builds + 6:26 - Explicit modules + 7:15 - Package resolution + 7:15 - Package resolution + 8:30 - What's new in debugging + 8:35 - Build process and debugging + 9:07 - Thread performance checker + 9:23 - The organizer + 12:16 - The RealityKit debugger + 12:55 - Meet Swift Testing + 18:42 - What's new in Instruments + 19:44 - Meet the flame graph + 21:38 - Wrap up Resources + Forum: Developer Tools & Services + Previewing your app's interface in Xcode + Xcode + Xcode updates + o HD Video o SD Video Related Videos WWDC24 + Break into the RealityKit debugger + Demystify explicitly built modules + Go further with Swift Testing + Meet Swift Testing + Migrate your app to Swift 6 + Run, Break, Inspect: Explore effective debugging in LLDB * Download Array * + Copy Code 3:37 - Inline State within Preview #Preview { @Previewable @State var currentFace = RobotFace.heart } + Copy Code 3:45 - View using Inline State RobotFaceSelectorView(currentFace: $currentFace) + Copy Code 3:53 - Complete Preview using Previewable #Preview { @Previewable @State var currentFace = RobotFace.heart RobotFaceSelectorView(currentFace: $currentFace) } + Copy Code 4:40 - Type Conforming to PreviewModifier struct SampleRobotNamer: PreviewModifier { typealias Context = RobotNamer static func makeSharedContext() async throws -> Context { let url = URL(fileURLWithPath: "/tmp/local_names.txt") return try await RobotNamer(url: url) } func body(content: Content, context: Context) -> some View { content.environment(context) } } + Copy Code 5:29 - Extension on PreviewTrait extension PreviewTrait where T == Preview.ViewTraits { @MainActor static var sampleNamer: Self = .modifier(SampleRobotNamer()) } + Copy Code 5:38 - Preview using created PreviewModifier #Preview(traits: .sampleNamer) { RobotNameSelectorView() } + Copy Code 10:26 - AVPlayer Creation struct BOTanistAVPlayer { func player(url: URL) throws -> AVPlayer { let player = AVPlayer(url: url) return player } } + Copy Code 11:28 - AVPlayer Call Site self.player = try? await robotVideoAVPlayer() + Copy Code 11:57 - AVPlayer Initialization private nonisolated func robotVideoAVPlayer() async throws -> AVPlayer? { guard let url = Bundle.main.url(forResource: RobotVideo.resource, withExtension: RobotVideo.ext) else { throw BOTanistAppError.videoNotFound(forResource: RobotVideo.resource, withExtension: RobotVideo.ext) } let avPlayer = BOTanistAVPlayer() let player = try avPlayer.player(url: url) return player } + Copy Code 13:42 - Initial Test Scaffolding import Testing @testable import BOTanist // When using the default init Plant(type:) make sure the planting style is graft @Test func plantingRoses() { // First create the two Plant structs // Verify with #expect } + Copy Code 14:36 - Complete Test import Testing @testable import BOTanist // When using the default init Plant(type:) make sure the planting style is graft @Test func plantingRoses() { // First create the two Plant structs let plant = Plant(type: .rose) let expected = Plant(type: .rose, style: .graft) // Verify with #expect #expect(plant == expected) } + Copy Code 17:35 - Custom Tag extension Tag { @Tag static var planting: Self } + Copy Code 17:42 - Tag Usage in @Test .tags(.planting) + Copy Code 20:37 - Slow Asset Loading for asset in allAssets { asset.load() } + Copy Code 20:54 - Fast Asset Loading await withDiscardingTaskGroup { group in for asset in allAssets { group.addTask { asset.load() } } } * Looking for something specific? Enter a topic above and jump straight to the good stuff. An error occurred when submitting your query. Please check your Internet connection and try again. Developer Footer What's new in Xcode 16 [ ] Platforms Open Menu Close Menu * iOS * iPadOS * macOS * tvOS * visionOS * watchOS [ ] Tools Open Menu Close Menu * Swift * SwiftUI * Swift Playgrounds * TestFlight * Xcode * Xcode Cloud * SF Symbols [ ] Topics & Technologies Open Menu Close Menu * Accessibility * Accessories * App Extensions * App Store * Audio & Video * Augmented Reality * Business * Design * Distribution * Education * Fonts * Games * Health & Fitness * In-App Purchase * Localization * Maps & Location * Machine Learning * Open Source * Security * Safari & Web [ ] Resources Open Menu Close Menu * Documentation * Tutorials * Downloads * Forums * Videos [ ] Support Open Menu Close Menu * Support Articles * Contact Us * Bug Reporting * System Status [ ] Account Open Menu Close Menu * Apple Developer * App Store Connect * Certificates, IDs, & Profiles * Feedback Assistant [ ] Programs Open Menu Close Menu * Apple Developer Program * Apple Developer Enterprise Program * App Store Small Business Program * MFi Program * News Partner Program * Video Partner Program * Security Bounty Program * Security Research Device Program [ ] Events Open Menu Close Menu * Meet with Apple Experts * Apple Developer Centers * App Store Awards * Apple Design Awards * Apple Developer Academies * Entrepreneur Camp * WWDC Get the Apple Developer app. ( ) Light ( ) Dark ( ) Auto [] Copyright (c) 2024 Apple Inc. All rights reserved. Terms of Use Privacy Policy Agreements and Guidelines