Build, test, and submit your app using Xcode, Apple's integrated development environment.

Xcode Documentation

Posts under Xcode subtopic

Post

Replies

Boosts

Views

Activity

Unable to launch tests in Xcode 26
I am trying to upgrade my app to use Xcode 26 and I cannot get my tests to launch. I am trying to launch tests to the simulator, and I always get this error after 300 second timeout: "encountered an error (The test runner hung before establishing connection.)" There are no other errors getting logged. I can run to the same simulator just fine, and in Xcode 16 the tests launch with no issues. The tests also run fine on an actual iPhone. Thanks in advance.
9
3
581
2w
Xcode 26 CompileMetalFile failed
"EnableLiveAssetServerV2-com.apple.MobileAsset.MetalToolchain" = on; ProductName: macOS ProductVersion: 26.0.1 BuildVersion: 25A362 The MetalToolchain is installed, however I keep getting error that MetalToolchain cannot be found by the Xcode "Command CompileMetalFile failed with a nonzero exit code" error: error: cannot execute tool 'metal' due to missing Metal Toolchain; use: xcodebuild -downloadComponent MetalToolchain ❯ xcodebuild -downloadComponent MetalToolchain 2025-10-31 11:18:29.004 xcodebuild[6605:45524] IDEDownloadableMetalToolchainCoordinator: Failed to remount the Metal Toolchain: The file “com.apple.MobileAsset.MetalToolchain-v17.1.324.0.k9JmEp” couldn’t be opened because you don’t have permission to view it. Beginning asset download... 2025-10-31 11:18:29.212 xcodebuild[6605:45523] IDEDownloadableMetalToolchainCoordinator: Failed to remount the Metal Toolchain: The file “com.apple.MobileAsset.MetalToolchain-v17.1.324.0.k9JmEp” couldn’t be opened because you don’t have permission to view it. Downloaded asset to: /System/Library/AssetsV2/com_apple_MobileAsset_MetalToolchain/4ab058bc1c53034b8c0a9baca6fba2d2b78bb965.asset/AssetData/Restore/022-17211-415.dmg Done downloading: Metal Toolchain 17A324.
7
3
916
2w
Linker trying to link Metal toolchain for every object file on Catalyst
When building our project for Mac Catalyst with Xcode 26.2, we get this warning almost a hundred times, once for every object file: directory not found for option '-L/var/run/com.apple.security.cryptexd/mnt/com.apple.MobileAsset.MetalToolchain-v17.3.48.0.UZtKea/Metal.xctoolchain/usr/lib/swift/maccatalyst' Somehow, every Link <FileName>.o build step got the following parameter, regardless if the target contained Metal files or not: -L/var/run/com.apple.security.cryptexd/mnt/com.apple.MobileAsset.MetalToolchain-v17.3.48.0.UZtKea/Metal.xctoolchain/usr/lib/swift/maccatalyst The toolchain is mounted at this point, but the directory usr/lib/swift/maccatalyst doesn't exist. When building the project for iOS, the option doesn't exist and the warning is not shown. We already check the build settings, but we couldn't find a reason why the linker is trying to link against the toolchain here. Even for targets that do contain Metal files, we get the following linker warning: search path '/var/run/com.apple.security.cryptexd/mnt/com.apple.MobileAsset.MetalToolchain-v17.3.48.0.UZtKea/Metal.xctoolchain/usr/lib/swift/maccatalyst' not found Is this a known issue? Is there a way to get rid of these warnings?
0
2
114
2w
Video cannot be found in the bundle error message
I am having difficulty coding my video to play in the app I am developing. My video file is located in the navigator pane, along with the other swift files in the project, with an A to the right hand side of the file, which I thought means it is available in the bundle. Unfortunately, an error saying the video cannot be found in the bundle shows at the bottom of my Xcode screen, after previewing the project. The file names match. Any further trouble shooting I'm doing references the old Xcode app, so I am stuck.
2
0
194
2w
XCUIDevice.shared.appearance = .dark no longer works when running UI tests via xcodebuild on newer iOS versions
I am seeing a regression with XCUIDevice.shared.appearance = .dark in UI tests that only affects xcodebuild, not Xcode’s UI test runner. Setup • UI tests written using XCTest • Dark mode forced in setUp() using: XCUIDevice.shared.appearance = .dark • Tests target an iOS simulator • Same test target, same scheme Expected behavior The app launches in Dark Mode for UI tests, as it did previously. Actual behavior • When running UI tests from Xcode (Product > Test), Dark Mode is applied correctly. • When running the same UI tests via xcodebuild test, Dark Mode is ignored and the app launches in Light Mode. • No test failures, no warnings, no logs indicating the appearance override was skipped. Regression details • This used to work on older iOS versions when running via xcodebuild. • The regression appears after updating iOS simulators (exact version boundary still unclear). • No relevant changes were made to the test code, scheme, or CI configuration. • xcodebuild otherwise launches and runs UI tests normally. Notes • The issue is specific to XCUIDevice.shared.appearance. • Other UI test functionality behaves as expected. • This makes CI results inconsistent with local Xcode runs and breaks visual assumptions in snapshot and layout-based tests. Question Is this a known regression or an intentional behavior change in recent iOS / Xcode versions? If intentional, what is the supported way to reliably force Dark Mode in UI tests when running via xcodebuild? This currently makes xcodebuild-based CI UI testing unreliable compared to Xcode’s test runner.
1
0
66
2w
App Store submission validation failed: Missing info.plist value WKApplication
I've developed a Multiplatform app under Xcode 26 (currently using 26.2 17C52). The current destinations of the single target are Mac, iPad and Mac(designed for iPad). The minimum deployments are MacOS 15.6 and iOS 18.6. All destinations build and perform correctly on physical devices (running OS 26 versions). The MacOS version has been submitted successfully to the AppStore for TestFlight usage. However, the iPad version shows a submission validation failure: Missing Info.plist value. A value for the key “WKApplication”, or “WKWatchKitApp” if your project has a WatchKit App Extension target, is required in “xxxxx.app/xxxxx.app” bundle. For details, see: https://developer.apple.com/documentation/watchkit/creating_independent_watchos_apps/setting_up_a_watchos_project (ID: 4911506c-39c3-4b69-a8bb-5e5dcd3dc2fb) The app has no WatchKit version (although one's planned for a future release). The Target's Build Settings include a "watchOS Deployment Target" and Info.plist values related to WatchKit. The Build Settings also include similar settings for TVOS and VisionOS. I'm unable to delete the aforementioned Build Settings (Can't select & use the delete key). The link in the message provides no help. Is this a bug in Xcode, or am I missing something? Regards, Michaela
2
0
113
2w
`ImageRenderer.render` halts program with `EXC_BREAKPOINT` inside SwiftUI/AttributeGraph
This extension View { public func renderSomething() async throws { let renderer = ImageRenderer(content: self) // renderer.colorMode = .linear renderer.render { size, context in print(size) // ... } // ... } } let view: some View = ... view.renderSomething() // → exception will cause the program to exit with EXC_BREAKPOINT deep inside SwiftUI. This worked with previous versions of Xcode, SwiftUI, and macOS. Xcode Version 26.2 (17C52), macOS Sequoia 15.7.3, using toolchain bundled with Xcode.
0
0
26
2w
Cannot overwrite Swift package default traits in Xcode
I am using swift-subprocess, and need to disable the SubprocessSpan trait because Xcode 26.2 does not ship with a bundled version libswiftCompatibilitySpan.dylib, causing everything to crash built with Xcode that happens to use Span. However, I cannot disable that trait by doing any of the following things: .package( url: "https://github.com/swiftlang/swift-subprocess.git", branch: "main", traits: [] ), .package( url: "https://github.com/swiftlang/swift-subprocess.git", branch: "main", traits: [.trait(name: "SubprocessFoundation")] ), Note that SubprocessSpan is default trait in subprocess: // Enable SubprocessFoundation by default var defaultTraits: Set<String> = ["SubprocessFoundation"] #if compiler(>=6.2) // Enable SubprocessSpan when Span is available [except it is not] defaultTraits.insert("SubprocessSpan") #endif The package still builds with the SubprocessSpan enabled. This is not an issue with the subprocess package. According to this, I should use swift build on the command line, yet this isn't -- as is upgrading to Tahoe -- an option because I need Xcode previews for SwiftUI. Help, what do I do now (other than downloading a toolchain) from swift.org)?
0
0
43
2w
Installed Xcode - Canvas fails to boot
Downloaded Xcode 26.2 from App Store. Started new Project, which defaults to "hello world". The canvas "simulator" within fails to finish indexing (paused), or When the canvas is active, the first code change (i.e. just a return key at the end of a line) cause the Xcode program to come to a stop. Have ended Xcode and rebooted a number of times. A number of remedies are posted on the net. All a little different than the other. Is there a current remedy for Xcode 26.2 to this issue available? iMac on Sequoia 15.7.3 , 800 gb of available storage Xcode: 26.2 (24553) Instruments: 26.2 (64573.16) SDKs: DriverKit: 25.2: iOS: 26.2: (23C53) iOS Simulator: 26.2: (23C53) macOS: 26.2: (25C57) tvOS: 26.2: (23K50) tvOS Simulator: 26.2: (23K50) visionOS: 26.2: (23N301) visionOS Simulator: 26.2: (23N301) watchOS: 26.2: (23S303) watchOS Simulator: 26.2: (23S303)
1
0
118
2w
Uncategorized (Xcode): Unable to find a destination matching the provided destination specifier: { id:45967BD9-44E0-4D5D-8C43-C5437F48836A }
Hello I am using 26.2 (25C56) on my m4 air. when I am working on a Flutter project suddenly my app crashed and after when I tried to build the application again this error occurs. How to fix it. ? Launching lib/main.dart on iPhone 16e in debug mode... Xcode build done. 2.4s Failed to build iOS app Uncategorized (Xcode): Unable to find a destination matching the provided destination specifier: { id:45967BD9-44E0-4D5D-8C43-C5437F48836A }Available destinations for the "Runner" scheme: { platform:macOS, arch:arm64, variant:Designed for [iPad,iPhone], id:00008132-001E5102020B801C, name:My Mac } { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device } { platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device } Could not build the application for the simulator. Error launching application on iPhone 16e.
1
0
61
2w
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.
2
0
148
2w
(Xcode 26.0 → 26.2) Constant UI flickering in split view mode
Hello, I’ve been experiencing a persistent issue in Xcode since version 26.0, and it is still present in 26.2. When using the split view to display two files side by side, the area in the top‑right corner of the window (the inspector / options panel) starts flickering continuously. This happens regardless of whether I’m using the light or dark theme, and even with the Liquid Glass effect disabled in macOS settings. None of these changes have any impact on the issue. I have already submitted a bug report through Xcode (Feedback Assistant), but the issue is still present as of today. The flickering makes the interface difficult to use and visually very distracting. I’ve attached a video to clearly show the issue. I will review the attachment at the time I publish this post. Thanks in advance for any help or feedback. Video 1 https://www.icloud.com/iclouddrive/077l-R7Ybvxz89NI-B7DliEuA#xcode_bug1 Video 2 https://www.icloud.com/iclouddrive/0f6bJp48ioGRdkYiA2U4sI-cg#xcode-bug2
3
1
191
3w
How does one figure out the Team ID for their Personal Team
I can find the Team ID for a registered development account by going to:developer.apple.com &gt; Account &gt; Membership &gt; Team IDI'm sure that a similar ID exists for the Personal Team. If I select my personal team in xcode and then open MyProject.xcodeproj &gt; project.pbxproj, I can find said ID by looking for DEVELOPMENT_TEAM. But this is a rather hacky way to find my personal team ID. Are there other simpler ways to find it?
1
3
3.6k
3w
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
170
3w
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
63
3w
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
251
3w
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
179
3w
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
236
3w
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
413
3w