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
888
Jul ’25
Xcode Using 90GB with ~/Library/Developer — What Can I Safely Clean?
Hi everyone, I’m an iOS developer working on a Mac with limited storage (256 GB). I’ve noticed that the ~/Library/Developer folder is taking up almost 90 GB, mainly due to Xcode-related content. Inside it I see folders like: Xcode/DerivedData DocumentationCache iOS DeviceSupport UserData CoreSimulator/Devices Before deleting anything, I’d like to understand which of these folders are safe to clean up, and what the potential side effects might be (for example, rebuild times, simulator re-downloads, etc.). What is the recommended best practice to manage disk space when using Xcode on a low-storage machine? Thanks in advance for your help.
0
0
22
6h
something that's probably easy to fix but it's driving me crazy
hy! apple developer community! No, I have a problem that's driving me crazy: Multiple commands produce '/Users/giulia/Library/Developer/Xcode/DerivedData/ScheduledStudy-dcmmhcdncitvfkdditbjoipfalqg/Build/Products/Debug-iphonesimulator/singintestwidgetExtension.appex/Info.plist'. Can you help me fix it? I know it's probably stupid, but I've been trying to fix it for days. There aren't two info.plist file, and that's why I don't quite understand. If you could help me, you'd be doing me a favor. Thanks for your time. P.S. I'm sorry, but I'm just starting out with programming and I'm also quite young.
6
0
133
6h
Integration of other inputs to the Vision Pro
Hi, is it possible to integrate an out source input to the Vision Pro. What I want to achieve is, use a live video/ live feedback inside an application I'm developing, and present the video in a registered position in live space. If possible, does the input need to be from a specific type? are there other limitation for those kind of integrations?
0
0
33
11h
StoreKit Config file Options Grayed Out
I have a question concerning Xcode version 26. Ever since I installed this version on my Mac, I have been experiencing issues with the StoreKit configuration file. The Simulated StoreKit Failures check boxes and selections are all grayed out. Once in a while, I see a pop-up stating "The document 'TaConfig.storekit' could not be autosaved. The file has been changed by another application. The pop-up Save as... points to where my config file is located, but the config file is grayed out. I thought maybe the directory where the file is located is write protected, but I have been able to save other files to the same directory. The Edit Scheme... -> Run -> Options has the StoreKit Configuration set for my file TaConfig.storekit. It feels like there is an option somewhere that I'm missing.
2
1
180
1d
Xcode Interface Localization
I understand that mastering essential English skills is fundamental for developers. However, as a Chinese developer, having an IDE with a Chinese interface when encountering Xcode operational issues can absolutely make development work twice as effective with half the effort. A native-language interface environment allows us to focus all our energy on project development. Xcode exists as our development “tool” to facilitate our work, not as another knowledge point requiring study—which could waste significant effort. Don't let an interface turn our beloved tool into a burden. Translated with DeepL.com (free version)
1
0
157
1d
DYLD_PRINT_STATISTICS
Did DYLD_PRINT_STATISTICS stop working? I am using Xcode 26.0.1 and have tried it on several simulators and real devices, but am not getting any output. I haven't used this environment variable in a few years so don't know when it might have stopped working. Has it been superseded or replaced?
2
0
219
1d
Code Coverage Not Accurate in Xcode 26
Description: I’m noticing that the code coverage metrics in Xcode 26 are not accurate compared to earlier versions. In Xcode 15, the same set of unit tests shows around 38% coverage, but in Xcode 26, even though all the tests are running successfully (for example, the SegmentedUI test cases), the code coverage is displayed as 0%. Has anyone else observed this behavior in Xcode 26? Is there any known issue, workaround, or configuration change required to get the correct coverage report? Environment: Xcode 26 iOS 18 SDK Unit tests running under XCTest Any insights or suggestions would be appreciated.
2
4
392
2d
Xcode26.2构建的.a库,在Xcode16上运行正常。但是在Xcode13运行报错,报错内容如下:
Link EaseChat (arm64)34.1 seconds Undefined symbol:_objc_msgSend$appld Undefined symbo: objc msgSendssetisExitprocess Undefined symbol_objc_msgSendssetisWaitingLoginRoom: Undefined symbol_objc-misgSend$sleepForTimeinterval: Undefined symbol: objc_msgSendsisunsetting Undefined symbol: _objc_msgSend$subpathsAtPath:Untdetme vmbol!-sbie-miesentetoue yarp orse urityap icationtrou dent Undefined symbol: _obic-_msgSendsURLByAppendingPathComponent:isDirectory:Unerined symhol.-sbie- masindtereas pretory atlgtryohininronetate brectort Undefined symbol: -obic-msgSendScreatezegoReplayKitshareLogDirtNeedUntef nes ymhteo!-otbie-mesentdera otieton baevetr Undefined symbol: Undefined symbol: obic msssendsbolForkey: Undefined symbol:_obic_msgSendsintegerForkey: Undefined symbol:_objc_msgSendsnumberwithinteger: undefined symbol:_objc_msgSendsisWaitingLoginRoom Undefined ymbal!. sbic.-massendsgrevareteplay yecodayr_objc-_msgSendsprepareReplayLiveCapture Undefined symbol:_objc_msgSendssetConfig: Undefined symbol: -objc-ImsgSend SvidedEncodeResolutioUndefined symbol:_objc_msgSendssetRoomConfig: Undefined symbol:_objc_msgSend$roomapi undefined symbol: objc_msgSendssetUseriD: Underfined symbolt obic-massendssetLogintoken Undefined symbol_objc-_msgSendsmyUserDefaults2 Undefined symbol: -objc- msgSendstringForkey:SUundefined symteal -sbie-nasentesarcstrinatmoctenath entcadings ant
1
0
54
2d
DerivedData on external drive breaks framework tests
Xcode, under Settings → Locations → Derived Data, lets us set a custom DerivedData location (such as on an external drive). Trying that, I discovered that this breaks the test system for Framework targets (and probably other types of test targets when not hosted in an app target) when the run destination is “My Mac”. This seems to be due to sandboxing (but this is not entirely clear). Xcode does not provide a warning about this limitation, and does not seem to offer a way to open sandbox access to an external volume(s). Instead, trying to run such tests results in a bunch of error messages in the console log that I did not find helpful in trying to diagnose what went wrong: Cannot find executable for CFBundle 0x86c47c2a0 </Volumes/external/Xcode/DerivedData/Build/Products/Debug/MyFrameworkTests.xctest> (not loaded) The bundle “MyFrameworkTests.xctest” couldn’t be loaded because its executable couldn’t be located. Try reinstalling the bundle. Program ended with exit code: 9 The solutions seem to be either run tests from the command line (to escape sandboxing), or just use the default DerivedData location (and accept its impact on the internal drive’s limited space).
0
0
15
2d
"Failed to install or launch the test runner" error
We have multiple Jenkins jobs running UI Tests on a Mac with a device attached. This works most of the time but sometimes the tests don't run and the xcreport generated has an error like: BCOVBRDCoverageUITests-Runner encountered an error in BCOVBRDCoverageUITests failed with: Failed to install or launch the test runner. (Underlying Error: Failed to create directory on device 'Brightcove's iPhone 14 Plus' (00008110-000C54912246401E) to hold runtime profiles for application with bundle ID 'com.brightcove.BCOVBRDCoverageUITests.xctrunner': (null). (Underlying Error: The system failed to get the path on the remote device for the provided domain. (Underlying Error: The connection was interrupted.))) Has anyone else run into this? Any ideas on how to get around it? Kicking off another job after seeing this behavior works fine. The failures seem to be random or we haven't noticed a pattern yet.
1
1
658
2d
Xcode 26 swiftmodules are incompatible with Xcode 16
I am developing a binary SDK for consumption by others. When we updated to Xcode 26, any builds which are generated cannot be consumed by Xcode 16. The specifics lie in the optionals. The following Swift code generate a .swiftmodule func affectedApi() -> Int? { return 1 } In Xcode 16 it generated the following .swiftmodule in the framework. public func affectedIntApi() -> Swift.Int? In Xcode 26 it adds an "if" statement. #if compiler(>=5.3) && $NonescapableTypes public func affectedIntApi() -> Swift.Int? #endif That if statement prevents Xcode16 from seeing the API, and it causes compile failures. This happens regardless of which Swift version is used, and it only affects functions which use Optionals. Is there a way to prevent the compiler from wrapping the API in that statement?
2
0
55
2d
Xcode Crashes when viewing XCUITest Result
I've been working on UI Tests for a month or two and things have been great. But I believe there was a recent update to Xcode [running Version 26.2 (17C52)] and since then about 80% of the time when I try to view the test results so I can see the screenshots and video, Xcode crashes hard and I have to open it again. I've tried cleaning the Build folder and Derived Data and all sorts of stuff like that. Restarted Xcode, restarted my computer, etc. Any idea of how I can avoid these crashes?
3
1
166
3d
Xcode 16 issues with mac virtualisation
I have created a virtualised Mac machine where I am running the latest Xcode version 16.4 with macOS Sequoia as the base image. While running XCTest tests, I am observing a clear difference in behaviour between virtualised and non-virtualised setups. Below is the command I am using to run the tests: /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -xctestrun /Users/ltuser/290103613/xcui.xctestrun -destination "platform=iOS Simulator,id=79A5F8CC-4A2E-4C91-895D-AE97E25CB824,arch=arm64,OS=18.0" test-without-building "-only-testing:ClassName/MethodName/testName" -derivedDataPath /Users/ltuser/290103613/Archive -verbose IDELogLevel=debug IDETestLogLevel=debug ONLY_ACTIVE_ARCH=YES Observed Issue On virtualised hosts: Every XCTest is executed twice This happens for both passed and failed tests The behaviour is consistent across all virtualised machines On non-virtualised (bare-metal) Macs: Tests execute only once, as expected Debugging Steps Taken Multiple destination suspicion Initially, I noticed the following warning: --- xcodebuild: WARNING: Using the first of multiple matching destinations: { platform:iOS Simulator, id:0FFB9082-94AB-4D0A-A731-CC4452BDD4E7, OS:17.0, name:iPhone 15 } { platform:iOS Simulator, id:0FFB9082-94AB-4D0A-A731-CC4452BDD4E7, OS:17.0, name:iPhone 15 } This raised suspicion that tests might be running twice due to multiple matching destinations. Destination narrowed down I then explicitly restricted the destination to a single simulator UDID, after which: The warning disappeared However, the issue still persists Tests continue to run twice on virtualised hosts Version Comparison Xcode 16.4 + macOS Sequoia (virtualised) → Tests run twice Xcode 15.x (same setup otherwise) → Tests run once Questions Has anyone else faced this issue with Xcode 16.x on virtualised macOS? Is this a known issue with Xcode 16 + Virtualisation? Is there any recommended workaround or configuration change to avoid duplicate test execution? I am currently blocked on this issue and would appreciate confirmation on whether this is an Xcode or virtualisation-related problem. Thank you.
1
1
68
3d
ISO 14443-4 Reading issue
I am working with a Texas Instruments RF430 NFC tag, which is compliant with: ISO/IEC 14443-4 (ISO-DEP) NFC Forum Type 4 Tag NFC-B protocol NDEF-formatted storage I’m using an iPhone 12 running iOS 18, and my app uses the Core NFC framework. Using NFCNDEFReaderSessionDelegate, I am able to successfully read the first NDEF message from the tag. However, the tag stores multiple NDEF messages, and I would like to access the others. Based on the tag’s specification, these messages are accessible via an NDEF file located at file ID 0xE104. To try and access this additional NDEF file, I attempted to use NFCTagReaderSession with the NFCTagReaderSessionDelegate, intending to issue APDU commands. However, the tagReaderSession(_:didDetect:) delegate method is never called, even though the tag is present and detected using NFCNDEFReaderSession. My questions: Does Core NFC on iOS 18 support issuing custom APDU commands to ISO 14443-4 (NFC-B) tags like the TI RF430? Is the use of NFCTagReaderSession with NFC-B fully supported for tags that implement ISO-DEP (even if they are NDEF-formatted)? Is there any known limitation or configuration required to ensure tagReaderSession(_:didDetect:) is triggered for NFC-B/ISO-DEP tags?
3
0
290
3d
Help: Compiled Timeline Issues
I have developed a fun living diorama world using Reality Composer Pro and XCode. Everything is as it should be, and it looks/works great ... until it does not. If I seem to make any change to any of the 10 timelines that I am using (all on the same scene, no nested scenes), running the app in simulator, device, and via testflight throws errors around compiled timelines, leading to the black screen of death. Every time I clean and run, the timelines in questions might change. Its very frustrating and impossible to track down. Heres are some examples. AssetLoadRequest failed because asset failed to load '/ (3661553931319769725 Timeline (RealityFileAsset)URL/file:///var/containers/Bundle/Application/F4408256-6014-4264-9E4B-F74AEF0EDE53/SantasVillage.app/RealityKitContent_RealityKitContent.bundle/RealityKitContent.reality/Timeline_779.compiledtimeline)' (failed to register asset) Asset / (13631856135570808851 AnimationLibraryAsset (RealityFileAsset)URL/file:///var/containers/Bundle/Application/F4408256-6014-4264-9E4B-F74AEF0EDE53/SantasVillage.app/RealityKitContent_RealityKitContent.bundle/RealityKitContent.reality/AnimationLibraryAsset_1.compiledanimationlibraryasset) failure: failed to register asset Asset 10430065658338454790 AnimationScene (RealityFileAsset)URL/file:///var/containers/Bundle/Application/F4408256-6014-4264-9E4B-F74AEF0EDE53/SantasVillage.app/RealityKitContent_RealityKitContent.bundle/RealityKitContent.reality/AnimationScene_14.compiledanimationscene failure: failed to register asset I went with recommended fixes of closing RCP > Clean Build Folder > Delete Derrived Date (multiple ways) > Re-Open Xcode > Reset Package Cache > Re-Open RCP via XCode > Make a Change > Save > Clean Build Folder Again > Run. Sometimes it works. Most times it does not. I then found my own little work-around, but its not always working as is literally costing me days of wasted time messing around with this. I will DISABLE all timelines, do the above clean method, rerun with no timelines, and it resolves. Then, turn on timelines ONE BY ONE and run until I get another error. Then, rebuild that timeline and nothing else. This is not sustainable. There must be some better way to do this? Or, perhaps I am doing something wrong? Please help if you can.
3
0
206
4d
Unable to download iOS simulator runtime 26.x on Xcode
Hi everyone, I'm experiencing a persistent issue for months now where I'm unable to download the iOS 26 simulator Runtime. I've tried reinstalling Xcode and also Xcode Beta but same issue. iOS 26 Simulator is also not on developers download page, so manual installation is impossible. And sadly I can't compile any code without having iOS 26 simulator installed. Anyone able to get passed this? Hardware: M1 Pro OS: Tahoe 26.1 Heres the error Download failed. Domain: DVTDownloadableErrorDomain Code: 41 User Info: { DVTErrorCreationDateKey = "2026-01-07 11:35:35 +0000"; } -- Download failed. Domain: DVTDownloadableErrorDomain Code: 41 -- Failed fetching catalog for assetType (com.apple.MobileAsset.iOSSimulatorRuntime), serverParameters ({ RequestedBuild = 23C54; }) Domain: DVTDownloadsUtilitiesErrorDomain Code: -1 -- Download failed due to not being able to connect to the host. (Catalog download for com.apple.MobileAsset.iOSSimulatorRuntime) Domain: com.apple.MobileAssetError.Download Code: 60 User Info: { checkNetwork = 1; } -- System Information macOS Version 26.1 (Build 25B78) Xcode 26.2 (24553) (Build 17C52) Timestamp: 2026-01-07T12:35:35+01:00
2
0
187
4d