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
663
Jul ’25
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
0
0
8
1h
Xcode 26.1 ChatGPT very slow
ChatGPT in Xcode 26.1 is super slow for me, anyone else? The response returns quickly but the preview window takes a few seconds per line. What it used to do in a few seconds on 26.0 now takes tens of minutes. Anyone else running into this and have suggestions? I'm using the minimal setting on a fast internet connection. M2 Pro MBP, macOS 26.1.
1
2
67
1h
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
28
6h
Xcode 26.1 RC issue
I'm seeing a lot of unexpected CPU usage when running the iOS 26.1 simulator. Looks like a "MercuryPosterExtension" is crashing over and over, which then causes the "ReportCrash" process to run, presumably to create the crash report. Doesn't happen on device, nor on iOS 26.0 simulator. I suspect MercuryPoster is related to wallpaper. I also don't see any wallpaper background in my simulator. Few lines from the stack trace: Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libxpc.dylib 0x18011defc _xpc_api_misuse + 88 1 libxpc.dylib 0x18012e16c _xpc_shmem_create_with_prot.cold.1 + 24 2 libxpc.dylib 0x180113a70 _xpc_shmem_create_with_prot + 276 3 MTLSimDriver 0x23795ed48 -[MTLSimDevice newBufferWithLength:options:pointer:copyBytes:deallocator:] + 260 4 MercuryPosterExtension 0x10081d21c 0x100758000 + 807452 13 PosterKit 0x240d003d8 -[PRRenderer scene:willConnectToSession:options:] + 648 14 UIKitCore 0x1856bcf18 +[UIScene _sceneForFBSScene:create:withSession:connectionOptions:] + 956
20
22
1.8k
10h
Assets duplicating on Xcode 26.1 Beta 3
I've recently installed 26.1 Beta 3 alongside stable 26.0.1 When building my app with 26.0.1 the final .ipa size is ~17mb, however after building my app with 26.1 Beta 3 the size has increased up to ~22mb The main difference is Assets.car blowing from 1.1mb to 5.6mb (or 8.6mb if I include all icons settings). Upon examining I've found new liquid glass .icon file duplicating itself multiple times as png variants (any, dark, tinted, etc). Is anyone else experiencing this issue?
5
0
226
11h
I'm currently using macOS 26 and Xcode 26, but I'm unable to download iOS 26 simulators.
Download failed. Domain: DVTDownloadableErrorDomain Code: 41 User Info: { DVTErrorCreationDateKey = "2025-10-26 06:59:38 +0000"; } Download failed. Domain: DVTDownloadableErrorDomain Code: 41 Failed fetching catalog for assetType (com.apple.MobileAsset.iOSSimulatorRuntime), serverParameters ({ RequestedBuild = 23A8464; }) Domain: DVTDownloadsUtilitiesErrorDomain Code: -1 Download failed due to a bad URL. (Catalog download for com.apple.MobileAsset.iOSSimulatorRuntime) Domain: com.apple.MobileAssetError.Download Code: 49 User Info: { checkConfiguration = 1; } System Information macOS Version 26.0.1 (Build 25A362) Xcode 26.0.1 (24229) (Build 17A400) Timestamp: 2025-10-26T17:59:38+11:00
11
2
563
17h
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
78
18h
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
21h
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
478
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
iOS simulator triggers lots of "*** quit unexpectedly" alerts
Everytime when iOS simulator is launched I het a lot of repeated "*** quit unexpectedly" alerts. Where "***" is a mix of "managedappdistributiond","healthappd", and "findmylocated" Even after the simulator is launched I still het random "*** quit unexpectedly" alerts. Very annoying because the alerts deactivates the active window This is on an MacBook Pro M3 Max,, Xcode 15.2, Sonoma 14.2.1, it also happens with Xcode 15.1 A co developer (MacBook Pro M1 Max,Xcode 15.2, Sonoma 14.2.1) does not have the issue Any idea how I can prevent this from happening? Update Every mentioned service crash happens in libswiftCore.dylib at 0x1929f3938 assertionFailure(:_:file:line:flags:) + 248
5
6
3.2k
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
49
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
44
1d
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
1d
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
NSLocationTemporaryUsageDescriptionDictionary crashes Xcode 13
I just submitted a feedback for this (FB9662125) but in the spirit of “share and enjoy”… The cool new Generate Info.plist File feature in Xcode 13 crashes if you try to put an NSLocationTemporaryUsageDescriptionDictionary in your Info.plist file. Here’s a simple repro scenario: Create a minimal iOS app (no Core Data, no tests) Go to target settings → Info tab → Custom iOS Target Properties Click the (+) button on any row to begin inserting a new row Select Privacy - Location Temporary Usage Description Dictionary Click somewhere else or press Return to commit the selection Xcode crashes immediately More generally, it seems that Xcode crashes any time it tries to regenerate your Info.plist file if it contains an NSLocationTemporaryUsageDescriptionDictionary, even if (for example) you manually pasted that dictionary into the file earlier. In that case, merely tapping the (+) button in step 3 above is enough to crash it.
17
6
4.7k
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 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
13
2d