WWDC Quick Look 💓 By SwiftGGTeam
What’s new in Xcode 26

What’s new in Xcode 26

Watch original video

Highlight

Xcode 26 cuts download size by 24%, loads workspaces 40% faster, drops typing latency on complex expressions by 50%, and lets any Swift file run experimental code inline through the #Playground macro.

Core content

Open a large Swift project, type a slightly complex expression, and the cursor stalls for half a second before the character appears. Switch workspaces and Xcode reloads every index. Download a full Xcode package and it eats tens of GB. These have been the loudest developer complaints for the past few years. In a project like Landmarks, which uses SwiftUI previews, debugging a regex that parses coordinates from a string, or just inspecting a struct field, often means launching the whole app and clicking through to the right page. The loop is slow.

Xcode 26 answers by treating “lighter tools” and “faster feedback” as the same problem. The download is 24% smaller — smaller than Xcode 6 from 2014. The Simulator runtime no longer ships Intel support by default, and the Metal toolchain is downloaded on demand (00:52). Workspace loading is 40% faster, and typing latency on certain complex expressions drops by 50% (01:20). On the editing side, the new #Playground macro lets any file run experimental code inline, with results shown live in the canvas tab. In the talk, Eliza uses it to find a bug that places the Grand Canyon in China — without restarting the app (05:12). Add the Coding Assistant, Voice Control’s Swift mode, Icon Composer, and type-safe Swift symbols from String Catalog, and Xcode 26 shortens the loop from “I want to check this” to “I just checked it.”

Details

The #Playground macro comes from the new Playgrounds module and works in any Swift file. Like SwiftUI Preview, it belongs to the “see-while-you-write” family of tools, but it targets arbitrary expressions instead of views (04:47). The minimal usage is two steps: import the module, write a block.

import Playgrounds

#Playground {
  let landmark = Landmark.exampleData.first
  let region = landmark?.coordinateRegion
}

Key points:

  • import Playgrounds brings the #Playground macro into the file. The macro itself ships with Xcode 26.
  • #Playground { ... } expands at compile time. Each expression in the block shows up as its own entry in the canvas tab, with property values and Quick Look visualizations.
  • Code like Landmark.exampleData.first, which reads real project types, just works. You don’t need a separate target for the playground — it lives in the source file.
  • Edit the block and the canvas reruns the affected expressions. The “edit, restart app, reproduce, observe” cycle goes away.

When Eliza tracks down the coordinate bug, the key code is a regex. The original version only matches an optional decimal part and ignores the sign, so it parses negative longitudes as positive numbers (06:33):

func scanForFloatingPointNumbers() -> [Regex<Substring>.Match] {
    return self.matches(of: /[0-9]*[.][0-9]+/)
}

Key points:

  • Regex<Substring>.Match is Swift’s new return type for regex matches. Each match carries the range in the original string, so the canvas can highlight the matched span directly.
  • self.matches(of:) is an extension on String. Combined with the regex literal /.../, it removes the need to build an NSRegularExpression by hand.
  • The flaw is obvious in the canvas. After typing "lon: -113.16096, lat: 36.21904", the matched range does not include the - (06:49).

The fix adds an optional [+-]? in front of the decimal part (07:33):

func scanForFloatingPointNumbers() -> [Regex<Substring>.Match] {
    return self.matches(of: /[+-]?[0-9]*[.][0-9]+/)
}

Key points:

  • [+-]? makes the sign optional, so negative numbers are captured correctly.
  • The canvas reruns immediately, so the loop “edit regex, check the range for the minus sign” finishes in seconds. No app restart needed.
  • Switching back to the first playground, the Grand Canyon coordinates are right again. The whole debugging path stays inside the source view.

For performance and testing, UI tests gain XCTHitchMetric to measure scrolling jank (34:40):

func testScrollingAnimationPerformance() throws {
    let measureOptions = XCTMeasureOptions()
    measureOptions.invocationOptions = .manuallyStop

    let app = XCUIApplication()
    app.launch()
    let scrollView = app.scrollViews.firstMatch

    measure(metrics: [XCTHitchMetric(application: app)], options: measureOptions) {
        scrollView.swipeUp(velocity: .fast)
        stopMeasuring()
        scrollView.swipeDown(velocity: .fast)
    }
}

Key points:

  • XCTHitchMetric(application:) takes the target app as a parameter and measures total hitch time (animation frame drops) inside the measure block.
  • XCTMeasureOptions().invocationOptions = .manuallyStop allows manual stopMeasuring(), so the swipe-up counts toward the metric while the swipe-down is excluded. Only the scroll direction you care about is measured.
  • scrollView.swipeUp(velocity: .fast) triggers scrolling at top speed, which is more likely to expose animation problems.
  • This metric fits well as a performance baseline. When hitch time creeps up on a regression, the Test Report shows it.

Other details worth remembering: editor tabs now behave like Safari, and you can pin a file to a fixed tab (01:52). Multiple Words search uses search-engine techniques to find clusters of words by proximity, even across lines (02:21). Voice Control gains a Swift mode, so you can write code by reading it aloud naturally (03:22). Icon Composer ships as a standalone app alongside Xcode 26, producing app icons for multiple platforms and modes from a single file (08:15). String Catalog now generates type-safe Swift symbols and writes translation comments automatically using on-device models (09:48). The Coding Assistant connects to ChatGPT, Anthropic Claude (Opus, Sonnet), and local Ollama / LM Studio. It reads the project context and edits code directly (10:38). The debugger follows thread switches in Swift Concurrency. Instruments adds Processor Trace on M4+ devices and a new Power Profiler.

Takeaways

  • What to do: rewrite “let me peek at this data” checks from ad-hoc print calls into #Playground blocks.

    • Why it pays off: the playground block lives in the source file and the canvas updates live. Debugging a struct field, a regex, or a date-formatting routine no longer requires running the whole app.
    • How to start: add a team rule that all non-UI quick checks go through #Playground, and put common sample data in static properties (such as Landmark.exampleData) so playgrounds always have representative input.
  • What to do: replace “does scrolling feel laggy?” performance regression tests with an XCTHitchMetric baseline.

    • Why it pays off: scrolling jank is one of the most visible problems for users, but human eyes adapt to it quickly. Quantifying it with a metric is what gives you PR-level enforcement.
    • How to start: write hitch tests for the two or three longest, most complex lists in the app, record the current numbers as a baseline, then set a threshold in CI that blocks merges when hitch time grows.
  • What to do: convert all UI strings from hard-coded literals to type-safe symbols in String Catalog.

    • Why it pays off: Xcode 26 generates Swift symbols from catalog entries, catches typos at compile time, and autocompletes valid keys. On-device models write comments automatically, cutting the back-and-forth with translators.
    • How to start: pick one self-contained module (a settings page, for example) and migrate it first. Replace Text("Save") with the symbol generated from the catalog. Walk through the translation flow once, then roll it out to other modules.
  • What to do: turn on the Coding Assistant by default in large projects, but disable “auto-apply.”

    • Why it pays off: the model can read project context, which is great for exploring an unfamiliar codebase. Accepting its edits blindly introduces regressions that are hard to spot.
    • How to start: use it first for retrieval-only questions like “which file holds this feature.” Move on to generating playgrounds and writing tests. Only later let it edit code directly.

Comments

GitHub Issues · utterances