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

Xcode Documentation

Posts under Xcode subtopic

Post

Replies

Boosts

Views

Activity

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
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
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
177
1w
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
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
iOS15 on Xcode26 / Symbol not found: _SKStoreProductParameterAdNetworkSourceIdentifier
Below is an English version of your post, ready to copy-and-paste into the Apple Developer Forums: I’m seeing a crash in Xcode 26 beta 3 whenever the StoreKit symbol SKStoreProductParameterAdNetworkSourceIdentifier is present while running on an iOS 15 simulator. Steps to reproduce Install Xcode 26 beta 3. Create any iOS app and run it on an iOS 15 simulator (device model doesn’t matter). Add the following code anywhere and run: override func viewDidLoad() { super.viewDidLoad() if #available(iOS 16.1, *) { print("SKStoreProductParameterAdNetworkSourceIdentifier: \(SKStoreProductParameterAdNetworkSourceIdentifier)") } } The project builds successfully, but before the #available(iOS 16.1, *) check is reached, the app crashes with: Symbol not found: _SKStoreProductParameterAdNetworkSourceIdentifier When I build the same project with Xcode 16.4 and launch it on an iOS 15 simulator, it runs without crashing. Investigation so far Because SKStoreProductParameterAdNetworkSourceIdentifier is just an NSString, I could substitute the string literal "SKStoreProductParameterAdNetworkSourceIdentifier" as a temporary workaround, but that doesn’t feel like a proper fix. The symbol is still declared in both SDKs: /Applications/Xcode-16.4.0.app/.../StoreKit.framework/Headers/SKAdNetwork.h:48: SK_EXTERN NSString * const SKStoreProductParameterAdNetworkSourceIdentifier API_AVAILABLE(ios(16.1)) API_UNAVAILABLE(macos, watchos, visionos); /Applications/Xcode-26.0.0-Beta.3.app/.../StoreKit.framework/Headers/SKAdNetwork.h:48: SK_EXTERN NSString * const SKStoreProductParameterAdNetworkSourceIdentifier API_AVAILABLE(ios(16.1)) API_UNAVAILABLE(macos, watchos, visionos); So the symbol hasn’t been removed in the beta SDK. Given that the code is wrapped in #available(iOS 16.1, *), I don’t believe the sample itself is at fault. Questions Could this be a bug in Xcode 26’s availability checking or linker? Has anyone else encountered the same issue or found a more robust workaround? Any insights would be greatly appreciated.
2
1
144
1w
Xcode 16.4 no longer installs a development app onto any of my devices
Unable to Install “The BestSeller List” Building a new app when all of a sudden when I try to run on ANY of my devices, I get the following message: Failed to verify code signature of /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.HXa0sV/extracted/Best Seller List.app : 0xe8008015 (A valid provisioning profile for this executable was not found.) I have tried all of the suggestions I have found online: clean build folder, delete derived data, rebooting, etc. Nothing works. This happens on ALL of my test devices: iPhone 16 Pro, iPhone 14 Pro, iPhone XS, iPad Pro 6th gen. Here is the complete message dump: Unable to Install “The BestSeller List” Domain: IXUserPresentableErrorDomain Code: 14 Recovery Suggestion: Failed to verify code signature of /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.HXa0sV/extracted/Best Seller List.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. If this issue persists, please attach the following when sending a report to Apple: A sysdiagnose from this Mac A sysdiagnose from the device failing installation An IPA of the app failing installation User Info: { DVTErrorCreationDateKey = "2025-07-10 01:20:54 +0000"; IDERunOperationFailingWorker = IDEInstallCoreDeviceWorker; } Failed to install the app on the device. Domain: com.apple.dt.CoreDeviceError Code: 3002 User Info: { NSURL = "file:///Users/feldy/Library/Developer/Xcode/DerivedData/Best_Seller_List-aziaphmgvhweszapcqlicacwcuow/Build/Products/Debug-iphoneos/Best%20Seller%20List.app"; } Unable to Install “The BestSeller List” Domain: IXUserPresentableErrorDomain Code: 14 Failure Reason: This app cannot be installed because its integrity could not be verified. Recovery Suggestion: Failed to verify code signature of /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.HXa0sV/extracted/Best Seller List.app : 0xe8008015 (A valid provisioning profile for this executable was not found.) Failed to verify code signature of /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.HXa0sV/extracted/Best Seller List.app : 0xe8008015 (A valid provisioning profile for this executable was not found.) Domain: MIInstallerErrorDomain Code: 13 User Info: { FunctionName = "+[MICodeSigningVerifier _validateSignatureAndCopyInfoForURL:withOptions:error:]"; LegacyErrorString = ApplicationVerificationFailed; LibMISErrorNumber = "-402620395"; SourceFileLine = 80; } Event Metadata: com.apple.dt.IDERunOperationWorkerFinished : { "device_identifier" = "00008140-001C6C461AFB001C"; "device_isCoreDevice" = 1; "device_model" = "iPhone17,1"; "device_osBuild" = "18.5 (22F76)"; "device_platform" = "com.apple.platform.iphoneos"; "device_thinningType" = "iPhone17,1"; "dvt_coredevice_version" = "477.25"; "dvt_coresimulator_version" = 1043; "dvt_mobiledevice_version" = "1818.0.1"; "launchSession_schemeCommand" = Run; "launchSession_state" = 1; "launchSession_targetArch" = arm64; "operation_duration_ms" = 18446; "operation_errorCode" = 14; "operation_errorDomain" = IXUserPresentableErrorDomain; "operation_errorWorker" = IDEInstallCoreDeviceWorker; "operation_name" = IDERunOperationWorkerGroup; "param_debugger_attachToExtensions" = 0; "param_debugger_attachToXPC" = 1; "param_debugger_type" = 3; "param_destination_isProxy" = 0; "param_destination_platform" = "com.apple.platform.iphoneos"; "param_diag_113575882_enable" = 0; "param_diag_MainThreadChecker_stopOnIssue" = 0; "param_diag_MallocStackLogging_enableDuringAttach" = 0; "param_diag_MallocStackLogging_enableForXPC" = 1; "param_diag_allowLocationSimulation" = 1; "param_diag_checker_tpc_enable" = 1; "param_diag_gpu_frameCapture_enable" = 0; "param_diag_gpu_shaderValidation_enable" = 0; "param_diag_gpu_validation_enable" = 0; "param_diag_guardMalloc_enable" = 0; "param_diag_memoryGraphOnResourceException" = 0; "param_diag_mtc_enable" = 1; "param_diag_queueDebugging_enable" = 1; "param_diag_runtimeProfile_generate" = 0; "param_diag_sanitizer_asan_enable" = 0; "param_diag_sanitizer_tsan_enable" = 0; "param_diag_sanitizer_tsan_stopOnIssue" = 0; "param_diag_sanitizer_ubsan_enable" = 0; "param_diag_sanitizer_ubsan_stopOnIssue" = 0; "param_diag_showNonLocalizedStrings" = 0; "param_diag_viewDebugging_enabled" = 1; "param_diag_viewDebugging_insertDylibOnLaunch" = 1; "param_install_style" = 2; "param_launcher_UID" = 2; "param_launcher_allowDeviceSensorReplayData" = 0; "param_launcher_kind" = 0; "param_launcher_style" = 99; "param_launcher_substyle" = 0; "param_runnable_appExtensionHostRunMode" = 0; "param_runnable_productType" = "com.apple.product-type.application"; "param_structuredConsoleMode" = 1; "param_testing_launchedForTesting" = 0; "param_testing_suppressSimulatorApp" = 0; "param_testing_usingCLI" = 0; "sdk_canonicalName" = "iphoneos18.5"; "sdk_osVersion" = "18.5"; "sdk_variant" = iphoneos; } System Information macOS Version 15.5 (Build 24F74) Xcode 16.4 (23792) (Build 16F6) Timestamp: 2025-07-09T18:20:54-07:00
2
0
130
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
Apple Watch may need to be unlocked to recover from previously reported preparation errors
I'm trying to run(debug) an Xcode watch app project on my watch. My phone is connected to my computer via USB cable, my watch is paired to my phone. When I open Xcode and then open "Devices and simulators", I can see my phone properly connected. But these errors show up for my watch........ Apple Watch may need to be unlocked to recover from previously reported preparation errors Ensure the device is unlocked and associated with the same local area network as this Mac. A connection to this device could not be established. Timed out while attempting to establish tunnel using negotiated network parameters. I have booted computer, phone and watch. I have turned wifi off and on, on all 3 devices. I have turned developer mode on the watch off and then back on again. Anyone have any ideas how to fix this?
1
0
66
1w
Signing Issues with VisionOS app
I am having an issue with signing and provisioning a Vision OS app. I have an iOS app and a VisionOS app. Everything works fine on the iOS but having issues with the VisionOS. First, I am having issues with xcodebuild -exportArchive. When I run it on an archive of my VisionOS app I get ** EXPORT FAILED ** error: exportArchive No Accounts error: exportArchive No profiles for 'X' were found Where X is my bundle ID. Meanwhile the iOS app succeeds. This is on a CI machine but I confirmed the distribution provision profile for the vision OS app is installed on the machine. Even if I change the value of the -exportOptionsPlist to the one I used for the iOS project I get this error. Is the issue in the archive itself? The archives are generated from building in Unity and archiving the xcodeproject with xcodebuild archive Second, as a workaround I archived a debug ipa on my machine and uploaded this ipa to my CI machine which has the credentials to sign for distribution. I use this script as an example as how to resign the IPA: https://gist.github.com/lodalo/754a35b48d382ae99b25 I remove the CodeSignatures and codesign both .app and UnityFramework.framework. Using this resigned IPA I get this error when I try to upload to app store connect (via Transporter app and altool) errors: Validation failed (409) Missing or invalid signature. The bundle 'X' at bundle path 'Payload/Y.app' is not signed using an Apple submission certificate. To verify the signing I used codesign -dvvv --entitlements - On both the iOS and VisionOS app and they have the same values under all the Authority fields. Different profiles, of course. So the certificate I used is eligible to upload the iOS app successfully but doesn't work on the VisionOS ipa? Any help on solving any of these issues would be great so I can upload the vision OS app. Thank you!
0
0
77
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
Xcode keeps touching readonly xcschemes on launch
We use Perforce for version control, which means that all files not checked out are readonly. Lately Xcode has started displaying a fixed sequence of these dialogs on every launch: This means it is trying to modify some readonly file within the xcodeproj. Out of our 60 subprojects this always comes up for the exact same 6. I have so far uncovered the following: It is really trying to modify the shared xcschemes and not the pbxproj. (If I set those to writable the dialog does not appear.) Actually the files are not changed if I click "Unlock", but the com.apple.provenance xattr flag is removed from them. These xcschemes are of version 1.7 while all others are 1.3. If I change them to 1.3 Xcode still wants to modify them at launch and sets them back to 1.7. This is very annoying. What is it about these xcschemes that upsets Xcode, and how can I stop these dialogs from appearing? (One workaround is to keep them checked out dumped to a changelist that I never submit, but that is error prone when I do need to make changes to those, and also is not really possible when jumping between old states of the repo to find the change that broke something.)
0
0
97
1w
iOS Crash Log Shows High Offsets & ??? Modules in Local Debug Build (Binary Images Missing Main Binary)
Hi all, I'm encountering a strange crash issue during local iOS debugging on a real device, and I'm hoping someone can help explain it. The crash log contains unusually high offsets that are completely outside of any module address ranges listed in Binary Images. For example: 6 ??? 0x129ac0ee8 -[...:] + 1052 But the Binary Images section shows: 0x102358000 - 0x102363fff ChinaMobile arm64 ... 0x11bb2c000 - 0x11bdeffff ChinaMobile.debug.dylib arm64 ... ... There are two binaries for my app listed here, but neither matches that high crash address (0x129ac0ee8). Additionally, sometimes the Binary Images section doesn't even include my app's binary at all, which makes the crash logs even harder to analyze. This crash definitely happens inside my main app’s business code, yet the crash offset doesn’t match any listed binary range. Also, the crash logs contain many ??? module names and missing symbols, even though I'm running a Debug build locally, and I know how to symbolize logs manually. My Questions: Why does the crash log show such high offsets, far beyond any Binary Images' range? Why does it have so many ??? entries and missing symbols, even in a local debug build? Could this be related to Xcode version, build settings, or some project misconfiguration? Any suggestions or insights would be greatly appreciated!
0
0
55
1w
Xcode 26 Bug: URLs with percent encoding query parameters won't compile
Just repro'd in the latest Xcode 26 Beta 3. Building an iOS app using xcstrings for localization. We have a URL that uses percent encoding for a query param. For example: Upon compiling in the latest Xcode 26 beta this fails with: Unable to create a Swift type from the format specifier “%20S”. This was not the case in prior Xcode versions.
1
0
83
1w
Xcode Beta 3 new build warning about Bridging Header pch.
Hey all when building my app on xcode 26 beta 3 im getting a new warning about a [APPNAME]-primary-bridging-header.pch no file or directory found, this warning is new to beta 3 for me, obviously if i turn precompile headers off in build settings the warning goes away so there is a work around, but figured ide let the xcode engineers know ! (maybe its just me, but i wouldnt think so) Again this is just a warning and not stopping the build but wanted to see if this is a new warning anyone else is getting. Thanks ! FB18710327 Ps - ive tried the usuals .. clean build, delete derived data get same warning :)
1
1
92
1w
Team Id Changed / Old Team Id Automatically Signs
Good afternoon, I have the latest version of Xcode. I am trying to debug why I am not able to Sign in with Apple Sign In on my app. After days of trying everything I just noticed today that the TeamID Xcode is using to automatically sign the app is not my current Team Id. I had a years hiatus and my code login expired. When I recreated my account I got a new Team Id and that is what is on all my certificates, profiles, etc. Old team id: Z82SJZ64R6 Current team id: 22649D52Q5. I take off automatically signing and select my Mac app bistro and iOS app distro and the app fully builds then Xcode crashes with an error that mentions security - Error code 5. Is there a way for me to change the old team id in Xcode? I've already tried logging out and back in through settings.
2
0
55
1w