p3l6.dev|

What's new in Xcode

<<Back to Index

Optimizations

  • Xcode is 24 percent smaller, skipping intel and metal toolchains
  • Faster text input
  • Workspaces load faster

    Workspace and Editing

  • Intuitive editor tabs
    • Tab start page
  • Multiple word search, unordered like a search engine
  • Accessibility, coding by voice, understands swift syntax
  • #Playground
    • Embedded like previews, but for any code
    • Have to import Playgrounds first
    • Kinda like doing simple debugging with sample data
    • Very nice visual outputs for various types, such as a map or regex match
    • Results update immediately when modifying other code
    • There are plans to open source this, so it can be used outside xcode
  • Icon composer
    • All versions of an icon in a single file generated by the app
  • String catalogs
    • Type-safe imports for strings with arguments
    • Auto generated comment for translator describing string’s use

      Intelligence

  • ChatGPT conversations in the sidebar
    • Ask questions or let it make changes
    • Smaller menu to make changes to a code selection
    • Xcode sends project context to chatgpt, which can then query for additional context
    • Can toggle project context off, also toggle auto-apply for suggested changes
    • Use the at sign @ to reference project symbols in chats
    • Code snapshots can be unwound everytime the AI makes changes
  • Inline code assistant
    • Generate docs or playground or explain
    • Try to generate a fix for compile error
  • Can add multiple models
    • ChatGPT preconfigured, with limited default requests
    • Add other network or local models

      Debugging and Performance

  • Step into swift tasks!
  • Task info displayed in variables view, and thread stack
  • If the app crashes in debug due to missing usage description entitlement, xcode will just prompt you to enter it
  • Processor trace is much higher detail than a process sample, since it captures all branches and instructions the CPU makes. (Requires M4 / iPhone 16 hardware support)
  • New CPU counter and SwiftUI and Power profiler instruments
  • Better diagnostic trends in Organizer
    • Surfaces key issues easier, and highlights when they started
    • Metrics can compare your app to similar apps

      Building

  • Explicit modules for swift by default
  • Swift build open sourced
    • Ongoing work to include in SPM
  • Can add apple’s own enhanced security entitlement

    Testing

  • UI testing automation recording can generate code
    • Provides multiple possible element identifiers in a drop down menu
    • Can also copy identifier code from failed tests, in the reports
  • Thread performance checker can find work that should not be on main thread