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

Xcode Documentation

Posts under Xcode subtopic

Post

Replies

Boosts

Views

Activity

Has Apple officially not noticed this issue? can't download iOS 26.2 Simulator
I’m using macOS Tahoe 26, and Xcode is version 26.2. I’ve tried all the methods suggested online, but I still can’t download it. In addition, iOS 26.* and iOS 18.* simulators also fail to download. The error messages are shown below. Download failed. Domain: DVTDownloadableErrorDomain Code: 41 User Info: { DVTErrorCreationDateKey = "2026-01-06 01:25:11 +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 a general networking error. (Catalog download for com.apple.MobileAsset.iOSSimulatorRuntime) Domain: com.apple.MobileAssetError.Download Code: 47 User Info: { tryAgainLater = 1; } System Information macOS Version 26.0 (Build 25A354) Xcode 26.2 (24553) (Build 17C52) Timestamp: 2026-01-06T09:25:11+08:00
1
3
320
1w
How to delete iOS simulator runtimes?
There are multiple iOS simulator runtimes located at /System/Library/AssetsV2/com_apple_MobileAsset_iOSSimulatorRuntime which I don't need. I tried the following approaches to delete them but not working. Xcode > Settings > Components > Delete (It can delete some but not all of them) xcrun simctl runtime list (It doesn't show the old runtimes) sudo rm (Operation not permitted) sudo rm -rf cc1f035290d244fca4f74d9d243fcd02d2876c27.asset Password: rm: cc1f035290d244fca4f74d9d243fcd02d2876c27.asset/AssetData/096-69246-684.dmg: Operation not permitted rm: cc1f035290d244fca4f74d9d243fcd02d2876c27.asset/AssetData: Operation not permitted rm: cc1f035290d244fca4f74d9d243fcd02d2876c27.asset/Info.plist: Operation not permitted rm: cc1f035290d244fca4f74d9d243fcd02d2876c27.asset/version.plist: Operation not permitted rm: cc1f035290d244fca4f74d9d243fcd02d2876c27.asset: Operation not permitted I have two questions: Why "xcrun simctl runtime list" is unable to list some old runtimes? How to delete them?
1
1
211
1w
Xcode debugger stops at dyld after upgrading to Xcode 26
After upgrading to Xcode 26, started getting an issue where Xcode debugger is stopping at dyld`lldb_image_notifier Does not happen on device. Tried cleaning derived data folder, clean build but no success. what could be the cause? this is from the stack. #0 0x0000000207e0ffa1 in lldb_image_notifier () #1 0x0000000207e11c49 in dyld4::ExternallyViewableState::triggerNotifications () #2 0x0000000207e13a2f in invocation function for block in dyld4::ExternallyViewableState::notifyMonitorOfImageListChangesSim(bool, unsigned int, mach_header const**, char const**) () #3 0x0000000207e10c3b in dyld4::ExternallyViewableState::notifyMonitorOfImageListChangesSim () #4 0x00000001102b9195 in dyld4::ExternallyViewableState::triggerNotifications () #5 0x00000001102b9465 in dyld4::ExternallyViewableState::addImages () #6 0x000000011029dcec in dyld4::RuntimeState::notifyDebuggerLoad () #7 0x00000001102b8065 in dyld4::APIs::dlopen_from(char const*, int, void*)::$_0::operator()() const::'lambda'()::operator()() const () #8 0x00000001102b71fd in dyld4::APIs::dlopen_from(char const*, int, void*)::$_0::operator()() const () #9 0x00000001102b30e3 in dyld4::APIs::dlopen_from () #10 0x00000001199b4c5e in _CFBundleDlfcnLoadFramework () #11 0x0000000119982a1e in _CFBundleLoadExecutableAndReturnError () #12 0x0000000115f081c4 in -[NSBundle loadAndReturnError:] () #13 0x00000001a3c42866 in -[NSBundleAccessibility loadAndReturnError:] () #14 0x000000013cd67fa7 in __50-[AXCodeItem loadWithStrategy:onQueue:completion:]_block_invoke_2 ()
3
1
385
1w
XCode 26.2 (17C52) vs iOS 26.2 (23C55): Cannot mount any DDI onto my device
Hi... Is there not an available Developer Disk Image for this situation? I am unable to do my professional job because I have not been able to overcome this issue on my machine. I have various things to try to resolve this issue so that I can install, run, and test apps onto my iPhone (iPhone 13). The version of MacOSX is Sequoia 15.7.3. I've tried everything from hard resetting the pairing stack, to resetting the trust on my iPhone. I've even sought help from AI. AI says, in a nutshell I'm screwed. Apparently, I am unable to downgrade from iOS 26.2 to, say, iOS 18 or below. I'll be honest: this is frustrating, and this situation seems to happen like clockwork with every update in either direction. I hope someone somewhere has ideas. Thanks. Update: I'm not even reaching the step where the shared Cache symbols are being copied from my iPhone. The developer disk image could not be mounted on this device. Domain: com.apple.dt.CoreDeviceError Code: 12040 Failure Reason: Failed to find a DDI that can be used to enable DDI services on the device. Usually this means the best DDI we could find for a platform did not have compatible CoreDevice content. Run 'devicectl list preferredDDI' from the command line to get more details on why no valid DDI can be found. User Info: { DVTErrorCreationDateKey = "2026-01-14 18:56:43 +0000"; DeviceIdentifier = "C471EDF8-4385-5669-BA17-976B325B2EC4"; "com.apple.dt.DVTCoreDevice.operationName" = enablePersonalizedDDI; } -- Failed to find a DDI that can be used to enable DDI services on the device. Usually this means the best DDI we could find for a platform did not have compatible CoreDevice content. Run 'devicectl list preferredDDI' from the command line to get more details on why no valid DDI can be found. Domain: com.apple.dt.CoreDeviceError Code: 12001 -- System Information macOS Version 15.7.3 (Build 24G419) Xcode 26.2 (24553) (Build 17C52) Timestamp: 2026-01-14T10:56:43-08:00 COMMAND LINE Developer % devicectl list preferredDDI Host CoreDevice version: 506.6 WARNING: No usable DDI found for the iOS platform (The DDI's CoreDevice content is too old.). Best (unusable) DDI found is: • hostDDI: file:///Library/Developer/DeveloperDiskImages/iOS_DDI/ ▿ ddiMetadata: • buildUpdate: 17C5038g • contentIsCompatible: false • coreDeviceVersionChecksIncludeDevelopmentRevision: true • developmentRevision: 0 • enforcingCoreDeviceVersionChecks: true • platform: iOS ▿ projectMetadata: • Citrine-1500.1 • CoreDevice-506.5 • DTDeveloperDiskImageSupport-14.0.0 • DTOCMock-23002 • GPUToolsDevice_DDI-312.4 • JetsamProperties-2648.0.21 • LiveExecutionResultsLogger-20100 • Mercury-67 • Playgrounds-11 • XCTest-24507 • incompatibleContentReason: The DDI's CoreDevice content is too old. • isUsable: false • variant: external WARNING: No DDI was found for the macOS platform. No usable DDI found for the tvOS platform (The DDI's CoreDevice content is too old.). Best (unusable) DDI found is: • hostDDI: file:///Library/Developer/DeveloperDiskImages/tvOS_DDI/ ▿ ddiMetadata: • buildUpdate: 17C5038g • contentIsCompatible: false • coreDeviceVersionChecksIncludeDevelopmentRevision: true • developmentRevision: 0 • enforcingCoreDeviceVersionChecks: true • platform: tvOS ▿ projectMetadata: • Citrine-1500.1 • CoreDevice-506.5 • DTDeveloperDiskImageSupport-14.0.0 • DTOCMock-23002 • GPUToolsDevice_DDI-312.4 • JetsamProperties-2648.0.21 • LiveExecutionResultsLogger-20100 • Mercury-67 • Playgrounds-11 • XCTest-24507 • incompatibleContentReason: The DDI's CoreDevice content is too old. • isUsable: false • variant: external WARNING: No usable DDI found for the watchOS platform (The DDI's CoreDevice content is too old.). Best (unusable) DDI found is: • hostDDI: file:///Library/Developer/DeveloperDiskImages/watchOS_DDI/ ▿ ddiMetadata: • buildUpdate: 17C5038g • contentIsCompatible: false • coreDeviceVersionChecksIncludeDevelopmentRevision: true • developmentRevision: 0 • enforcingCoreDeviceVersionChecks: true • platform: watchOS ▿ projectMetadata: • Citrine-1500.1 • CoreDevice-506.5 • DTDeveloperDiskImageSupport-14.0.0 • DTOCMock-23002 • GPUToolsDevice_DDI-312.4 • JetsamProperties-2648.0.21 • LiveExecutionResultsLogger-20100 • Mercury-67 • Playgrounds-11 • XCTest-24507 • incompatibleContentReason: The DDI's CoreDevice content is too old. • isUsable: false • variant: external WARNING: No usable DDI found for the visionOS platform (The DDI's CoreDevice content is too old.). Best (unusable) DDI found is: • hostDDI: file:///Library/Developer/DeveloperDiskImages/xrOS_DDI/ ▿ ddiMetadata: • buildUpdate: 17C5038g • contentIsCompatible: false • coreDeviceVersionChecksIncludeDevelopmentRevision: true • developmentRevision: 0 • enforcingCoreDeviceVersionChecks: true • platform: xrOS ▿ projectMetadata: • Citrine-1500.1 • CoreDevice-506.5 • DTDeveloperDiskImageSupport-14.0.0 • DTOCMock-23002 • GPUToolsDevice_DDI-312.4 • JetsamProperties-2648.0.21 • LiveExecutionResultsLogger-20100 • Mercury-67 • Playgrounds-11 • XCTest-24507 • incompatibleContentReason: The DDI's CoreDevice content is too old. • isUsable: false • variant: external
3
0
390
1w
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)
3
2
253
1w
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.
2
1
160
1w
UISegmentedControl tap position misalignment in Xcode 26 with UIDesignRequiresCompatibility enabled
Environment macOS 15.7.3 Xcode 26.1.1 / 26.2 iOS 18.5 / 26.2 iPhone 16 Pro Simulator and physical device Problem Description When tapping an unselected UISegmentedControl, the selected segment does not match the tapped position. Specifically, tapping the rightmost segment (index: 3) results in the leftmost segment (index: 0) being selected instead. Conditions for Reproduction This issue occurs when all of the following conditions are met: Built with Xcode 26.x UIDesignRequiresCompatibility is set to YES in Info.plist UISegmentedControl is positioned using Auto Layout with leading alignment Segments are added dynamically using insertSegment(withTitle:at:animated:) Note: The issue does not occur when segments are defined statically in Storyboard. Steps to Reproduce Create a subclass of UISegmentedControl that dynamically sets segments: class CustomSegmentedControl: UISegmentedControl { func setSegments(titles: [String]) { removeAllSegments() titles.forEach { title in insertSegment(withTitle: title, at: numberOfSegments, animated: false) } } } In the ViewController, configure the control: override func viewDidLoad() { super.viewDidLoad() segmentedControl.setSegments(titles: ["Item A", "Item B", "Item C", "Item D"]) segmentedControl.selectedSegmentIndex = UISegmentedControl.noSegment } Set UIDesignRequiresCompatibility to YES in Info.plist: <key>UIDesignRequiresCompatibility</key> <true/> Run the app and tap the rightmost segment ("Item D") Expected vs Actual Behavior Expected Actual Tap rightmost segment "Item D" (index: 3) is selected "Item A" (index: 0) is selected What I Tried (Did Not Work) Calling layoutIfNeeded() after adding segments: segmentedControl.setSegments(titles: ["Item A", "Item B", "Item C", "Item D"]) segmentedControl.layoutIfNeeded() // No effect Workarounds Set UIDesignRequiresCompatibility to NO (enables Liquid Glass design) Define segments statically in Storyboard instead of dynamically Sample Project Minimal reproduction project is available here: https://github.com/CH3COOH/Samples/tree/master/SampleSelectSegmentedControl Feedback Assistant This issue has been reported via Feedback Assistant: FB21712773 Has anyone else encountered this issue or found alternative workarounds?
0
0
106
1w
Git Integration needs serious work.
After committing and pushing code changes, the Repository Up Arrow remains. Not matter how many times you Refresh or Fetch..it only goes away when you shutdown Xcode and restart. .gitignore processing is a nightmare to correct. There should be a clearer way to remove/delete files from the repository and also synch with new .gitignore settings. But even the .gitignore file name is misleading. Please clean this up in the settings and/or IDE. It costs huge time to correct. Not seeing a difference between, Fetch Changes, Refresh, or Pull. The only indications of a code changes seems to occur with a Pull. Just not clear what is supposed to happen at the code level.
3
0
165
1w
Bug: Xcode 26.2 wants `ENABLE_DEBUG_DYLIB`: How do I enable that in `Package.swift`?
Xcode tells me Previewing in executable targets now requires a new build layout for unoptimized builds. Either set ENABLE_DEBUG_DYLIB to YES for this target, or break out your preview code into a separate framework with its own scheme. How do enable that in Package.swift. swiftSettings don't work (.define and unsafeFlags with -D ...). Creating a library product that the executable then depends on doesn't help either. I have two targets, one is an executable target. The #Preview macro is in the non-executable target.
2
1
105
1w
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
6
4
942
1w
Is it possible for Xcode to display warnings from package dependencies?
I have quite a few in-door local packages that I do not really develop outside of the context of Xcode projects - meaning that I add local references to these libraries (and other content) to my Xcode project - and I update the libraries directly in Xcode within the project. I very rarely open up the library package on its own and work on it just like that. The unfortunate thing is that Xcode seems to be silencing warnings from all the packages during the build phase, resulting in me not seeing warnings from those libraries. I then need to open them separately in Xcode and review whether they contain any warnings and fix them. Using treat warnings as errors is, of course, one solution, but it doesn't help in cases where it's impossible to avoid them (e.g. https://github.com/swiftlang/swift/issues/86650) as there's no #pragma push; or in case of user-defined #warning which I often use to mark parts of code that need revisiting. I've gone through various settings, but I don't see anything relevant. Most of Google search is filled with attempts to silence the warnings instead of enabling them or wanting errors instead of warnings. Does anyone here know if it's possible for Xcode to display warnings from included packages and how to adjust such an option? Thanks!
0
0
73
1w
Inconsistent Symbol Linking Behavior for UTType from UniformTypeIdentifiers Framework
In our app, we implement a document picker using FilePickerManager+available.m, selecting different APIs based on the iOS version: if (@available(iOS 14.0, *)) { NSMutableArray<UTType *> *contentTypes = [NSMutableArray array]; for (NSString *uti in documentTypes) { UTType *type = [UTType typeWithIdentifier:uti]; if (type) { [contentTypes addObject:type]; NSLog(@"iOS 14+ Adding type: %@", uti); } else { NSLog(@"Warning: Unable to create UTI: %@", uti); } } UIDocumentPickerViewController *documentPicker = [[UIDocumentPickerViewController alloc] initForOpeningContentTypes:contentTypes]; documentPicker.delegate = self; documentPicker.allowsMultipleSelection = NO; [self.presentingViewController presentViewController:documentPicker animated:YES completion:nil]; } However, we've observed inconsistent symbol reference types to UTType in the final linked binaries: One build results in a strong reference to UTType. Another demo project (with seemingly identical code and build settings) results in a weak reference. Both object files (.o) show undefined references to UTType symbols (e.g., UTTypeCreatePreferredIdentifierForTag), yet the final linked binaries differ in how these symbols are resolved. Impact of the Issue This inconsistency causes problems on iOS 14.0+ devices: Strong reference version: Fails to launch on devices where the UniformTypeIdentifiers framework is not present (e.g., certain older iOS 14.x devices), due to link-time failure. Weak reference version: Launches successfully but crashes at runtime when attempting to call UTType methods, because the implementation cannot be found. Our Analysis Using nm -u, both versions show an undefined symbol: U _UTTypeCreatePreferredIdentifierForTag However, in the final binaries: One shows: T _UTTypeCreatePreferredIdentifierForTag (strong) The other shows: W _UTTypeCreatePreferredIdentifierForTag (weak) Both projects link against the framework identically in their build logs: -framework UniformTypeIdentifiers (no -weak_framework flag is used in either case). Questions Why do identical source code and linker flags result in different symbol reference strengths (T vs W) for the same framework? Are there specific compiler or linker behaviors (e.g., deployment target, SDK version, module imports, or bitcode settings) that influence whether symbols from UniformTypeIdentifiers are treated as strong or weak? What is the recommended best practice to ensure consistent symbol referencing when using newer APIs like UTType, especially when supporting older OS versions? We aim to understand this behavior to guarantee stable operation across all supported iOS versions—avoiding both launch failures and runtime crashes caused by inconsistent symbol linking. Any insights or guidance from the community or Apple engineers would be greatly appreciated! Let me know if you'd like a shorter version or want to include additional build environment details (Xcode version, deployment target, etc.)!
1
0
95
1w