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
663
Jul ’25
iOS 26.1 simulator prompting Apple ID login during XCUITest
Hello Apples, Noticed that after iOS 26.1 update the Xcode simulator seems to be prompting to login with Apple ID arbitrarily while working on some UI tests. This does not happen with previous iOS 26.0 or 26.0.1 but is now causing trouble when launching the app or uninstalling at teardown. The current other issue with the uninstallation being sticky and taking a long time (waiting for springboard to become idle) is not helping either. The dialog seems to appear a bit unreliably to be able to handle it correctly. Have tried both manual springboard dialog mapping and handling as well as an interruption monitor. The latter only seems to work for the first dialog which appears but then ceases to function so not much help… Anyone else seeing this and are there any knowledge or good workarounds? Or should we just roll back to testing with previous OS versions and cross fingers for iOS 26.2? Bottom line we cannot login with an Apple ID while running tests on a simulator… As bonus noticed the simulator background images are not working? Thanks! BR, ARu_ (Senior QE)
1
0
11
3h
Missing Context menu items in Xcode 26 on a fresh project
When following the official SwiftUI Tutorial "Landmarks", I should be able to Cmd-Ctrl-Click an element of a preview in Selectable mode to view a list of options. But Xcode shows only one option (Embed). Furthermore, if I try to type anything the popover breaks completely and grows in length infinitely. I am not sure whether this is a bug, or I missed something when installing Xcode, or both
1
0
21
5h
Using a local model for Xcode Assist
Hi, I'm interested in trying out Xcode Assist to help with things like complicated refactors or writing tests cases. The ChatGPT and Claude options both share your code with third parties, which is not acceptable for my use case. Has anyone used a fully local model for Xcode Assist? I see that you can select one in the Apple Intelligence section of Xcode's Preferences screen, but don't really know where to start. Are there local models that work well with Xcode Assist and that truly keep your source code private?
0
0
30
10h
Tunnel connection failed
Problem Many developers run into a persistent “Tunnel connection failed” error when trying to connect an iPad or iPhone for debugging. Even after reconnecting USB-C or Lightning and tapping “Trust This Computer” multiple times, the connection won’t establish. The issue isn’t on the Mac — it’s the iPad not activating its tunneled connection properly. What I discovered The iPad’s Developer Mode networking stack can become unresponsive. By enabling a few developer networking options and running the “Test Responsiveness” function, the system restarts the underlying network daemons and reopens the tunnel instantly. No reboot, no re-pairing, no resets required. Prerequisites iPad with Developer Mode enabled iPad and Mac on the same Wi-Fi network (or paired once via USB for trust) Xcode compatible with your iPad’s iOS version Steps to fix On your iPad, open Settings → Developer. Scroll to Networking and turn on: Network Link Conditioner → On Network Override → On Under the same Networking section, tap Responsiveness. Inside that menu, tap Test Responsiveness and let the test run until it finishes. This test measures network round-trip speed but also restarts the iPad’s internal networking daemons (mDNSResponder, configd, and developer_mode_agent). While it’s testing, the iPad re-broadcasts its service and reopens the tunnel port (62078). After the test completes, connect the iPad to your Mac (or keep it connected if it already is). On the Mac, open Xcode → Window → Devices and Simulators and check Connect via Network for your iPad. Wait 10–15 seconds. The iPad should appear with the small Wi-Fi icon — that means the tunneled connection is active again. You can now unplug USB if you want to continue wirelessly. Why it works Network Link Conditioner restarts the iPad’s network discovery services. Network Override ensures developer connections aren’t throttled or suspended. Test Responsiveness directly forces the iPad to re-advertise itself to usbmuxd and reopen the tunnel listener. Once the test completes, the Mac successfully establishes the tunnel handshake. Notes This method works even if VPNs or custom network profiles are active. If the tunnel fails again later, simply repeat Steps 3–4 (run Test Responsiveness) — it instantly repairs the connection. There’s no need to clear trusted computers or restart anything on the Mac side. The key is performing the Test Responsiveness action to wake the iPad’s developer networking stack. This fix has been 100% reliable for resolving “Tunnel connection failed” on iPadOS. Run the Responsiveness test, and the tunnel reconnects immediately.
0
0
12
1d
Xcode Simulator causes Mac audio crackling and distortion
[Submitted as FB20950954] Xcode Simulator causes crackling and distortion in audio playback across all apps (Apple Podcasts, Music, third-party). REPRO STEPS Open any audio app and start playback Note the audio quality Launch Xcode Simulator After a few seconds, note audio quality again Quit Xcode Simulator Audio returns to normal CURRENT Audio has crackling and distortion while Simulator is running. EXPECTED Clean audio playback regardless of whether Simulator is running. SYSTEM INFO macOS 26.1 (25B78) Xcode 26.1 (17B55) Simulator 26.0 (1058)
1
2
80
1d
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.
0
0
26
1d
Metal Debugger only captures static on XCode 16.2
I was encountering visual artifacts in my Unity game only on iOS devices and wanted to use the Metal Debugger to diagnose it. However, it seems to only capture static noise which is not helpful as shown below For reference, this is a frame of the visual artifact and also the location where I asked Metal to capture the frame Am I missing any settings in Unity/Xcode?
0
0
39
1d
Xcode 26.x Frequently Freezes During Breakpoint Debugging with Simulator
When I use Xcode 26 (0.1, 1) for debugging and hit a breakpoint, using "step over" causes the debugger to freeze at a random line of code. Clicking "Pause program execution" indicates that the line is being executed, but the breakpoint never exits, seemingly causing a freeze. The application on the simulator also becomes unresponsive. However, when I do not use breakpoints, my program runs smoothly, and debugging on a physical device does not cause any freezes. This issue only occurs with the simulator. I am using Xcode on Apple Silicon, and due to some third-party SDKs that depend on Rosetta, our app can only run on the Rosetta simulator. We did not encounter this issue when using Xcode 16.x for simulator debugging. The current situation with Xcode 26.x significantly reduces our development efficiency. What could be causing this, and is there a solution?
1
0
51
1d
XCode Update
Hi, I recently updated my Mac to macOS Sequoia 15.7.2, and then updated my Xcode packages right afterward. However, when I try to open Xcode, I receive the message: “You can’t open the application because it is being updated.” I contacted Apple Developer Support (software) by phone and went through their troubleshooting steps, but the issue persists. They confirmed that everything appears fine on their end. In System Settings, both macOS and Xcode show as fully up to date. However, when I manually check in the App Store, it says Xcode needs to be updated. When I press Update, I get the following error: “Xcode could not be installed. Please try again later.” I’m fairly new to Xcode, but it seems there may be an incomplete update or verification loop preventing the installation from finishing properly. Could you please advise on how to resolve this so I can open Xcode again?
0
0
45
2d
iOSSimulatorRuntime download failed - Bad request
Hello, I'm having issues trying to Install the iOS 26.0 + iOS 26.0.1 Simulator on Xcode 26.0.1. I'm getting this error Download failed as the server said it was a bad request. (Asset download for com.apple.MobileAsset.iOSSimulatorRuntime 39434c057e7b18d2f1447aeb47e9bb6b6dbff077) I have attached the full logs. Thanks xcode-error.txt
0
0
69
2d
My Mac (Designed for iPad) on M5 Powerbook won't run in Xcode26
prior to upgrading from an M1 to M5 I could run the Mac on iPad via Xcode After upgrading to a M5 I keep getting dyld[88241]: Library not loaded: @rpath/APP.debug.dylib Referenced from: <207ED9FB-3483-3063-B9BC-81EC3BCB34AF> /private/var/folders/54/cwf8kbhx48j71vk_z3zm0t_m0000gn/X/471D0939-4FD4-59C7-8DB5-641DB2A36911/d/Wrapper/App.app/App Reason: tried: '/Users/xxx/Library/Developer/Xcode/DerivedData/project-esgmvpqlktgtvldltqmcjtupefnh/Build/Products/Debug-iphoneos/App.debug.dylib' (no such file), '/usr/lib/system/introspection/App.debug.dylib' (no such file, not in dyld cache), ... bunch more path searching.. Runpath Search paths: $(inherited) @executable_path/Frameworks Runpath Search paths with inherited /usr/lib/swit @executable_path/Frameworks @loader_path/Frameworks @executable_path/Frameworks
0
0
15
2d
Xcode 26: `IDERunDestination: Supported platforms for the buildables in the current scheme is empty` repeatedly logged when running tests from `.xctestrun` file
We are seeing repeated occurrences of the following log line in test runs triggered via .xctestrun files on iOS 26: IDERunDestination: Supported platforms for the buildables in the current scheme is empty. This line is printed n number of times after a test fails, significantly increasing test execution duration (2–3 minutes extra in some cases). The issue does not occur when tests are built and run together from Xcode directly — it’s specific to .xctestrun-based executions using xcodebuild test-without-building. Steps to Reproduce: Use Xcode 26 to build a sample XCTest target (we used a simple UI test project). Locate the generated .xctestrun file under DerivedData/.../Build/Products/.... Run tests using: xcodebuild -xctestrun /path/to/sample.xctestrun \ -destination "id=<device_id>" \ test-without-building Observe the logs during test failure. Observed Behavior: The log line IDERunDestination: Supported platforms for the buildables in the current scheme is empty appears multiple times. The test cleanup and teardown phase takes significantly longer (2–3 minutes). Expected Behavior: The log should appear once or not at all. Test cleanup time should remain consistent. Additional Information: Affects only iOS 26 devices and .xctestrun-based runs. Not reproducible on iOS < 26. Xcode 26 and 26.x beta versions tried. Reproducible both locally and on CI systems using real devices. Same .xctestrun file, when used on older OS versions, does not cause delay.
0
0
14
2d
Crash and Hang diagnostics not returned on next launch in MetricKit (iOS 17.2 – 17.5)
The MXCrashDiagnostic and MXHangDiagnostic reports are not being returned via MXMetricManager on the next app launch in iOS 17.2, 17.3, 17.4, and 17.5. This issue prevents collection of crash and hang diagnostics through the MetricKit framework, which worked as expected on earlier and later (18, 26) iOS versions. Steps to Reproduce:- Integrate MetricKit in an iOS app using: MXMetricManager.shared.add(self) and implement: func didReceive(_ payloads: [MXDiagnosticPayload]) Install and run the app on a device running iOS 17.2 or later. Cause a crash or hang scenario (e.g., dereference a null pointer or block the main thread). Relaunch the app after the system terminates it. Observe the callback for diagnostic payloads. Expected Behavior MXMetricManager.shared.didReceive(_:) should be invoked on the next launch, returning diagnostic payloads that include MXCrashDiagnostic or MXHangDiagnostic objects. Actual Behavior: No diagnostics are returned on subsequent launches. didReceive(_:) is not triggered, or the diagnostic payloads array is empty. This behavior is reproducible across multiple devices and iOS versions (17.2–17.5). iOS Versions: 17.2, 17.3, 17.4, 17.5 Devices Tested: iPhone 14, iPhone 15 Pro Xcode Version: 15.2 / 15.3 Framework: MetricKit Diagnostic Type: Crash and Hang
1
0
34
2d
Xcode generates Info.plist on DEBUG builds even when told not to do so.
I still use my own Info.plist, and I run a script as the last step of my builds to modify the final built Info.plist to have information about the build, like date, machine, git build count, etc. Works fine on latest Xcode 26.0.1 for archive builds, but on DEBUG builds to an attached device Xcode overwrites my processed plist with a copy of the original unmodified build, unless I first do a Clean Build Folder. Any ideas on how to fix this? Annoying, but not critical
0
0
21
3d
`xcresulttool merge` broken on Xcode 26.1+
Opened a FB already (FB20928652) but wanted to check here if anybody has seen similar or has better workarounds. xcresulttool merge appears to crash immediately after launch in Xcode 26.1 (and in 26.2b1). It does so regardless of any inputs passed in; the crash appears to be during argument parsing before any other logic is run, so it's not contingent on inputs. Working example from 26.0.1 (passing in arbitrary strings for a minimum-reproducible-case, so we expect to see an error message) : % /Applications/Xcode-26.0.1.app/Contents/Developer/usr/bin/xcresulttool merge --output-path a b c Error: File or directory doesn't exist at path: b. Usage: xcresulttool <subcommand> See 'xcresulttool --help' for more information. The same example crashes in 26.1: /Applications/Xcode-26.1.0.app/Contents/Developer/usr/bin/xcresulttool merge --output-path a b c zsh: trace trap /Applications/Xcode-26.1.0.app/Contents/Developer/usr/bin/xcresulttool merge Again, this does crash in real use cases as well, the arbitrary strings are just for quick reproduction. The stack trace appears to be during argument parsing (which from a quick look, did indeed change between 26.0.1 and 26.1). On 26.1+, garbage data seemingly gets passed to AbsolutePath.init. * thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1 * frame #0: 0x00000001002c6748 xcresulttool-26.1`normalize(absolute:) frame #1: 0x00000001002c6438 xcresulttool-26.1`AbsolutePath.init(_:) + 28 frame #2: 0x000000010005a2c0 xcresulttool-26.1`Merge.run() + 372 frame #3: 0x000000010005b180 xcresulttool-26.1`protocol witness for ParsableCommand.run() in conformance Merge + 12 frame #4: 0x000000010011d3e4 xcresulttool-26.1`dispatch thunk of ReadableStream.close() + 16 frame #5: 0x000000010000148c xcresulttool-26.1`main + 156 frame #6: 0x00000001804d5d54 dyld`start + 7184 The only workaround we've found is to keep using 26.0.1's copy of xcresulttool, though that's obviously not ideal.
1
2
57
3d
Xcode intelligence data sharing policies
I'm working in a constrained environment where sending source is not an option if any part of it is stored in outside systems. However, I also have some projects which don't have these constraints which led me to these questions. Thanks! Can I disable intelligence per project or workspace? Is any project data sent if intelligence is enabled but I'm not typing any requests in the coding assistant? Is source/metadata persisted in any way when using the ChatGPT mode without an account?
0
0
17
3d
Xcode 26 / iOS 26 - XIB incorrectly references "HiraginoKakuGothic.ttc" causing build warnings
Hello, I'm encountering a persistent issue when building my project with Xcode 26 and iOS 26. The console shows errors related to font file references that don't actually exist in my project. GSFont: file doesn't exist - "file:///private/var/containers/Bundle/Application/...../HiraginoKakuGothic.ttc" After investigation, I found that the issue originates from XIB files incorrectly referencing HiraginoKakuGothic.ttc: <customFonts key="customFonts"> <array key="HiraginoKakuGothic.ttc"> <string>HiraginoSans-W3</string> </array> </customFonts> The problem appears to be triggered when setting UILabel fonts to "ヒラギノ角ゴシック W3 16.0" in Interface Builder, which causes the XIB to reference HiraginoKakuGothic.ttc. Interestingly, when I create a new project and use the same fonts ("ヒラギノ角ゴシック W3 16.0"), it does NOT automatically reference HiraginoKakuGothic.ttc. Here's what I've tried: ①Changed both UILabels' fonts to system font ②Verified in XIB Source Code that the .ttc references were gone ③Cleaned Build Folder ④Cleared DerivedData ⑤Restarted Xcode ⑥Set the labels back to "ヒラギノ角ゴシック W3 16.0" ⑦Checked XIB Source Code again - the non-existent .ttc references reappeared Even if I manually remove the customFonts references from the source code, they get regenerated as soon as I make any font changes in Interface Builder. I've also noticed that Xcode 16.1 has the same underlying issue, though it doesn't produce the console errors that Xcode 26 does. This seems to be a long-standing XIB issue, possibly related to reference caching. While new projects aren't affected, existing projects continue to maintain these incorrect references. My questions: How can I permanently resolve this issue in my existing project? What's the potential impact of these incorrect font references? Is there a way to clean up these cached references without affecting the rest of the project? Any insights or workarounds would be greatly appreciated. Thank you.
0
0
38
3d
Mapkit Tap quester - error , PLEASE HELP
Hello, I wanted to get the lat & lon where map is clicked/tapped but Gives Error on Tap onTapGesture "<0x10bf0....> Gesture: System gesture gate timed out" 2 out of 10 clicks it works , 8 times gives error Please help MapReader { reader in Map(position: $MapKit_Position_default , scope: mapScope) { //... } .onTapGesture(perform: { screenCoord in let pinLocation = reader.convert(screenCoord, from: .local) print("[OnTap]:\(pinLocation)") isLocationSetMarkerActive = true }) .gesture(SpatialTapGesture().onEnded { event in // Use event.location for the tap location print("[gesture]:Tapped location: \(event.location)") })
0
0
21
3d
iOS Simulator in Xcode 26.1 makes ReportCrash process run at 60-160% of CPU
My MBP M1 Pro gets really hot. iOS 26.1 Simulator in Xcode 26.1 makes ReportCrash process run at 60-160% of CPU shows Activity Monitor. MacOS 26.1. I've reported this via Feedback Assistant: FB20918609. Is there a way to quit this process permanently? When I Force Quit this it opens again immediately. Only way to stop it is to quit Simulator. But then again, I need to use the Simulator.
3
7
503
4d
Xcode 26.1 ChatGPT very slow
ChatGPT in Xcode 26.1 is super slow for me. What used to complete in a batter f seconds is now taking tens of minutes. Context: M2 Pro MBP, Xcode 26.1, macOS 26.1. CPU stays under 50% while ChatGPT returns. Using the minimal setting. Tried restarting, have verified I have nothing running Electron, no other apps are running. ChatGPT returns fast for the displayed content but the preview window where it renders code per line takes a few seconds per line.
16
11
479
4d