Build, test, and submit your app using Xcode, Apple's integrated development environment.

Xcode Documentation

Posts under Xcode subtopic

Post

Replies

Boosts

Views

Created

A Summary of the WWDC25 Group Lab - Developer Tools
At WWDC25 we launched a new type of Lab event for the developer community - Group Labs. A Group Lab is a panel Q&A designed for a large audience of developers. Group Labs are a unique opportunity for the community to submit questions directly to a panel of Apple engineers and designers. Here are the highlights from the WWDC25 Group Lab for Developer Tools. Will my project codebase be used for training when I use Xcode's intelligent assistant powered by cloud-based models? When using ChatGPT without logging in, your data will not be used to improve any models. If you log in to a ChatGPT account, this is based on your ChatGPT account settings, which allows you to opt-out (it defaults to on). When using Xcode with accounts for other model providers, you should check with the policies of your provider. And finally, at no point will any portion of your codebase be used to train or improve any Apple models. We'd love to make our SwiftUI Previews (and soon, Playgrounds) as snappy as possible. Is there any way to skip certain build steps, such as running linters? It seems the build environment is exactly the same (compared to a debug build), but maybe there's a trick. Starting with Xcode 16, SwiftUI previews use the exact same build artifacts as the regular build. The new Playgrounds support in Xcode 26 uses these build artifacts too. Shell script build phases are the most common thing that introduces extra build time, so as a first step, try turning off all shell script build phases (like linters) to get an idea if that’s the issue. If those build phases add significant time to your build, consider moving some of those phases into asynchronous steps, such as running linters before committing instead of on every build. If you do need a shell script build phase to run during your build, make sure to explicitly define the input and output files, as that is a huge way to improve your build performance. Are we able to provide additional context for the models, like coding standards? Documentation for third party dependencies? Documentation on your own codebase that explains things like architecture and more? In general, Xcode will automatically search for the right context based on the question and the evolving answer, as the model can interact multiple times with your project as it develops an answer. This will automatically pick up the coding style of the code it sees, and can include files that contain architecture comments, etc. Beyond automatic context, you can manually attach other documents, even if they aren't in your project. For example, you could make a file with rules and ideas and attach it, and it will influence the response. We are very aware of other kinds of automatic context like rule files, etc, though Xcode does not support these at this time. Once ChatGPT is enabled for Coding Intelligence in Xcode 26, and I sign into my existing ChatGPT account, will the ChatGPT Coding Intelligence model in Xcode know about chat conversations on Xcode development done previously in the ChatGPT Mac app? Xcode does not use information from other conversations, and conversations started in Xcode are not accessible in the web UI or ChatGPT app. Is there a plan to make SwiftUI views easier to locate and understand in the view hierarchy like UIKit views? SwiftUI uses a declarative paradigm to define your user interface. That allows you to specify what you want, with the system translating that into an efficient representation at runtime. Unlike traditional AppKit and UIKit, seeing the runtime representation of SwiftUI views isn't sufficient in order to understand why it's not doing what you want. This year, we introduced a SwiftUI Instrument that shows why things are happening, like view re-rendering. Is it possible to use the AI chat with ChatGPT Enterprise? My company doesn't allow us to use the general ChatGPT, only the enterprise version they have setup that prevents data from being leaked Yes, Xcode 26 supports logging into any existing ChatGPT account, including enterprise accounts. If that does not meet your needs, you can also setup a local server that implements the popular chat completions REST API to talk to your enterprise account how you need. Now that Icon Composer is here, how does it complement or replace existing vector design tools such as Sketch for icon design? Icon Composer complements your existing vector design tools. You should continue to create your shapes, gradients, and layers in another tool like Sketch, and compose the exported SVG layers in Icon Composer. Once you bring your layers into Icon Composer, you can then use it to influence the translucency, blur, and specular highlights for your icon. What’s one feature or improvement in the new Xcode that you personally think developers will love, but might not immediately discover? Maybe something tucked away or quietly powerful that’s flown under the radar so far? One feature we're particularly excited about is the new power profiler for iOS, which gives you further insights into the energy consumption of your app beyond what was possible with the energy instrument previously. You can learn more about how to use this instrument and how it can help you greatly reduce your apps battery usage in the documentation, as well as the session Profile and optimize power usage in your app. There were also improvements in accessibility this year with Voice Control, where you can naturally speak your Swift code to Xcode, and it understands the Swift syntax as you speak. To see it in action, take a look at the demonstration in What’s new in Xcode 26. We have a software advisory council that is very sensitive to having our private information going to the cloud in any form. What information do you have to help me guide Xcode and Apple Intelligence through the acceptance process? One thing you can do is configure a proxy for your enterprise that implementing the popular Chat Completions API endpoint protocol. When using a model provider via URL, you can use your proxy endpoint to inspect the network traffic for anything that you do not want sent outside of your enterprise, and then forward the traffic through the proxy to your chosen model provider. Are there list of recommended LLMs to use with Xcode via Intelligence/Local? I've tried Gemma3-12B, but.. I hope there are better options? Apple doesn't have a published list of recommended local models. This is a fast-moving space, and so a recommendation would become out of date very quickly as new models are released. We encourage you to try out the local model support in Xcode 26 with models that you find meet your needs, and let us and the community know! (continued below)
1
0
1.1k
Jul ’25
Xcode 26.3 - Revert to variable editor tab width
Hi, In Xcode 26.2, editor tabs adapt their width to the number of pinned tabs: In Xcode 26.3, editor tabs have a minimal width, after which the row of tabs becomes horizontally scrollable: Notice how less tabs are visible at a time on Xcode 26.3 (second image). Yet, there is enough horizontal space to accommodate more, as shown on Xcode 26.2 (first image). This is a UX regression. How can I revert back to 26.2 tab sizing behavior? Thank you.
0
0
15
2h
XCode 26.2 not running UItests in parallel in subsequent test runs
I have a group of XCUItest suites that were designed to run in parallel on simulators. They run fine in xcode 16.2, but when I try to run them in Xcode 26 they run fine the first time, but on the second time I get an error that the simulator cannot be found: "No matching device (62621AD4-C8D6-4A1B-B511-79236113FD94) ". This UDID seems to be from one of the clones that were spawned on the previous test run. No matching device (62621AD4-C8D6-4A1B-B511-79236113FD94) in set at /Users/myUser/Library/Developer/XCTestDevices Domain: com.apple.CoreSimulator.SimError Code: 404 User Info: { DVTErrorCreationDateKey = "2026-02-26 22:52:53 +0000"; IDERunOperationFailingWorker = "_IDEInstalliPhoneSimulatorWorker"; } If I clean all simulators and try to run again without closing Xcode, it keeps trying to access the clone that no longer exists. If I close an reopen xcode after removing all simulators ~/Library/Developer/XCTestDevices, xcode keeps trying the wrong device and I get the following error: Failed to clone device named 'iPhone 17 Pro'. (Underlying Error: The operation couldn’t be completed. Device was allocated but was stuck in creation state. Check CoreSimulator.log for more information.) This is what I get from CoreSimulator log: Feb 26 17:24:34 Mac-GD6GX5XH CoreSimulatorService[99200] : Device 3C7BE1BE-416E-480A-BDA6-ADE8F0ADF818 encountered in creation state at launch. The device will be re-created. Feb 26 17:24:34 Mac-GD6GX5XH CoreSimulatorService[99200] : Failed to clone the device data path from /Users/MyUser/Library/Developer/CoreSimulator/Devices/7A5377DC-3ED9-4C8B-96EB-8DF7BEF4AE8B/data to /Users/MyUser/Library/Developer/XCTestDevices/3C7BE1BE-416E-480A-BDA6-ADE8F0ADF818/data, error = Error Domain=NSCocoaErrorDomain Code=260 "The file “data” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/Users/MyUser/Library/Developer/CoreSimulator/Devices/7A5377DC-3ED9-4C8B-96EB-8DF7BEF4AE8B/data, NSURL=file:///Users/MyUser/Library/Developer/CoreSimulator/Devices/7A5377DC-3ED9-4C8B-96EB-8DF7BEF4AE8B/data, NSUnderlyingError=0x600000d04120 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}} Feb 26 17:24:34 Mac-GD6GX5XH CoreSimulatorService[99200] : Failed to re-create device that was encountered in the creation state (Clone 1 of iPhone 17 Pro (3C7BE1BE-416E-480A-BDA6-ADE8F0ADF818, iOS 26.2, Creating)): Error Domain=NSCocoaErrorDomain Code=260 "The file “data” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/Users/MyUser/Library/Developer/CoreSimulator/Devices/7A5377DC-3ED9-4C8B-96EB-8DF7BEF4AE8B/data, NSURL=file:///Users/MyUser/Library/Developer/CoreSimulator/Devices/7A5377DC-3ED9-4C8B-96EB-8DF7BEF4AE8B/data, NSUnderlyingError=0x600000d04120 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}} Feb 26 17:24:34 Mac-GD6GX5XH CoreSimulatorService[99200] : New device is stuck in creation state, deleting: Clone 1 of iPhone 17 Pro (3C7BE1BE-416E-480A-BDA6-ADE8F0ADF818, iOS 26.2, Creating) Feb 26 17:24:34 Mac-GD6GX5XH CoreSimulatorService[99200] : Error Domain=NSPOSIXErrorDomain Code=22 "Invalid argument" UserInfo={NSLocalizedFailureReason=Device was allocated but was stuck in creation state. Check CoreSimulator.log for more information.} Feb 26 17:24:34 Mac-GD6GX5XH CoreSimulatorService[99200] : Error Domain=NSPOSIXErrorDomain Code=22 "Invalid argument" UserInfo={NSLocalizedFailureReason=Device was allocated but was stuck in creation state. Check CoreSimulator.log for more information.} Feb 26 17:24:34 Mac-GD6GX5XH com.apple.dt.Xcode[2744] : Error Domain=NSPOSIXErrorDomain Code=22 "Invalid argument" UserInfo={NSLocalizedFailureReason=Device was allocated but was stuck in creation state. Check CoreSimulator.log for more information.}
0
0
27
1d
On M4 macmini, Xcode 26 cannot debug iOS 12 on iPhone 6
As stated in the title, my device is M4 macmini, running macOS 26, with Xcode version 26.1. The error message is ": retrying debugserver without secure proxy due to error: Error Domain=com.apple.dtdevicekit Code=811 UserInfo={NSUnderlyingError=0xc42b07930 {Error Domain=com.apple.dt.MobileDeviceErrorDomain Code=-402653150 UserInfo={MobileDeviceErrorCode=, com.apple.dtdevicekit.stacktrace=, DVTRadarComponentKey=261622, NSLocalizedDescription=}}, NSLocalizedRecoverySuggestion=Please check your connection to your device., DVTRadarComponentKey=261622, NSLocalizedDescription=}, the official documentation does state that debugging is supported for devices running at least iOS 15. However, my 2019 MacBook Pro, with macOS 15.7.2 and Xcode 26.1 installed, can debug iOS 12 devices normally. The product manager has asked me to identify the issue, but I am at a loss. If anyone can provide a solution or confirm that support for iOS 12 is no longer available, we would be very grateful. Additionally, iOS 13 devices can all be debugged normally
1
0
48
1d
Compatibility of Xcode 26.3 Release Candidate 2 and WatchOS 26.3
I have made an app using Xcode 26.3 Release Candidate 2 for my Apple Watch that runs successfully on the simulator. Xcode comes with the IoS 26.2 and WatchOS SDK 26.2. However, when I do try to connect to my device that have IoS 26.3 and watchOS 26.3, I see a succesful connection to my iPhone but I see the the world symbol and wheel keeps trying to connect on my Apple Watch. I also tried Xcode 26.4 beta 2 with no luck. I reviewed the WatchOS Release Notes: The watchOS 26.2 SDK provides support to develop watchOS apps for Apple Watch devices running watchOS 26.3. The SDK comes bundled with Xcode 26.2, available from the Mac App Store. I also tried Xcode 26.2 but no luck. Any suggestions?
0
0
14
1d
Is Xcode Intelligence Ready for Production? My Experience and a Quest for Better Tools
I am looking to optimize my AI-assisted workflow within Xcode. Previously, my process was inefficient: Manually selecting and copying code snippets from Xcode into Gemini. Asking a specific question (e.g., "Modify this to show an alertError message box"). Copying the result back into Xcode. I attempted to switch to the new native Intelligence feature in Xcode to streamline this, but I found significant shortcomings: Latency: The response time is noticeably slow. Much slower than asking directly on Gemini 3 Pro. Lack of Context: The AI often fails to grasp the full project context. For example, it frequently claims it cannot see the code for ScannerView even though it is part of the project. I often have to prompt it multiple times before it finally "finds" the file. Is Xcode's Intelligence feature actually production-ready yet? If not, what tools do you recommend that integrate well with iOS development? To be clear, I am not looking for "vibe coding." I have a clear grasp of the problem and the high-level solution. My goal is to delegate the low-level implementation to the AI. I need a tool that has full project context from the start, eliminating the need to manually copy-paste snippets into a chat window.
0
0
30
2d
Xcode 26.3 MCP server output missing `structredContent`
I am using official MCP SDK. According to official guide, Servers MUST provide structured results that conform to this schema. https://modelcontextprotocol.io/specification/draft/server/tools#output-schema I could see output schema defined, but result have no structured content. Current output schema: { name: "XcodeListWindows", title: "List Windows", description: "Lists the current Xcode windows and their workspace information", inputSchema: { type: "object", properties: { }, required: [ ], }, outputSchema: { type: "object", properties: { message: { description: "Description of all open Xcode windows", type: "string", }, }, required: [ "message", ], }, } Current response: { "result": { "content": [ { type: "text", text: "{\"message\":\"* tabIdentifier: windowtab1, workspacePath: \\xxx\\n* tabIdentifier: windowtab2, workspacePath: \\xxx\\n\"}", }, ] } } Expected: { "result": { "content": [ { type: "text", text: "{\"message\":\"* tabIdentifier: windowtab1, workspacePath: \\xxx\\n* tabIdentifier: windowtab2, workspacePath: \\xxx\\n\"}", }, ], "structuredContent": { "message": "* tabIdentifier: windowtab1, workspacePath: \\xxx\\n* tabIdentifier: windowtab2, workspacePath: \\xxx\\n", } } }
0
0
52
2d
XCUIElementTypes used vary between MacOS and iPadOS
I have a UI Test that is trying to drive a stepper. When run as iPad app, the tree has: Button, 0x10ce7f860, {{492.0, 98.5}, {47.0, 32.0}}, identifier: 'GraphDataViewNumBinsStepper-Decrement', label: 'Number of bins: 4, Decrement' Button, 0x10ce802a0, {{539.0, 98.5}, {47.0, 32.0}}, identifier: 'GraphDataViewNumBinsStepper-Increment', label: 'Number of bins: 4, Increment' When run a Mac app, the tree has: StaticText, 0x7fcf5380d670, {{1575.2, 530.0}, {109.0, 16.0}}, identifier: 'GraphDataViewNumBinsStepperText', value: Number of bins: 4 Stepper, 0x7fcf5380d7b0, {{1691.5, 527.0}, {15.0, 22.0}}, identifier: 'GraphDataViewNumBinsStepper', value: 0 IncrementArrow, 0x7fcf5380e420, {{1692.5, 528.0}, {13.0, 10.0}}, Disabled DecrementArrow, 0x7fcf5380e560, {{1692.5, 538.0}, {13.0, 10.0}}, Disabled Is this an expected situation or might I be building for an inappropriate version of MacOS or iPadOS?
0
0
16
3d
Xcode is compiling all Swift files one at a time?
I have two apps; one is a subset of functionality of the other. The smaller app has about 170 Swift files. The larger app has these files plus about 120 more. So I would expect the larger app to take around twice as long to build. Instead, the smaller app takes less than a minute to build while the larger app takes over 13 minutes to build; to be exact, it takes 15.3 times longer. While reviewing the build report, I noticed that the smaller app compiles the Swift files in batches, with each batch taking around 10 seconds, but with up to 17 batches running at once. In contrast, the larger app compiles all 290 Swift files in one giant batch, so apparently there is no multithreading of the Swift compilation (see screen shots below). The difference in the number of batches the smaller app compiles at once roughly corresponds to the difference in overall build time. Is there a build setting I can change to make the larger app compile Swift files in multiple smaller batches as the smaller app is doing? I checked SWIFT_COMPILATION_MODE and it's the same in both apps (Incremental for debugging and Whole Module for release) but I don't know what other settings I should check.
1
0
47
4d
No Universal for Map App project with Tahoe
Mac Pro 2019, Tahoe 26.3, Xcode 26.2 Mac Mini 2023 M2, Tahoe 26.3, Xcode 26.2 On Mac Pro 2019 the app is only Intel while on Mac Mini 2023 M2 it is ARM64 only. Both have Standard Architectures (Apple Silicon, Intel). Both have Build Active Architecture Only is set to No (Debug + Release). Happen for default new projet macOS -> App and Obj-C, Xib. No change to defaults setting except uncheck "Automaticaly manage signing" and "Signing Certificate" set to "Sign to Run Locally" HOWEVER On Mac Pro 2019, BigSur 11.7.10, Xcode 14.10 the application is build Universal ! Why cannot build universal with Tahoe 26.3, Xcode 26.2 ? Can I submit a Mac applcation to App Store Connect with BigSur 11.7.10, Xcode 14.10 ? What are the minimal version of Mac Os and Xcode to submit a Mac applcation to App Store Connect ?
3
0
59
4d
I'am porting my App to Swift 6...
... and I managed to fix most issues coming out, but for a specific issue in an class adopting a protocol; basically it is a support class to be used by the view controller and so I wanted to keep it in background, so I created a new actor and I wanted to use it for this protocol and adopting classes. Yet I came out with a host of errors I have no idea about how to cope with: :
0
0
17
4d
can't get websocket connection working on Apple Watch
I have an app that uses a websocket connection to the Mac on the local network — it works fine on the iphone — it works fine on Apple Watch simulator on a real Apple Watch I get the message nw_endpoint_flow_failed_with_error [C9403 192.168.0.35:10010 failed parent-flow (unsatisfied (Path was denied by NECP policy), interface: ipsec1, ipv4, ipv6, proxy)] already failing, returning I can't find any information on that NECP policy and no cure for this error. Please help me
1
0
32
6d
Xcode 26 Butchers Productivity by Making Global the State of Navigators Pane
Here's the text of FB22008758 I've just submitted: Xcode 26 changed the behavior of the Navigators pane (which hopefully is a bug and not an intended behavior). in Xcode 26, if I close (or open) the Navigators pane in a window tab, it closes (or opens) the Navigators pane in ALL window tabs. This is insanely horrible, unproductive, time-wasting behavior that breaks workflows that has been established for many years (I've been using Xcode since 2006). By way of example: In a window tab that contains a .xib, I prefer the Navigators pane to be closed. While in all other window tabs (that contain code files and other items), I want the Navigators pane to be always displayed. Before Xcode 26, the Navigators pane was open or closed in each individual window tab as the user desired. But in Xcode 26, if I close the Navigators pane in one window tab, the pane closes EVERYWHERE. Thus when, for example, I go to a .xib window tab, I have to close the Navigators pane AGAIN. But then when I go back to a code window tab, I have to OPEN the Navigators pane there (because it became closed globally). And have to do this endlessly every day. WHY??? Please restore the normal, pre-26 behavior of the Navigators pane. That is, the Navigators pane should remain open or closed as PER INDIVIDUAL WINDOW TAB, not globally. Thank you for your attention to this important issue!
1
0
51
1w
ShazamKit enabled on App ID but provisioning profiles do not include com.apple.developer.shazamkit entitlement
Hi, I’m a paid Apple Developer Program member and I’m seeing an entitlement issuance issue with ShazamKit. ShazamKit is enabled for my App ID (com.tomharris.dnbidfinder) in Certificates, Identifiers & Profiles. However, every iOS Development provisioning profile I generate does not include the entitlement: com.apple.developer.shazamkit verified this by decoding the downloaded .mobileprovision file: security cms -D -i .mobileprovision | /usr/libexec/PlistBuddy -c "Print :Entitlements" /dev/stdin The entitlement dictionary does not contain the ShazamKit key. Because of this: • The signed .app does not contain the Shazam entitlement • SHSession.match(signature) fails on device • I receive ShazamKit runtime error 201 / 212 I’ve already: • Toggled ShazamKit off and back on for the App ID • Created new provisioning profiles • Created a brand new App ID to test • Refreshed profiles in Xcode The portal UI shows ShazamKit as enabled, but the entitlement is not being issued into provisioning profiles. Has anyone experienced this before? Is there an additional approval step required for ShazamKit, or could this be a backend entitlement propagation issue? Thanks.
0
0
32
1w
Xcode 26.3 RC - Claude Agent returns "Your request couldn't be completed"
Environment: Xcode 26.3 RC macOS 26.3 (25D125) (Apple Silicon / arm64) Setup: Xcode > Settings > Intelligence > Claude Agent: Signed In (account status shows "Signed In") Model: Default Steps to reproduce: Open a new chat in Xcode's Coding Assistant Select "Claude Agent" from the agent dropdown (instead of "Claude Sonnet 4.5") Send any message (e.g. "HI") Expected result: Claude Agent responds normally. Actual result: The message is sent but immediately returns the error: "Your request couldn't be completed." 🚩I have an active Claude Code subscription with remaining usage. Running claude in Terminal works perfectly, confirming the subscription and quota are valid.
1
0
117
1w
Xcode 26 Kills Productivity by Making Global the State of Inspectors Pane
Here's the text of FB22001359 I've just submitted: Xcode 26 changed the behavior of the Inspectors pane (which hopefully is a bug and not an intended behavior). Now, if I close (or open) the Inspectors pane in a window tab, it closes (or opens) the Inspectors pane in ALL tabs. This is insanely horrible, unproductive, time-wasting behavior that breaks workflows that has been established for many years. By way of example: In a window tab that contains a .xib, I always want the Inspectors pane to be open. While in the window tabs that contain code files, I want the Inspectors pane to be closed. (Sometimes I do open it in certain window tabs, when needed). Before Xcode 26, the Inspectors pane was open or closed in each individual tab as the user desired. Now, if I close the Inspectors pane in one window tab, the pane closes EVERYWHERE. Thus when, for example, I go to a .xib window tab, I have to open the Inspectors pane AGAIN. But then when I go back to a code window tab, I have to CLOSE the Inspectors pane there (because it became open globally). And have to do this endlessly every day. WHY??? Please restore the normal, pre-26 behavior of the Inspectors pane. That is, the Inspectors pane should remain open or closed as PER INDIVIDUAL WINDOW TAB, not globally. Thank you for your attention to this important issue!
0
0
52
1w
ChatGPT in Xcode - Networking error
In the Coding Intelligence feature introduced in Xcode 26, when I send a message using ChatGPT in Xcode, the message “Your request couldn't be completed. Networking error.” appears and I’m unable to use the feature. I suspect the issue may be related to the VPN or network proxy connected to my Mac and am attempting to investigate. However, Xcode does not display any specific error details, nor does it provide a way to view them, which makes a detailed investigation difficult. Next to the error message, there is a feedback button rather than a stethoscope (🩺) button, and the feedback window does not provide access to the underlying error information. Is there a way to view the detailed network error logs generated by ChatGPT in Xcode? (I am using Xcode 26.0.1.)
2
0
94
1w
Your request couldn't be completed
Steps to reproduce: Open Xcode 26.3 → Settings → Intelligence → Claude sign-in Click the sign-in button — spinner begins, never completes An email the arrives with a magic link. The magic link opened a browser page which displayed a 6-digit verification code with instructions reading "enter this verification code where you first tried to sign in" — i.e. back in Xcode. However, Xcode was showing only an endless spinner with no code entry field anywhere in the UI. This is the core bug. I did since manage to complete authentication sign-in through a second browser verification field that eventually appeared after about 10 minutes and did get signed in, but the Claude Intelligence agent still returns "Your request could not be completed" even after successful sign-in and a full Xcode restart. Prior to this bug starting at 10 am on February 19 I had been using the intelligence agent successfully for about a week. Anthropic did have some sort of event on their system around February 18/19 so maybe this has been a result of that. I have notified Anthropic support and Apple Feedback Assistant. Does anybody have a workaround until either anthropic or Apple get back to me?
1
1
61
1w