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

Xcode Documentation

Posts under Xcode subtopic

Post

Replies

Boosts

Views

Activity

Xcode doesn't recognise changes in file status, unable to stage and commit to repo.
I'm using Version 16.4 (16F6) of Xcode on macOS 15.5 (24F74) and everything was working fine until I selected an older build to branch out from. Now, Xcode cant properly know the file status as it keeps on changing it after quitting and relaunching it. The changes in the file are there and when trying to commit to the local repo it doesn't show any changes to stage. At present I'm relying on making project folder backups as a way of backing up builds. Any suggestions what can be done?
0
0
139
5d
I can't run or create a simulator that isn't iOS26 after downloading the Xcode Beta 3
I downloaded the Xcode Beta 3 on my MacBook Pro M4 Base today and tested out some iOS26 mechanics of my app. And when I came back to my main Xcode to continue developing in iOS18, I couldn't build my app. I went to Product > Destination > Manage run destinations and then tried to create a simulator with iOS18 but it didn't show up, only choice that's showing up was iOS26. I tried deleting iOS18 platform and downloading it again but it didn't solve, I tried deleting Xcode Beta but it didn't solve the problem either. I deleted Runtimes folder, it didn't solve too. I can not create a simulator of iOS18 or below too, the error says "The iOS 18.5 simulator runtime is not available. Try reinstalling Xcode or the simulator runtime." How can I fix this problem?
1
0
167
5d
Xcode 26 Beta 3 unable to build with error: Failed to find a DDI that can be used to enable DDI services on the device
In Xcode 26 Beta 2 I had no issues, but as soon as I updated to Beta 3, I get the following error when I attempt to build to my iPhone 15 Pro running iOS 26 beta 3: 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 I ran xcrun devicectl list preferredDDI and get the following: 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: 17A5241o • contentIsCompatible: false • coreDeviceVersionChecksIncludeDevelopmentRevision: true • developmentRevision: 0 • enforcingCoreDeviceVersionChecks: true • platform: iOS ▿ projectMetadata: • Citrine-1070 • CoreDevice-477.23 • DTDeveloperDiskImageSupport-14.0.0 • DTOCMock-23002 • GPUToolsDevice_DDI-310.16.1 • JetsamProperties-2624 • LiveExecutionResultsLogger-20007 • Mercury-64 • Playgrounds-8 • XCTest-24209.8 • 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: 17A5241o • contentIsCompatible: false • coreDeviceVersionChecksIncludeDevelopmentRevision: true • developmentRevision: 0 • enforcingCoreDeviceVersionChecks: true • platform: tvOS ▿ projectMetadata: • Citrine-1070 • CoreDevice-477.23 • DTDeveloperDiskImageSupport-14.0.0 • DTOCMock-23002 • GPUToolsDevice_DDI-310.16.1 • JetsamProperties-2624 • LiveExecutionResultsLogger-20007 • Mercury-64 • Playgrounds-8 • XCTest-24209.8 • 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: 17A5241o • contentIsCompatible: false • coreDeviceVersionChecksIncludeDevelopmentRevision: true • developmentRevision: 0 • enforcingCoreDeviceVersionChecks: true • platform: watchOS ▿ projectMetadata: • Citrine-1070 • CoreDevice-477.23 • DTDeveloperDiskImageSupport-14.0.0 • DTOCMock-23002 • GPUToolsDevice_DDI-310.16.1 • JetsamProperties-2624 • LiveExecutionResultsLogger-20007 • Mercury-64 • Playgrounds-8 • XCTest-24209.8 • 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: 17A5241o • contentIsCompatible: false • coreDeviceVersionChecksIncludeDevelopmentRevision: true • developmentRevision: 0 • enforcingCoreDeviceVersionChecks: true • platform: xrOS ▿ projectMetadata: • Citrine-1070 • CoreDevice-477.23 • DTDeveloperDiskImageSupport-14.0.0 • DTOCMock-23002 • GPUToolsDevice_DDI-310.16.1 • JetsamProperties-2624 • LiveExecutionResultsLogger-20007 • Mercury-64 • Playgrounds-8 • XCTest-24209.8 • incompatibleContentReason: The DDI's CoreDevice content is too old. • isUsable: false • variant: external When I run xcrun devicectl manage ddis update it hangs and does not update. I have also tried the obvious steps of uninstalling and reinstalling as well as unpairing and repairing my run devices. I have not tried sudo rm -rf /Library/Developer/DeveloperDiskImages/* Is that step recommended? Or any insights how to solve this issue? Thanks!
1
1
153
5d
PHAssetChangeRequest deleteAssets not working some time
Hello Team, I try to delete photo from Photos for that i used this method, [[PHPhotoLibrary sharedPhotoLibrary] performChanges:^{ [PHAssetChangeRequest deleteAssets:@[assetToDelete]]; completionHandler:^(BOOL success, NSError *error) { }]; This method pops up a dialog with Don't Allow or Delete. But some time in some iPhones not respond PHAssetChangeRequest deleteAssets method that's why that completionHandler not called because of that i can't perform any operation of PHPhotoLibrary then after. If I restart my iPhone then it works. Many users of my app complained about this issue. I have an iPhone 11 with iOS 15.3. But some iOS 12,14,16 users also face the same issue. So what exact issue is there? Is it related to iOS or a method? Thanks, Ankur
1
1
781
6d
ios simulator is not dwonloading 18.5 version
Download failed. Domain: DVTDownloadableErrorDomain Code: 41 User Info: { DVTErrorCreationDateKey = "2025-07-11 16:39:49 +0000"; } Download failed. Domain: DVTDownloadableErrorDomain Code: 41 Failed fetching catalog for assetType (com.apple.MobileAsset.iOSSimulatorRuntime), serverParameters ({ RequestedBuild = 22F77; }) 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 15.5 (Build 24F74) Xcode 16.4 (23792) (Build 16F6) Timestamp: 2025-07-11T22:09:49+05:30
0
0
330
6d
Suddenly, cannot install app on device
Hi, I am using Xcode 16.4, and my test device is Iphone 16 pro max. Everything was working fine until today when I get an error that I cannot install the app on the device. The error I get is: Failed to verify code signature of /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.cRjyg7/extracted/[myapp].app : 0xe8008015 (A valid provisioning profile for this executable was not found.) Please ensure sure that your app is signed by a valid provisioning profile. Creating a new project and installing it to the mobile works fine. Please can someone from Apple or the community respond? there are many posts with this error but none were solved. Troubleshooting attempts included: Resetting all certificates. delete the app from the device unpairing device codesigning via cli reloading older git code commit Nothing is working. thanks
1
1
470
6d
How do I avoid a platform?
I am designing a multi platform app, but visionOS lacks a functionality. I think I know how to support a platform only (#if os), but how to support all platforms except one? #if os(iOS, macOS) .glassEffect(.regular.interactive()) #endif is a no-no?
3
0
125
6d
App can't debug on iOS 26 device, but can on iOS 18
This is from Mac OS 26 or the prior version. It seems to be trying to include XCTest, but its no where in the build phases or frameworks? Anyone seen this issue? Failed to install the app on the device. Domain: com.apple.dt.CoreDeviceError Code: 3002 User Info: { DVTErrorCreationDateKey = "2025-06-11 15:28:16 +0000"; IDERunOperationFailingWorker = IDEInstallCoreDeviceWorker; NSURL = "file:///Users/ekaplan/Library/Developer/Xcode/DerivedData/dormway-mobile-feckueenojzruoaobakflnuqoglk/Build/Products/Debug-iphoneos/dormway-mobile.app"; } Unable to Install “DormWay” Domain: IXUserPresentableErrorDomain Code: 1 Failure Reason: Please try again later. Recovery Suggestion: Failed to iterate on macho slices for input file: /private/var/containers/Bundle/Application/D920CF2A-E16B-403F-B2DB-8F1732CA3D5F/dormway-mobile.app/Frameworks/XCTest.framework/XCTest Failed to iterate on macho slices for input file: /private/var/containers/Bundle/Application/D920CF2A-E16B-403F-B2DB-8F1732CA3D5F/dormway-mobile.app/Frameworks/XCTest.framework/XCTest Domain: MIInstallerErrorDomain Code: 73 User Info: { FunctionName = MIMachOFileIterateImageVersions; SourceFileLine = 129; } parse_macho_iterate_slices failed for /private/var/containers/Bundle/Application/D920CF2A-E16B-403F-B2DB-8F1732CA3D5F/dormway-mobile.app/Frameworks/XCTest.framework/XCTest Domain: NSPOSIXErrorDomain Code: 62 Failure Reason: Too many levels of symbolic links User Info: { FunctionName = MIMachOFileIterateImageVersions; SourceFileLine = 129; }
4
0
135
1w
some problem with build
Hello. Experimenting with xcode programming at the siging and Capabilities i see Team - Personal Team Provisioning profile - Xcode MAnaged Profile Siging sertificate - Apple Development and two errors Communication with Apple failed. Your maximum App ID limit has been reached. You may create up to 10 App IDs every 7 days. No profiles for 'ssd3' were found: Xcode couldn't find any Mac App Development provisioning profiles matching 'ssd3'. what is happaned? I do not Apple Dev ID But i think i have posibillyty to programming and build on my own Mac Anybody can help? Thanks
0
0
82
1w
Xcode 26 Beta 3: missing Metal Toolchain
Hello community, After unable to use Metal Toolchain for Xcode Beta 1 and 2 even after following the workarounds, and using Xcode Beta 3, I am still unable to use the downloaded Metal Compiler on my device. Building any project with metal file results in warning: Could not read serialized diagnostics file: error("Failed to open diagnostics file") (in target '<target>' from project '<project>') error: error: cannot execute tool 'metal' due to missing Metal Toolchain; use: xcodebuild -downloadComponent MetalToolchain Command CompileMetalFile failed with a nonzero exit code Here is my build environment, $ xcodebuild -version Xcode 26.0 Build version 17A5276g I have also checked the downloaded metal toolchain. $ xcodebuild -downloadComponent metalToolchain -exportPath /tmp/MyMetalExport/ 2025-07-13 13:16:17.293 xcodebuild[2153:34019] IDEDownloadableMetalToolchainCoordinator: Failed to remount the Metal Toolchain: The file “com.apple.MobileAsset.MetalToolchain-v17.1.5276.7.3KEJwX” couldn’t be opened because you don’t have permission to view it. Beginning asset download... 2025-07-13 13:16:17.427 xcodebuild[2153:34022] IDEDownloadableMetalToolchainCoordinator: Failed to remount the Metal Toolchain: The file “com.apple.MobileAsset.MetalToolchain-v17.1.5276.7.3KEJwX” couldn’t be opened because you don’t have permission to view it. Downloaded asset to: /System/Library/AssetsV2/com_apple_MobileAsset_MetalToolchain/47af11e2964f385d510c6a9d1a49c8165f334a51.asset/AssetData/Restore/022-19457-052.dmg Beginning asset export... Done exporting: /tmp/MyMetalExport/MetalToolchain-17A5276g.exportedBundle Done downloading: Metal Toolchain 17A5276g. The ExportMetadata.plist has a buildUpdateVersion of 17A5276g. Any suggestions are greatly appreciated.
0
2
87
1w
Cannot download 18.5 simulator
Cannot download 18.5 simulator Download failed. Domain: DVTDownloadableErrorDomain Code: 41 User Info: { DVTErrorCreationDateKey = "2025-07-12 08:12:00 +0000"; } Download failed. Domain: DVTDownloadableErrorDomain Code: 41 Failed fetching catalog for assetType (com.apple.MobileAsset.iOSSimulatorRuntime), serverParameters ({ RequestedBuild = 22F77; }) 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 15.5 (Build 24F74) Xcode 16.4 (23792) (Build 16F6) Timestamp: 2025-07-12T18:12:00+10:00
0
0
176
1w
Unable to quit Xcode normally
After working in Xcode when I want to quit Xcode by Command Q or the menu item Xcode will display a flashing Open Quickly window, the Quit Xcode menu item is grayed out and the only way to shut down Xcode is to force quit it. I am running macOS 26 beta 3 and Xcode 26 Beta 3 on a 24 inch iMac with M3 chip s/n K626GKFP3J
1
0
178
1w
Xcode 26 beta 3 - Metal toolchain installed but not working
Under Xcode 26 beta 3 I'm trying to build a project which uses Metal. I've installed the Metal Toolchain 26.0 under Settings -> Components, but when I start a build it fails during the "Prepare build" step with the following error (repeated many times): stat(/var/run/com.apple.security.cryptexd/mnt/com.apple.MobileAsset.MetalToolchain-v17.1.5276.7.Pb9SLL/Metal.xctoolchain/usr/bin/clang): No such file or directory (2) I've confirmed that there is in fact no 'clang' binary in that directory. I've tried using xcode-select to set the Xcode 26 Beta app as the active developer directory, and xcodebuild -version shows: Xcode 26.0 Build version 17A5276g Any ideas on other things to try?
4
1
136
1w
code coverage broken 0% since Xcode 16.2
Hi, moving from Xcode 16.1 to 16.2, the code coverage percentage is still 0. The project is quite old, but it worked with 16.1. What I tried: converted the old tests to test plans in the settings, including all the various targets (for internal functionality contained in frameworks, each framework has its own test target). added the various code coverage flags to YES. added test hosts to the main targets. played with various settings found in dozens of guides. But nothing. The main app shows 0% coverage, even though the internal frameworks have their own coverage and the files within the main app are tested. On Xcode 16.1, the % appears, but from 16.2 onwards, it doesn't. Also tried with Xcode 26. Any ideas? Thanks
0
0
99
1w
Unable to run an UITest to test a Button
I am trying to run a UI test for my app: func testFeed() throws { let tablesQuery = app.tables let cell = tablesQuery.children(matching: .cell).element(boundBy: 0) cell.swipeUp() sleep(2) let cellToLike = tablesQuery.children(matching: .cell).element(boundBy: 1) cellToLike.buttons["LikeButtonOff"].tap() cellToLike.buttons["LikeButtonOn"].tap() sleep(2) cellToLike.tap() sleep(2) let image = app.scrollViews.images.element(boundBy: 0) // Zoom in image.pinch(withScale: 3, velocity: 1) // zoom in // Zoom out image.pinch(withScale: 0.5, velocity: -1) let navBackButtonWhiteButton = app.buttons["NavBackButtonWhite"] navBackButtonWhiteButton.tap() } but on the line cellToLike.buttons["LikeButtonOff"].tap() I get the following error: Failed to failed to compute hit point for Button, {{354.0, 644.7}, {44.0, 44.0}}, identifier: 'LikeButton', label: 'LikeButtonOn': Activation point invalid and no suggested hit points based on element frame I tried checking the isHittable property of my button and it equals "false" for some reason. When I test the app myself I don't get any errors and I can interact with like button. What can be the issue? Im using Xcode 15.2
1
0
71
1w
Under Xcode 26 beta 3, how to support new glass icons for iOS 26 and old icons for iOS 18?
I know there are several existing threads on this topic but things keep changing. The release notes for Xcode 26 beta 3 have the following statements for a couple of resolved issues: Asset Catalog Fixed: Unable to set Icon Composer icon as alternate iOS icon (153305178) (FB18025356) Icon Composer Fixed: Icon Composer icons back deploy to older versions of iOS, macOS, and watchOS with inconsistent rendering. (152258860) I had a working solution under beta 1 and beta 2 for both of these. But under beta 3, I am now seeing the new glass icons for my app when running on a simulated iOS 18 device. This is happening for both the main app icon and any alternates. This contradicts the statement that beta 3 fixes this issue. There is no documentation (that I can find) describing how you are supposed to support old icons for iOS 18 and new glass icons for iOS 26. There is no documentation for how to support alternate glass icons for iOS 26. What I'm doing at the moment (that worked before beta 3) was to have the normal iOS 18 app icons in the Asset catalog and to have the new glass icons added to the project. The filenames for the glass .icon files have the same name as the app icons in the Assets catalog. This worked under beta 1 and beta 2. And despite the Xcode 26 beta 3 release notes stating that Icon Composer icons no longer back deploy to iOS 18, I'm seeing the opposite. Beta 3 now does the opposite of that statement. Does anyone have a working solution that supports old iOS 18 app icons and new iOS 26 glass icons using Xcode 26 beta 3? Note, all of my testing is with simulated iOS devices and I'm running Xcode 26 beta 3 under macOS 15.5. Maybe that's an issue?
1
2
169
1w