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
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?
3
0
120
9h
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.
4
2
101
1d
Build/Archive failure in Xcode 16.2 after updating macOS to 26.2
We are encountering a build and archive failure in Xcode after updating our development machine to macOS 26.2. Environment: macOS: 26.2 Xcode: 16.2 iOS Deployment Target / Runtime: iOS 18.5 App Type: Production iOS app (App Store distribution) Issue: Before updating macOS, the project built and archived successfully. After the macOS 26.2 update, archiving fails consistently, even though no major changes were made to the project code or configuration. Certificates, provisioning profiles, and signing settings are correctly configured. The issue appears to be related to the macOS/Xcode environment rather than application logic. Steps to Reproduce: Open the existing iOS project in Xcode 16.2. Select the App Store distribution scheme. Attempt to Archive the project. Archive/build fails. Expected Result: Successful archive allowing upload to App Store Connect. Actual Result: Archive fails after macOS 26.2 update. Additional Info: This post is linked to Apple Developer Technical Support Case-ID: 18413014.
1
0
35
2d
XCode: cannot pair devices
Since upgrading to a new Mac I have been unable to pair XCode to devices using the Devices and Simulators window. When I press the + button I get 'no devices found'. I have a second Mac which works as expected. When I try 'xcrun devicectl list devices' the phone I've connected shows up with limited information and is 'unavailable'. If I run 'sudo xcrun devicectl list devices' then I get a message telling me not to run xcrun as root but also the full information about the phone as expected, plus it shows the status as 'available (paired)'. So the device seems to be defined with root privileges but XCode is not. I am running XCode 26.2 but this issue has been around since 26.0. Any suggestions welcome.
1
0
82
2d
Xcode Simulator error
Following is an error I encounter when trying to run a foundation model function in simulator. Error Domain=FoundationModels.LanguageModelSession.GenerationError Code=-1 "(null)" UserInfo={NSMultipleUnderlyingErrorsKey=( "Error Domain=ModelManagerServices.ModelManagerError Code=1026 "(null)" UserInfo={NSMultipleUnderlyingErrorsKey=(\n)}" )} Its a swift playground I'm building in xcode and works fine in the preview and on a real device too but since it's my submission for the swift student challenge I need it to run on the simulator. I have updated my macOS to latest version of Tahoe(26.3) and Xcode is also on latest version. The simulator I run the playground is also on ios and iPadOS 26. I have set my region to US and have turned on Apple Intelligence on my mac too. Any suggestions on how to fix the issue?👾
1
0
39
2d
Are there workarounds for these bugs in Xcode?
Are there workarounds for the following bugs in Xcode 16.3? I'm looking for workarounds instead of trying newer versions of Xcode because, from what I read, the Xcode release notes do not mention these issues being fixed. First bug: Resizing a NSSplitView in the UI Editor is buggy. When you try to use the divider, it just does not work as expected. In the case of a vertical split, the bottom view gets shrunk whatever you try to do. Second bug: When you type: (IBAction) in the source editor, you get the following buggy template (extra ')' on the right): - (IBAction)<#selector#>:(id)sender)
3
0
64
2d
Can not delete "Other installed Platforms"
I recently found out that my System Storage is at about 200GB. I checked my XCode and found these "ohter installed platforms" (screenshot1). I can delete them there but as soon as I restart my computer, they will show up again. I found the folder /System/Library/AssetsV2/com_apple_MobileAsset_iOSSimulatorRuntime which uses 75GB and Im pretty sure that these simulators are the ones in XCode. This folder doesnt change a bit when I delete the simulators in Xcode. I cant delete the folder because of permissions... anyone an idea? Btw: 200gb systemdata of 500gb seems pretty miserable. Kind regards
2
0
41
2d
Xcode Cloud is unable to connect to the repository
Hello, I am trying out Xcode Cloud for the first time. I could connect to Github in the initial setup and had a few failed builds (package resolution error), which I resolved fairly quickly. Now whenever I am trying to build, I get the following error: Xcode Cloud is unable to connect to the repository “<respository-name>”. Reconnect the repository to resume builds. I am unable to remove the connection from settings as well because it's stuck in a loading state. Is there a way to fix this?
18
4
11k
2d
Q&A Summary for Code-along: Experiment with coding intelligence in Xcode 26
We received many great questions from the community during Code-along: Experiment with coding intelligence in Xcode 26. Here are the highlights from the questions submitted by the audience during the event. What models does coding intelligence features support In Xcode? Xcode integrates directly with ChatGPT and Claude user accounts. You can also configure Xcode to integrate any model provider that supports the Chat Completions API, such as models that you access with an API key. You can also download and run a local model on a Mac with Apple silicon. Setting up coding intelligence provides all of the information you need to get started with Xcode’s direct integration with ChatGPT and Claude, as well as how to set up Xcode to access other providers. Does Coding Intelligence have access to Apple API and developer documentation? How does it stay up to date with the latest SwiftUI API? Coding agents are great because they talk to a model, generate code and fix errors, but they also have access to tools, which make a significant difference in their capabilities. Xcode provides tools for the agent to use, including the ability to search Apple’s documentation and, code snippets. As an example, you can ask for a new API that was released in iOS, and if the model doesn't have this knowledge, the agent will call the tool to search for the documentation and bring that context into the conversation. As an organization, we do not have permission to share our codebase with any AI model due to security reasons. If we enable coding intelligence and give it access to our codebase, will the code be shared with Apple? Will OpenAI or Anthropic have access to my entire project? Privacy is fundamental to our design. When you connect an AI subscription account (like an account with OpenAI or Anthropic), the connection is only between you and that service. Apple does not act as an intermediary, and never sees the code sent to these services. Because this interaction happens directly between the you and your provider, the security and privacy of your code is determined entirely by your existing agreement with your provider. What exactly does the agent have access to? Only the files in the scope of the project? By default, the agent works in the directory of your project, and can access all files in that directory. This includes code file, assets, and your Xcode project configuration file. Does coding intelligence remember previous conversations? Each time you start a new conversation window, it resets the context of the conversation, but you can always go back to a previous conversation you had and continue and iterate on a previous idea. If a result contains errors or did not go in a direction you are happy with, you can use the history to go back to any point in time. Writing code with intelligence in Xcode goes into detail on how you can use these features. For command-line tools (Claude Code, OpenAI Codex), I can create guidelines as Markdown with rules or project descriptions. Does Xcode Agentic Coding take these into account, or should I define them differently? You can add skills that you’ve created, hints about Xcode and your project to configuration files, and other files supporting your use of coding intelligence such as AGENTS.md or CLAUDE.md files, to the respective Codex and Claude Agent directories that Xcode uses exclusively: ~/Library/Developer/Xcode/CodingAssistant/codex ~/Library/Developer/Xcode/CodingAssistant/ClaudeAgentConfig For more information on configuring agentic coding tools that run inside Xcode, see Customize the Codex and Claude Agent environments. How do you add a Model Context Protocol server for the Xcode agent to be able to access? You can add additional Model Context Protocol (MCP) servers in Xcode with product-specific configuration files so the agents can use those MCP servers from within Xcode. Locate the files needed to configure those additional MCP servers in the same directory where you set other customizations for Codex or Claude Agent, listed above.
0
0
35
3d
AVP, Developer Strap v2, Ethernet connection and Xcode
Hi, I wonder if there's something that can be configured to force Xcode (and preferably MVD too) to use Ethernet connection between Mac Mini and Apple Vision Pro (over a USB hub, not a direct USB connection)? If I connect AVP to Mac directly via USB, the bridge gets created and both MVD and Xcode default to it, which is great because of higher speed and lower latency. My problem is that I work with external camera, so I can have either the camera, or the Mac connection, but not both. I tried to solve that by plugging in a small active USB hub, so the strap and camera are connected to it, plus it has Ethernet adapter, which is plugged into Mac port. I tried with internet sharing on Mac - AVP has internet access, I can ping AVP from Mac, but Xcode and MVD still use wifi. I tried to manually configure bridge without internet sharing - same effect. I tried to make the bridge highest priority connection - nothing changed. I tried to force routing to AVP IP over the bridge - nothing (and it seems that my routing entry went missing after some time and was replaced by "use wifi interface"). So - is there something more I can do to make at least Xcode go over the cable? Debugging over wifi often takes forever.
0
0
22
3d
Place an app on a family device
I had a free developer account and now have a paid account. I can now install unlimited number of apps on my personal devices. I want to install more than 3 apps on a device of a family member. The device of this member has been registered under Certificates, Identifiers & Profiles. When I try to install apps with xCode on this family device I still get the message that I reached the limit of 3 apps (free account). By signing & capabilities I use the paid account as team. I have deleted all the apps on that device where installed with the free account, restarted the device and restarted xcode but the problem still exists.
0
0
34
3d
Apple Intelligence cant change Xcode build target...?!
› It is reasonable to assume Xcode AI integration means AI being able to change the build target... “Why can Xcode Intelligence see source files but not .xcodeproj/project.pbxproj for direct edit?” “Is this a known limitation/bug in Xcode 26.3 RC Project Context or MCP Xcode Tools?” “Any required entitlement/setting beyond Intelligence > Xcode Tools for build-setting edits?”
2
0
33
3d
App alternative icon not working when archieve.
I add the following info in the build settings of my app. Then I also add the icon to my asset. I build the app, it works normally, but I notice that when I changed the icon to 'AppIcon-Defaults', The icon change alert didn't appear. but it succeeds . I uploaded the archive to App Store I got: ITMS-90895: Missing Icon - The Info.plist key CFBundleIcons.CFBundleAlternateIcons contains an entry “AppIcon-Defaults” that references asset “AppIcon-Defaults.” No such asset is present in the asset catalog. Then I use xcrun --sdk iphoneos assetutil --info Assets.car to check the assets inside the archieved app, It have the asset.
3
1
560
3d
App freezes when running in Rosetta simulator on Xcode 26 (works on device and ARM simulator)
Hello, We are experiencing a recurring issue when running iOS apps in the Rosetta simulator on Xcode 26. Environment: Xcode: 26.0 macOS: 15.7.3 Simulator: Intel-based (Rosetta) simulators Languages: Both Swift and Objective-C Issue: When launching an app in a Rosetta simulator, the app frequently freezes or fails to run. In many cases, Xcode reports that the debugger has lost connection. Xcode error message: Lost connection to the debugger on “iPhone 12”. Domain: IDEDebugSessionErrorDomain Code: 22 Failure Reason: Message from debugger: lost connection Console log: assertion failed: GPR thread_set_state is unimplemented for NewThread (ThreadContextRegisterState.cpp:920 host_gpr_state_from_guest_state) Observed behavior: Rebuilding after fully quitting the simulator sometimes resolves the issue temporarily. Disabling Scheme > Run > Debug executable allows the app to run normally, but debugging (breakpoints, etc.) becomes unavailable. The issue does not occur: On real devices On ARM-based simulators When building with Xcode 16 using Rosetta Has anyone encountered this issue with Xcode 26 and Rosetta simulators? Is this a known bug, and are there any recommended workarounds besides disabling the debugger or restarting the simulator? Thank you in advance for any insights or guidance.
0
0
29
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!
1
0
84
3d
Simulator since XCode update completely broken
Since one of the last updates of XCode, there are two very annoying bugs in the simulator that just don't get fixed. What's going on Apple? You kill my productivity. There is a red bar reading "rdar" and some numeric string at the top. You can get rid of it by going to Settings -> Developers -> Zoom -> Larger Text (then change it back). Took a while to find that. I have a German laptop with a QWERTZ keyboard layout. Now when I type, it somehow sends keys from an US keyboard to the simulator. Since I don't have the labels, I don't know what the hell I'm typing. Very frustrating. Please fix this.
3
0
62
4d
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?
7
4
705
4d
Localizing NSAlarmKitUsageDescription
I've added NSAlarmKitUsageDescription to Info.plist and InfoPlist.xcstrings. The localized string is being used when I run the app, but Xcode is marking the string as "stale" in InfoPlist.xcstrings. This doesn't occur for any of the other UsageDescription strings in our app, such as NSPhotoLibraryUsageDescription and NSSiriUsageDescription. This occurs in both Xcode 26.2 and Xcode 26.3 RC. Is this a known issue? Should I just mark the string as being managed "Manually" instead of "Automatically" to make the warning go away?
1
0
33
4d