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
520
Jul ’25
Error trying to connect to LM Studio running on another Mac
I have Xcode 26 on one Mac, but LM Studio running on another. LM Studio does not have an api key so I have provided "dummy-api-key" but whenever I try to connect, it gives the error "Models could not be fetched with the provided account details" I have the IP and port (1234) of LM Study The server in LM Studio is running. Has anyone got this to work? And if so, what details did you enter?
1
0
18
2h
Xcode 16.x crashes immediately on launch - MacBook Pro 15,4 mid-2019
Hardware & OS: MacBook Pro 15,4 (mid-2019) macOS 15.7 (24G222) Apple Hardware Diagnostics: Passed (ADP000) Xcode crashes on every launch attempt with identical CoreSimDeviceIO framework failures. This started after an automatic Xcode update and affects multiple Xcode versions. Versions tested (all crash identically): Xcode 16.0 (26.0/24228) Xcode 16.4 (23792) *Unable to download Xcode 15.4 due to my ios Crash signature: Exception Type: EXC_BAD_ACCESS (SIGKILL Code Signature Invalid) Crashed Thread: 0 (main thread) Crashing Framework: CoreSimDeviceIO.framework Termination Reason: CODESIGNING, Code 2 Invalid Page Troubleshooting completed: Multiple fresh Xcode downloads from Apple Developer portal Security database rebuild and SystemPolicy reset Complete macOS clean reinstall Developer tools reset (xcode-select) NVRAM reset Hardware diagnostics (passed) Additional problem: macOS compatibility enforcement prevents installing Xcode 15.x as a workaround, showing "update to latest version" errors even for properly downloaded older versions. Current status: Unable to perform iOS development. Bug report submitted to Apple (FB# FB20308027). Has anyone with similar MacBook Pro hardware (mid-2019) encountered this? Any successful workarounds for the CoreSimDeviceIO crash or compatibility enforcement blocks? Is there something that I am missing?
1
0
22
2h
Xcode autosave issue
Lately, I keep getting this warning when closing Xcode asking if I want to save the changes. Strangely enough, I have never received this before. I looked to see if I could disable and enable autosave. Unfortunately I have not found anything. Does anyone have any tips?
3
1
1.1k
5h
Can´t access Swift classes in a C++ wrapper
(Related to Feedback FB20304546) I´m having problems trying to use the C++ integration to Swift. I´m tring to create a C++ wrapper for a Swift class. I followed the instructions in the "Mix Swift and C++" video and other resources, but I can´t see the Swift class in my C++ code. I´ve had many problems finding where the generated header is, and how to check the right way to call the symbols in a library. The code is in the Feedback assistant, but if somebody knows more references such as the previous one that I can read, I´ll check... Any help will be much appreciated.
0
0
28
6h
iOS 26 Share Extension error
I get an error when using Share Extension to share images in iOS 26. It works fine in iOS 18. The error message is: Error acquiring assertion: <Error Domain=RBSAssertionErrorDomain Code=2 "Could not find attribute name in domain plist" UserInfo={NSLocalizedFailureReason=Could not find attribute name in domain plist}>. What should I do? My plist file looks like this: NSExtension NSExtensionAttributes NSExtensionActivationRule NSExtensionActivationSupportsImageWithMaxCount 1 NSExtensionMainStoryboard MainInterface NSExtensionPointIdentifier com.apple.share-services
1
0
42
6h
ChatGPT in Xcode 26 not recognizing Plus subscription
Hi all, Has anyone else run into this issue in Xcode 26? I’m logged into my paid ChatGPT Plus account, but the Xcode integration doesn’t seem to recognize the subscription. After a short period of use, I get the following error: “Over daily limit. ChatGPT in Xcode will be unavailable for up to 24 hours. For higher limits, sign in with a paid ChatGPT account.” Since I’m already signed in with a paid account, this looks like either a bug or a limitation specific to Xcode. Is this expected behavior, or has anyone found a workaround to make Xcode properly recognize Plus accounts? Thanks in advance for any guidance.
15
7
441
9h
Cant add files to ios simulator
xcode 15.2, mac m2 mini, 14.2.1 sonoma i need a pdf file to stage my app for screen shots for the market. icloud wont sync, cant drag files to the home screen or any screen, it just does not work. i am at the end of my rope here, i just need some screen shots, my app is approved and ready am i wrong>? is there a way to do this or is it just broken now in the name of (lazy) security? edit--the more i read the more i angry and frustrated i get. this is broken and will not be fixed. i need to just workaround via email. so happy my second 100 dollar developer subscription bill is coming up!
3
4
2.6k
9h
xcodebuild - xcresult equivalent for the build action?
I just discovered xcresulttool - provided with the Xcode Command Line Tools. It does an amazing job generating a JSON report of warnings/failures. The tool requires a xcresult file path - my issue is that xcodebuild build does not produce an xcresult file so I can't find a way to generate a similar report for that action. My use case is simple - in my CI job, I want to report back on specific failures during builds and tests. I run xcodebuild build-for-testing and then later xcodebuild test-without-building. If there is a failure during the test phase, I can easily parse the issues from the JSON report in xcresult. However, if there is a failure during build, there is no result file to parse from. What is more confusing is that if you run xcodebuild test (build and test in one command) compilation errors are put in the xcresult file and you can read them just fine with xcresulttool. Is there any way to get a failure report from xcodebuild build actions without parsing stdout/stderror? I am aware of 3rd party tools such as xcpretty or xcbeautify - I would like to avoid anything that requires parsing the output.
0
0
39
11h
Building mac app on Xcode 15 and Tahoe icons
I’m still using Xcode 15 to build my mac apps. My icons use the rounded rect style but Tahoe still wraps them in its own rounded rect (even when I use the official Sketch template (1)). I made an .icon with Icon Composer and added it to my project. When building in Xcode 26, that works fine: It uses the .icon in Tahoe and the .icns in older systems. But: I need to compile my app with Xcode 15 (need supports for older MacOS). Xcode 15 doesn’t know about the .icon files and so it ignores them. So I have two questions: How does Tahoe check if it can use the .icns files as is or when it needs to add the rounded rect? Is there a way to make the .icon files work in Xcode 15? (1) It works when the icon has an opaque background. But when adding a slight alpha, it doesn’t. Same file, same setting otherwise.
3
2
188
11h
iOS 26 Share Extension error
I get an error when using Share Extension to share images in iOS 26. It works fine in iOS 18. The error message is: Error acquiring assertion: <Error Domain=RBSAssertionErrorDomain Code=2 "Could not find attribute name in domain plist" UserInfo={NSLocalizedFailureReason=Could not find attribute name in domain plist}>. What should I do? My plist file looks like this: NSExtension NSExtensionAttributes NSExtensionActivationRule NSExtensionActivationSupportsImageWithMaxCount 1 NSExtensionMainStoryboard MainInterface NSExtensionPointIdentifier com.apple.share-services
0
0
50
13h
Xcode 26 Beta 3: missing Metal Toolchain
Hello community, After unable to use Metal Toolchain for Xcode Beta 1 and 2 even after following the workarounds, and using Xcode Beta 3, I am still unable to use the downloaded Metal Compiler on my device. Building any project with metal file results in warning: Could not read serialized diagnostics file: error("Failed to open diagnostics file") (in target '<target>' from project '<project>') error: error: cannot execute tool 'metal' due to missing Metal Toolchain; use: xcodebuild -downloadComponent MetalToolchain Command CompileMetalFile failed with a nonzero exit code Here is my build environment, $ xcodebuild -version Xcode 26.0 Build version 17A5276g I have also checked the downloaded metal toolchain. $ xcodebuild -downloadComponent metalToolchain -exportPath /tmp/MyMetalExport/ 2025-07-13 13:16:17.293 xcodebuild[2153:34019] IDEDownloadableMetalToolchainCoordinator: Failed to remount the Metal Toolchain: The file “com.apple.MobileAsset.MetalToolchain-v17.1.5276.7.3KEJwX” couldn’t be opened because you don’t have permission to view it. Beginning asset download... 2025-07-13 13:16:17.427 xcodebuild[2153:34022] IDEDownloadableMetalToolchainCoordinator: Failed to remount the Metal Toolchain: The file “com.apple.MobileAsset.MetalToolchain-v17.1.5276.7.3KEJwX” couldn’t be opened because you don’t have permission to view it. Downloaded asset to: /System/Library/AssetsV2/com_apple_MobileAsset_MetalToolchain/47af11e2964f385d510c6a9d1a49c8165f334a51.asset/AssetData/Restore/022-19457-052.dmg Beginning asset export... Done exporting: /tmp/MyMetalExport/MetalToolchain-17A5276g.exportedBundle Done downloading: Metal Toolchain 17A5276g. The ExportMetadata.plist has a buildUpdateVersion of 17A5276g. Any suggestions are greatly appreciated.
1
2
263
15h
Developer Mode option not visible in iOS device Privacy & Security section
Developer Mode option is not visible in Privacy & Security section. Always invisible in Privacy & Security section after iOS 18.6 upgrade. I have done the reset iPhone and clear data many times but same issue i am getting in iOS device. Note* - When we plug the iPhone in Mac system using wire i did receive the message like - 'Trust the system'. How to show the developer mode option in iOS device? Kindly suggest.
2
0
79
16h
Failed to find a DDI
Hello! When launching/debugging on my iPad and iPhone I keep getting the following error: “Previous preparation error: Failed to find a DDI … Run ‘devicectl list preferredDDI’ …” I believe this was caused by a previously interrupted Xcode update around June due to low disk space, which may have left DeviceSupport/DDI/CoreDevice files incomplete. Even after finishing the update later, the error persists. I now use a new Mac with 4 TB of storage, but the issue still occurs. Since then I have unfortunately been blocked from testing or presenting my app on devices. It seems that only a new, fully completed Xcode update might resolve the problem. Tried so far: – Cleared caches (CoreDevice/Devices) – Reset trust on device and re-paired – Checked devicectl list preferredDDI I would really appreciate guidance, as at the moment I cannot present my app due to this blocking issue. Thank you very much for your support!
8
1
315
17h