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

Xcode Documentation

Posts under Xcode subtopic

Post

Replies

Boosts

Views

Activity

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 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
21
6m
SPM Failed to verified fingerprint for SSH url since Tahoe 26.3
Hi there, I recently updated to the latest version of macOS Tahoe 26.3. Since then, Xcode is not able to resolve my Swift Package dependencies anymore. We use SSH for all our Github hosted packages. When package resolution is running, we randomly have Failed to verify SSH fingerprint on some remote package. Nothing has changed and it worked perfectly with Tahoe 26.2. The SSH have been reconfigured and known hosts have been verified. Is something changed between those 2 versions or is it a bug ?
12
10
646
4h
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
41
8h
Broken autocomplete in Xcode 26
Xcode 16 and 26 changes in painful way how the Tab key works during autocomplete. Previously, pressing Tab would extend the typed text up to the word match. For example, we have two classes: NSViewController and NSViewCoordinator BEFORE, typing: "NSV" + Tab used to complete to NSViewCo Now, in Xcode 26, pressing Tab just use the first suggestion. Stupidly. Especially when you want DispatchQueue and it gaves you DispatchSemaphore… That is very inconvenient because very often I want just see all possible cases with some prefix...without need of typing all prefix manually. How to restore the previous behavior? How to do autocomplete word-by-word?
6
0
152
9h
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 ?
0
0
8
10h
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
10
10h
How can I use private AI agents in Xcode 26.3?
I work on some proprietary codebases and can only use private AI services with them (currently MiniMax M2.1 and GLM 4.7). It all works great with both Claude Code and OpenCode agents, and I'd like to leverage the new agentic capabilities that are now in Xcode 26.3. I'm not seeing any option to connect to OpenCode, and both the Anthropic and OpenAI providers require an enterprise account (which I don't have access to). Are there any options that I'm missing here?
8
4
791
16h
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
19
2d
Xcode 26.3 Codex Account just spinning
I have the new Xcode 26.3 running on an Intel MBP macOS 26.2 I have clicked to download Codex in the Xcode settings, then under the Intelligence section I select Codex but where it says "ChatGPT Account" there is a spinner that never ends. I suspect it is meant to show a Sign In button. I don't see any documentation to suggest this shouldn't work on Intel, so what gives? My "ChatGPT in Xcode" section is successfully signed in, and i've tried signing that out.
6
2
160
2d
Apple watch Xcode pairing & connection issues
I’m blocked debugging a watchOS app on a physical Apple Watch. The iPhone connects to Xcode normally (wired), but the Watch either fails to connect with a tunnel timeout or disappears entirely from Xcode after I unpaired it inside Devices & Simulators. Environment Mac: macOS 26.x (Apple Silicon Mac) Xcode: 26.2 iPhone: iOS 26.1 Apple Watch Ultra: watchOS 26.2 (build 23S303) Connection: iPhone connected to Mac via USB (trusted). Watch paired to iPhone and working normally in the Watch app. Issue A (when Watch is visible in Xcode) In Xcode → Window → Devices and Simulators, the Watch shows up but is not usable and fails to connect. Error: “Previous preparation error: A connection to this device could not be established.” “Timed out while attempting to establish tunnel using negotiated network parameters.” In some attempts the Watch shows “Capacity: Unknown” / limited details, and then fails during preparation. Issue B (after unpairing Watch in Xcode only) I unpaired/removed the Watch in Xcode (Devices & Simulators). I did not unpair the Watch from the iPhone. Now: iPhone appears in Xcode and works normally for builds. Watch is still paired to the iPhone and works normally. Watch no longer appears anywhere in Xcode Devices & Simulators (no paired watch section, no watch run destination). What I’ve tried Reboots of Mac, iPhone, Watch (multiple times) Watch unlocked, awake; iPhone unlocked and close to Watch Verified Watch is paired and connected in iPhone Watch app Developer Mode enabled on iPhone and Watch Wi-Fi and Bluetooth ON (Mac/iPhone/Watch), tried toggling both Tried on home Wi-Fi and also with iPhone hotspot (same result) Resetting trust prompts / reconnecting iPhone via USB, re-trusting Mac Apple Watch: “Clear Trusted Computers” Xcode: removing/re-adding devices; clearing derived data; restarting Xcode Watch Developer networking test: Responsiveness = Medium (430 RPM) Questions 1. Is this a known issue/regression with Xcode 26.2 + watchOS 26.2 tunneling (CoreDevice / devicectl)? 2. Is there an Apple-supported way to force Xcode to re-discover a paired Watch after it was removed from Xcode Devices & Simulators (without unpairing the Watch from the iPhone)? 3. Any recommended logs or diagnostic steps I should collect (Console logs, sysdiagnose, specific Xcode/CoreDevice logs) to include in a Feedback report? If helpful, I can provide the full error text from Xcode’s Devices window and any logs you recommend. Thank you in advance,
9
4
713
3d
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
19
3d
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.
0
0
59
3d
Archiving Catalyst project that embeds macOS tool
Hi! I have a Catalyst app that embeds command line utility. So the project has two targets: Catalyst target, this target depends on #2 and embeds it into its bundle. macOS target, the command line tool. Both targets have package dependency to the same package. I used this to embed the CMD tool. Everything builds, runs and works fine until I try to archive the project. Archiving stops early with such error: error: Multiple commands produce '/Users/kse2/Library/Developer/Xcode/DerivedData/PkgTest-clngkndczxoprpdlwefqqiqlryjt/Build/Intermediates.noindex/ArchiveIntermediates/PkgTest/IntermediateBuildFilesPath/UninstalledProducts/macosx/MacrosForSwift.o' note: Target 'MacrosForSwift' (project 'MacrosForSwift') has a command with output '/Users/kse2/Library/Developer/Xcode/DerivedData/PkgTest-clngkndczxoprpdlwefqqiqlryjt/Build/Intermediates.noindex/ArchiveIntermediates/PkgTest/IntermediateBuildFilesPath/UninstalledProducts/macosx/MacrosForSwift.o' note: Target 'MacrosForSwift' (project 'MacrosForSwift') has a command with output '/Users/kse2/Library/Developer/Xcode/DerivedData/PkgTest-clngkndczxoprpdlwefqqiqlryjt/Build/Intermediates.noindex/ArchiveIntermediates/PkgTest/IntermediateBuildFilesPath/UninstalledProducts/macosx/MacrosForSwift.o' What I have tried to fix archiving: Changing PkgTestCMD target to be on Catalyst/iOS instead of macOS. This works but I'm not sure how to properly run CMD tool with iOS SDK (if this correct at all): I need the main thread to be 'unblocked' and be active while background tasks exist. Adding an aux framework that act as container for the package. Doesn't work. Splitting targets into different projects, making workspace and cross-project reference. Doesn't work. My understanding is that archiving attempts to produce .o files for both Catalyst and macOS simultaneously, due to PkgTest being Catalyst and PkgTestCMD being macOS targets. How to archive such a project? Is there a way to separate archiving of CMD and main app? Maybe separate .o files into different directories. Simple building and running the project works, why archiving doesn't want to? I have a test project for the issue: PkgTest. main branch is the source project, DepFramework contains attempt #2, Workspace—#3. Thank you!
2
0
116
3d
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
39
3d
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.)
0
0
48
4d
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?
0
1
26
4d
Xcode 26 is insanely slow
Hey there Just updated to Xcode 26 on mac OS Sequoia (MBP M1 Max 32GB, 2021, so you know, still pretty decent and capable). Xcode is super slow on building, but also on editing. There is a lag between what I type and what is displayed. Am I the only one experiencing this? Is there something I should look into?
1
1
164
4d