Use Your Loaf | iOS Developmen... Note

Thread Of Notes

WWDC 2026 focuses on Liquid Glass and Apple Intelligence, with Platforms State of the Union as the starting point. Don't feel pressured to learn everything immediately, as over 100 sessions are available at your own pace. The Apple Developer app or YouTube are recommended for watching sessions, which are typically concise and to the point. Swift 6.4 introduces quality-of-life improvements and new features like FilePath and Swift-C interop. SwiftUI sees mandatory Liquid Glass changes, minimal menu icons, and a prominent tab role, alongside new document APIs and reorderable containers. Modernizing UIKit apps involves adapting to resizable environments and required UIScene lifecycles, while AppKit apps should embrace control events and keyboard navigation. Xcode 27 offers a customizable toolbar, coding agents for tasks like localization and prototyping, and an improved device hub. Instruments provides new modes for profiling, including a Swift executors instrument and a Foundation Models instrument for debugging agentic apps. MetricKit is rebuilt with a Swift-first API for collecting app performance metrics. Developers can migrate to Swift Testing, with Xcode's coding assistant aiding the process. Xcode Cloud streamlines build, delivery, and automation workflows. SwiftData receives updates like sectioned fetch requests and the ability to store Codable types. Design principles emphasize purpose, simplicity, and clear naming, with guidance on crafting intuitive search experiences. Accessibility enhancements include improved VoiceOver navigation for reading apps and AI-generated subtitles. Apple Intelligence expands the Foundation Models framework, making it open source and offering on-device and Private Cloud Compute options.
Swift Testing is an open-source testing framework designed for Swift, introduced by Apple at WWDC24 and shipped with Xcode 16. It uses modern features like concurrency and macros, and supports Windows and Linux as well as Apple's platforms. There's no urgent reason to migrate from XCTest, but Swift Testing offers several advantages, including the ability to run tests in-process using Swift Concurrency, which allows for parallel testing on physical devices.To get started with Swift Testing, you can mix XCTest and Swift Testing unit tests in a test target, but you should not mix testing frameworks within a test. You can import the Swift Testing framework by adding "import Testing" to your test file. Apple recommends grouping tests by adding them to a type, such as a struct or class, and using the init method for setup and teardown.Swift Testing tests are normal Swift methods that become unit tests when you add the @Test macro. You can mark test methods with async or throws and isolate them to an actor as needed. The @Test attribute is a macro that can be expanded to see the implementation.Swift Testing uses the #expect and #require macros for assertions, which offer more flexibility and informative error messages than XCTest's XCTAssert. The #expect macro logs failed expectations and continues the test, while the #require macro is a throwing version that stops test execution on error.You can also use Issue.record to cause a test to fail without evaluating a condition, similar to XCTFail in XCTest. Overall, Swift Testing offers several advantages over XCTest, including improved concurrency support and more flexible assertions.