Xcode 27: Everything Developers Need to Know
DEV Community

Xcode 27: Everything Developers Need to Know

Xcode 27 is in beta right now (beta 4 at the time of writing), and it is a big release. Apple's official release notes are lots of lines of radar numbers and one-line bug fixes, which is great as a reference and terrible as a read. Can you even run it? Before anything else, check these three lines: - Xcode 27 requires a Mac running macOS Tahoe 26.4 or later. - Xcode 27 only installs and runs on Apple silicon Macs. If you are still on an Intel Mac, this release is the end of the line for you. - On-device debugging supports iOS 17+, tvOS 17+, watchOS 10+, and visionOS. Older devices are no longer debuggable. It ships with Swift 6.4 and the SDKs for iOS 27, iPadOS 27, tvOS 27, watchOS 27, macOS 27, and visionOS 27. Part 1: The breaking changes (read this section) I am putting these first because they are the parts that turn into a red build log on Monday morning. Everything else is upside. Intel is being phased out of your build settings If a target's minimum deployment target is macOS 27.0 or DriverKit 27.0, it will no longer build Universal by default. The ARCHS_STANDARD setting drops x86_64 once MACOSX_DEPLOYMENT_TARGET or DRIVERKIT_DEPLOYMENT_TARGET is 27.0 or higher. If you still ship to Intel Macs, you have two options: - Keep your minimum deployment target below macOS 27.0. - Explicitly add x86_64 back to theARCHS build setting. The macOS 27 SDK can still back-deploy Universal apps down to macOS 12, so this is a default change, not a hard removal. The old linker is gone ld64 has been removed and the -ld_classic flag is no longer supported. If you have that flag lingering in OTHER_LDFLAGS from some 2023-era workaround, delete it now. This one is a hard failure, not a warning. On Demand Resources is deprecated NSBundleResourceRequest and the whole On Demand Resources system are deprecated. The replacement is Background Assets, which got a solid round of improvements this release (more on that below). PreviewProvider is deprecated PreviewProvider and its family of preview modifiers are now deprecated. If you still have the old struct-based previews hanging around, this is your nudge to move to the #Preview macro. Before: struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView() } } After: #Preview { ContentView() } A real Swift source break This one is subtle. A computed property that has both an init accessor and an array or dictionary literal as its initial value will no longer compile if the getter is declared before the init accessor. This is a known source break from SE-0508. Broken: struct S { var _strings: [String] var strings: [String] = ["hello"] { get { _strings } @storageRestrictions(initializes: _strings) init { _strings = newValue } } } The fix is to reorder: declare the init accessor first, then the getter. Annoying, but a one-line move. Duplicate Clang module names now fail The Swift dependency scanner was optimized to skip redundant header searches, and the tradeoff is that every Clang module reachable from a single dependency scan must have a unique module name. Previously the scanner tolerated duplicates; now it may error out. The two situations that trigger this in the real world: - An SDK or project that vends the same Clang module name from more than one location on the header search path. - Vendored third-party sources shipping a module.modulemap that redeclares a module already in the SDK. If you get a mysterious scanning error after upgrading, this is the first thing to check. C++ changes worth knowing If you have C++ in your app, a few things moved: - The minimum macOS deployment target for the C++ standard library is now 11.0. - multimap::find andmultiset::find no longer guarantee returning an iterator to the first equal element. libc++ used to do this by accident, and the Standard never promised it. Uselower_bound orequal_range if you were relying on it. - lower_bound andupper_bound onstd::map andstd::set behave differently for comparators that are not a strict weak order. Defining_LIBCPP_ENABLE_LEGACY_TREE_LOWER_UPPER_BOUND gets the old behavior back, but that escape hatch is going away, likely next release. - bitset::operator[] now returnsbool , which is actually what the Standard says it should do. - std::allocator is now trivially default-constructible. The upside is significant: associative and unordered containers got up to 11x faster in some functions, several algorithms got up to 3x faster, and distance on non-random-access segmented iterators improved dramatically. A number of C++ papers landed too, including std::optional , zip , and std::views::indices(n) . Part 2: Agentic coding is now a first-class citizen This is the headline feature, and it is a lot more than a chat box. The assistant moved out of the sidebar The coding assistant now lives in the editor area, not the navigator, with a redesigned conversation transcript. Artifacts the agent produces (code diffs, plans, SwiftUI preview snapshots) show up next to the transcript, and you can annotate code snippets and plan documents to give targeted inline feedback without leaving the conversation. The sidebar is now dedicated purely to organizing conversations: real-time status, unread indicators, drag-and-drop grouping, archiving, renaming, multi-select for bulk actions, and a context menu to open conversations in new tabs, windows, or editor panes. There is also a New Conversation button in the toolbar that works from anywhere in Xcode, with a status indicator you can click to jump to whichever conversation needs your attention. Plan mode Planning is now a proper feature rather than a prompting trick. Plans appear as editable Markdown artifacts next to the conversation. You review, annotate, discuss changes, and approve before the agent writes any code. This is the workflow I would recommend for anything non-trivial: get the plan right first, then let it execute. Agents can actually run your app This is the part that changes what agents are useful for. In Xcode 27, agents can: - Boot simulators, install and launch apps, synthesize touch events, and capture screenshots to verify UI behavior. - Manipulate the active run state, read and interact with the debugger console. - List and switch between schemes and run destinations. - Inspect and modify build settings, compiler flags, entitlements, and Info.plist keys. - Access project insights such as crashes, disk writes, energy, hangs, and launch issues affecting your shipped app. In other words, an agent can now write a fix, build it, run it, look at the screen, and check whether it worked. Gemini, ACP, and plugins - Google Gemini is now available in the coding assistant alongside the existing options. - Xcode supports the Agent Client Protocol (ACP). - Agents can be extended with plugins containing skills, MCP servers, and ACP agent configurations. Skills are invokable as slash commands with completion support. - Apple ships its own specialists for targeted tasks like localization, UIKit resizing, and accessibility. - Two security-focused skills landed in beta 3: adopt-c-bounds-safety for a file-by-file-fbounds-safety adoption workflow, andaudit-xcode-security-settings to suggest security-oriented build settings and entitlements. Plugin authors can customize how their MCP servers appear in the UI using _meta fields: { "name": "MyGreatPlugin", "description": "An awesome MCP server configuration.", "version": "1.0.0", "mcpServers": { "MyGreatMCP": { "type": "http", "url": "...", "tools": ["*"], "_meta": { "ideToolIconPath": "./icon.svg", "ideToolIconRendersAsTemplate": true, "ideToolTitles": { "whoami": "Who Am I", "get-current-email": "Get Current Email Message" } } } } } A sandbox for agents Coding Intelligence includes a new security layer that monitors and controls filesystem access by coding agents and any processes they spawn. It is opt-in via Coding Intelligence settings. If you are nervous about letting an agent loose in your repo, turn this on before you do anything else. One known issue to watch If the "Implement the plan?" confirmation bar appears while the agent is still streaming, clicking Yes or No can start a new agent turn on top of the in-flight one and leave the conversation in a broken state. Wait for the agent to finish responding before confirming. Part 3: Device Hub replaces the Simulator workflow Device Hub is the new unified interface for both simulators and physical devices. Two features stand out. Wireless pairing You can now pair iPhone, iPad, and Apple Watch running OS 27 or later over a network. Click the + button in the Device Hub sidebar and choose "Pair Nearby Device". No cable needed for iPhone and iPad, and watch pairing is noticeably more reliable. Mouse and trackpad gestures on iOS Standard Mac gestures (scrolling, pinching, rotating) now work with UIKit components on iOS devices, physical or simulated. There is a nuance worth understanding here. When you scroll with a pointing device, UIEvent.EventType.scroll is emitted. Pinch or rotate produces UIEvent.EventType.transform . But clicking with a mouse produces a simulated finger touch of type UITouch.TouchType.direct , not UITouch.TouchType.indirectPointer . That is a convenience hybrid, not a faithful simulation. To validate real pointer behavior, use "Simulate Trackpad or Mouse" from the Device menu, test on a physical iPad with a paired pointing device, or use iPhone Mirroring. Simulator boot is faster Simulator runtimes now ship with a pre-built dyld cache, which makes the first launch of a simulator much faster. Small change, noticeable every single day. Device Hub rough edges Beta software, so expect some friction: - Game controllers only work with the visionOS simulator. - Video and input for a physical Apple Vision Pro are not supported (use AirPlay to view remotely). Everything else, like settings and DeviceFS, works. - Two-finger touches cannot be sent. - Scrolling over an Apple Watch face does not emulate the digital crown. Move the pointer o

Read on DEV Community ↗ ← Back to News

Comments

No comments yet. Start the discussion.