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 crashes when downloading Swift package dependency
I'm trying to publish two frameworks I wrote in Swift on GitHub. https://github.com/nickasd/BoardGameKit https://github.com/nickasd/BoardGameKitHost I want to add the first framework as a dependency to one of my Xcode projects. I click on the + button in the Package Dependencies tab, select BoardGameKit and click Add Package. A sheet opens and after a couple seconds, while the sheet is still open, Xcode crashes. When I try the same steps with the second framework, Xcode survives and finally shows me a confirmation sheet, and clicking on Add Package works as expected. Both repositories look exactly the same to me, except for their name of course. I even force pushed the default, empty Swift package created in Xcode with the Framework template to both repositories, and still only the first one makes Xcode crash, even after deleting all DerivedData folders and restarting Xcode. What could be the issue? I created FB22832333.
2
0
79
22h
Zooming in Storyboards/XIBs for macOS App?
I've found several references for this functionality being removed, but no viable workaround. When I'm trying to fine tune a layout the constraint lines, boundary boxes, etc. get in the way and I can't see what I'm doing. For doing pixel-perfect layouts in a storyboard it gets really tedious. This borders on an accessibility issue. Does anyone know when or if this is ever coming? It works fine with iOS apps.
1
0
69
1d
MetalToolchain and auto updates...
Hello, I can understand why you do not ship the MetalToolchain with the default Xcode installation any more due to the relatively low usage and high download size. That said, every time Xcode runs an auto update it wipes MetalToolchain and breaks my local development build. It would be nice if the updates would be smart enough to honor the fact that. I have already run: "xcodebuild -downloadComponent MetalToolchain" and include that in the update, rather than deleting the module. Thanks, Chris
1
0
108
1d
Any way to turn off delimiter auto-insertion?
In a recent Xcode update (maybe 26.5, maybe all 26 versions), Xcode started inserting the closing quote, parenthesis, or bracket. It happens like this. I type, say, an opening double quote ("). Then as soon as I type another character, it adds another double quote just ahead of the insertion point. Now, I have everything in the Settings->Editing->Completion section turned off. I also have virtually everything in the Indentation section turned off. Is this just a bug? I've reported it (FB22693037). But I'm surprised it wasn't caught by internal testing. I can't express how much I hate this behavior.
0
0
32
2d
XCode 26.5: cannot Copy shared cache symbols from Apple Watch
The process of copying shared cache symbols from my Apple Watch has been horrendous. I cannot even get past 2% complete before this process fails. Every device is on the same network. I have trusted my machine. Developer mode is enabled on the watch. I have successfully paired the phone and watch. I managed to install an Watch app onto the watch. But the shared cache symbols were never copied from the watch. I gathered several commands at the terminal to help me. rm -rf ~/Library/Developer/Xcode/DerivedData rm -rf ~/Library/Developer/CoreDevice sudo killall -9 remoted CoreDeviceService 2>/dev/null || true xcrun devicectl manage ddis update xcrun devicectl list devices Clear CoreDevice state. With Xcode quit: rm -rf ~/Library/Developer/Xcode/DerivedData rm -rf ~/Library/Caches/com.apple.dt.Xcode Reset Xcode's Local Network permission. tccutil reset Local-Network com.apple.dt.Xcode tccutil reset Bluetooth com.apple.dt.Xcode xcrun devicectl device info hardware --device MY_DEVICE_ID xcrun devicectl list devices ping -c 3 MY_IP_ADDRESS Confirm no VPN/proxy/filter is lurking scutil --nwi ifconfig | grep -E "utun|ipsec|tap|tun" xcrun devicectl device info details --device MY_DEVICE_ID xcrun devicectl manage pair --device MY_DEVICE_ID I keep obtain this type of error: Unable to copy shared cache files Domain: com.apple.dt.deviceprep Code: -33 User Info: { DVTErrorCreationDateKey = "2026-05-20 23:41:00 +0000"; NSLocalizedRecoverySuggestion = ""; "com.apple.dt.DVTCoreDevice.operationName" = dtfetchsymbols; } -- The operation couldn’t be completed. No route to host Domain: NSPOSIXErrorDomain Code: 65 Failure Reason: No route to host -- System Information macOS Version 26.5 (Build 25F71) Xcode 26.5 (24943) (Build 17F42) Timestamp: 2026-05-20T16:41:00-07:00 Does anyone have ideas to help me overcome this nightmare?
1
0
104
1d
"Unable to find module dependency" with custom PRODUCT_MODULE_NAME
Hi! Here is a brief introduction at first. I am developing a framework and our project has following structure: All frameworks are static ones. PublicAPI framework contains the only declarations that are visible to users, while ModuleX frameworks are internal modules. During build process we archive all targets and libtool all internal module binaries into PublicAPI one. This way we distribute our framework as a single xcframework package and hide all internal modules from users. Here is the problem part. All these frameworks exist in separate projects that have single static library target. I want to add new targets with different settings, say SWIFT_ACTIVE_COMPILATION_CONDITIONS or else. So project would look like this Also I would like both regular and extended targets to build frameworks with same module name, so that neither users (that use PublicAPI framework) nor I would have to change imports in my code. My idea was to set PRODUCT_MODULE_NAME in extended targets to the same value as in regular ones. But when I build PublicAPIExtended target I get an error Unable to find module dependency 'Module1' although derived data contains Module1Extended.framework with Module1 module inside. What did I do wrong? Is it possible to build project like this at all? And another thing - I also tried to build a scheme containing both PublicAPI and PublicAPIExtended targets and got different error even prior to build: error: Multiple commands produce '<ExtractAppIntentsMetadata Path(_str: "/Users/antonprotko/Library/Developer/Xcode/DerivedData/test-acncglphufkosyhjzbwrbzalsnlh/Build/Products/Debug") bar/Metadata.appintents>' note: Target 'bar copy' (project 'bar'): ExtractAppIntentsMetadata note: Target 'bar' (project 'bar'): ExtractAppIntentsMetadata Can I fix it somehow? Here is example project with similar targets - foo/foo_copy and bar/bar_copy share the same sources with different compilation conditions. bar targets depend on foo targets and building bar_copy fails with Unable to find module dependency: 'foo' https://drive.google.com/file/d/1Cj5cIw8U0LJ5Xt9ZnhbKIo240kbrizLE/view?usp=sharing
0
0
44
2d
xcodebuild test (CLI) does not sync .storekit to storekitd on iOS 26.5 — SKTestSession unusable in CI
On iOS 26.5 simulator runtime, running UI tests via xcodebuild test from the command line does not push the scheme's StoreKitConfigurationFileReference to the destination simulator's storekitd AppGroup Octane container. As a consequence, SKTestSession(configurationFileNamed:) either silently falls through to the production App Store (surfacing a "Sign in to Apple Account" SpringBoard alert during paywall tests), or throws SKInternalErrorDomain Code=3 "Error saving configuration file" if you call any SKTestSession instance method. The same project, same scheme, same .storekit file works correctly when launched via Xcode IDE (Cmd+R / Cmd+U) — which uses DVTDevice.handleStoreKitConfigurationSyncForBundleID:configurationFilePath: via an internal IDELaunchSession XPC path that the public xcodebuild CLI does not invoke. This regression makes StoreKit Test unusable in CI for any project using xcodebuild test or xcodebuild test-without-building against an iOS 26.5 simulator. Environment macOS: 26.x Xcode: 26.4.1 (25E253) iOS Simulator runtime affected: 26.5 iOS Simulator runtime that does not exhibit the bug: 26.1 Test target: XCTest UI tests Test plan: *.xctestplan with "storeKitConfiguration": "MyApp.storekit" in defaultOptions Affected scheme actions: Test (CLI) Not affected: Run, Test (Xcode IDE) Steps to Reproduce Create a SwiftUI iOS app com.example.MyApp. Add a MyApp.storekit with one auto-renewable subscription. Add a UI test target. In the xctestplan: defaultOptions.storeKitConfiguration = "MyApp.storekit". In the UI test base case: private var storeKitSession: SKTestSession? override func setUpWithError() throws { storeKitSession = try SKTestSession(configurationFileNamed: "MyApp") app.launch() } Boot a fresh iOS 26.5 simulator. Run via CLI: xcodebuild test \ -project MyApp.xcodeproj \ -scheme MyApp \ -testPlan MyAppUITests \ -destination "platform=iOS Simulator,name=iPhone 17 Pro" In the test, trigger paywall and call Product.purchase(). Expected Product.purchase() presents the StoreKit Test sheet labeled "[Environment] Xcode". Same behavior as Xcode IDE Cmd+U. Actual Production App Store flow triggers. SpringBoard alert "Sign in to Apple Account" appears. Tests waiting on the "Xcode"-labeled sheet fail with Element does not exist. Evidence The simulator's ~/Library/Developer/CoreSimulator/Devices/<UDID>/data/Containers/Shared/AppGroup/<storekit-AGID>/Documents/Persistence/Octane/com.example.MyApp/Configuration.storekit: Present (≈100 KB) when launched via Xcode IDE. Missing when launched via xcodebuild test CLI on the same simulator UDID. Workarounds Attempted (all fail on iOS 26.5) No-op XCTestCase "warmup" that calls XCUIApplication.launch() + sleep — does not trigger the sync because XCUIApplication.launch() routes through XCTRunner, not IDELaunchSession. Multi-destination xcodebuild test with -parallelize-tests-among-destinations. Manually cp-ing the .storekit file into the AppGroup Octane container — storekitd only loads via the XPC channel. launchctl kickstart -k system/com.apple.storekitd — wipes in-memory state, does not pick up disk file. Only working workaround: open project in Xcode IDE, Cmd+R, wait ~20–30 sec, Cmd+., then Cmd+U. Not viable for CI. Related Open Feedback FB22237318 — SKTestSession instance methods (clearTransactions(), failTransactionsEnabled = true) throw SKInternalErrorDomain Code=3 "Error saving configuration file". Discussion thread: https://developer.apple.com/forums/thread/808030 The iOS 26.5 Release Notes (https://developer.apple.com/documentation/ios-ipados-release-notes/ios-ipados-26_5-release-notes) under StoreKit Test list this issue as resolved in 26.5: "Fixed: SKTestSession may fail to save its configuration file when invoked outside of an Xcode debug session." However, on the public iOS 26.5 simulator runtime the behavior is unchanged — SKTestSession still hits Code=3 on any mutation, and xcodebuild test from CLI still does not sync the .storekit configuration. The 26.5 fix either did not actually ship, or this report describes a distinct but related issue that the fix did not cover. Impact Any CI/CD pipeline running UI tests for apps with StoreKit subscriptions is broken when targeting an iOS 26.5 simulator. Workarounds are either: Pin CI simulator runtime to iOS 26.1. Manually run the project in Xcode IDE before each test run (impossible headless). Has anyone found a CLI-friendly workaround? Or is there an undocumented xcodebuild flag / simctl command that can trigger the same DVTDevice sync from outside the IDE?
1
0
69
2d
"Clean Build Folder…" vs "Clean Build Folder Immediately"?
Xcode 26 (and previous versions) have these options: "Clean Build Folder…" vs "Clean Build Folder Immediately" (if you hold the option key). I can't tell how they're different. The ellipsis traditionally means you're going to get a dialog you have to address before the command will execute, but that doesn’t happen. Both seem to just delete files in the build folder.
0
0
71
3d
M4 Mac Mini: Xcode generates private keys with wrong label - codesigning impossible
M4 Mac Mini: Xcode generates private keys with wrong label - codesigning impossible Background This is a follow up to my November 2024 thread "Keychain issues after installing backup on new Mac" which was closed because I had a temporary workaround. That workaround using my wife's MacBook Air for signing is not sustainable. I used AI assistance to determine the root cause. My DTS case 102877839447 is open but has not yet been forwarded to a DTS engineer. Environment Mac Mini M4, macOS 15.4.1 (Build 25E253) Xcode 26.4.1 (17E202) Team ID: Q23726668V (Computerade Products) Working comparison machine: MacBook Air, macOS 15.3 Precise Bug — Reproducible Every Time Every time Xcode generates a new certificate and key pair on my Mac Mini: Certificate: Apple Development: Michael Birch (9KD5TCGGHG) ✅ Private key: Apple Development: Michael Birch (Computerade Products) ❌ The key uses the organization name instead of the certificate identifier. They never pair as a valid codesigning identity. security find-identity -v -p codesigning always returns 0 valid identities. Cryptographic Evidence The internal application labels confirm the keys are cryptographically unrelated to their certificates: Key internal application label: 53C26EB056997276B5E938258D00665ACABD1F0F Certificate public key hash: 57cd1af4a9162f26b1a6d750e05a63a2166b75ff These do not match ❌ Confirmed Eliminated As Causes Keychain search list corruption — found and fixed Partition list — set correctly Access control — set to allow all applications Full Disk Access — granted to Xcode Xcode caches and preferences — completely cleared Login keychain — completely reset Orphaned certificates and keys — all removed SIP enabled, system fully up to date Valid P12 Import Also Fails A p12 exported from the working MacBook Air and cryptographically verified as a matched pair also fails on the Mac Mini: security import returns MAC verification failed Keychain Access import returns OSStatus -2 Importing certificate and key separately as PEM files succeeds but they are not recognized as a valid identity pair despite matching application labels A3F3F193B7896DA9055353F59AB450778CB09AE7 Question Is there a known issue with M4 Mac Mini keychain infrastructure where private keys are generated with incorrect internal application labels? Is there a lower level diagnostic or fix beyond what the security command provides? The problem is specific to my Mac Mini M4 and persisted thru more than a year of Mac OS and xCode updates.
0
0
43
3d
After the last update, the Undo button is not appearing in the chat screen.
I enter the following example code into the chat screen, the code is applied, but the Undo button does not appear. The Undo button is also grayed out in the Edit menu. I don't know if this is due to the update or a settings issue, as this is my first time using Xcode. Before the update, there were no problems; the Undo button would appear right next to the chat screen after the code was applied, but now it's gone. Can you help me with this? Edit only: MetalPortfolio/MetalPortfolio/Models/Transaction.swift Goal: Make Transaction decoding backward-compatible so older saved transactions do not fail to load when newer fields are missing. Critical rules: - Do not edit any other file. - Do not change Transaction stored property names. - Do not change encoding format. - Do not change UI. - Do not change storage/export/import logic yet. - Do not change calculations. - Keep existing behavior for valid current JSON. Implementation: In Transaction.init(from:), change only optional/backward-compatible decoding where safe. Required: - fee should decode with default 0 if missing: fee = try container.decodeIfPresent(Double.self, forKey: .fee) ?? 0 Optional if consistent with existing defaults: - unit can keep decodeIfPresent fallback. - currency can keep decodeIfPresent fallback. Do not make core required fields optional: - id - type - asset - quantity - price - date Return only: - which file changed - exact decoding behavior changed
1
0
145
4d
Unable to use codex agent in xcode
Whilst using codex, I got an error "The data couldn’t be read because it isn’t in the correct format." I determined that I was no longer signed in. I went through the OAUTH chain opening a web browser and going through the login. However every time I do it, the account still shows "Not signed In" I am on 26.5. I also removed the codex from components and redownloaded it. That made no difference. Any one else having these issues? Claude is working.
1
0
101
1w
StoreKit testing not working on iOS26.5 simulator
Hi, I'm trying to run our StoreKit unit tests with Xcode26.5 on an iOS26.5 simulator. Host computer has macOS26.5. All tests are failing and in the console I see logs such as [SKTestSession] Error saving configuration file: Error Domain=SKInternalErrorDomain Code=3 "(null)" [SKTestSession] Error deleting all transactions: Error Domain=SKInternalErrorDomain Code=3 "(null)" [SKTestSession] Error clearing overrides: Error Domain=SKInternalErrorDomain Code=3 "(null)" [SKTestSession] Error setting value to 1 for identifier 2 for jp.unext.mediaplayer: Error Domain=SKInternalErrorDomain Code=3 "(null)" And the simulator asks me to provide my AppleID. Tests have been broken since at least 26.4 The release notes claims that it has been fixed but not for me. https://developer.apple.com/documentation/ios-ipados-release-notes/ios-ipados-26_5-release-notes#StoreKit-Testing-in-Xcode Does anyone else have the same issue? Reported FB22774836 just in case.
6
8
452
1d
XCode Quick Help panel
I'm a big fan of keeping documentation in the code, so it appears at the point of use. Obviously, DocC and the Quick Help panel are a pretty important part of that strategy. Unfortunately, it only works randomly, so even if I've just build documentation (which should not even matter, the doc is just a cmd+click away), Quick Help stays blank, often even on system items like Label. It seems totally accidental, which makes it hard to make to reproduce. Sometimes an Xcode restart helps, sometimes not. Sometimes changing the editor display helps, sometimes not. Any tips on that?
1
0
96
1w
Workarounds for Xcode previews errors: Cannot preview in this file - Failed to Launch
I have started to have issues with SwiftUI previews of iOS apps with projects under the Documents folder. I have experimented that in Xcode 26.4 and I am still seeing it in 26.5. The error is: Cannot preview in this file. Failed to launch xyz.abc.TestApp Looking at the diagnostics, Xcode gets a permission denied error when trying to open /Users/me/Documents/path/to/TestApp/DerivedData/TestApp/Build/Intermediates.noindex/TestApp.build/Debug-iphonesimulator/TestApp.build/Objects-normal/arm64/ContentView.1.preview-thunk-launch.o Error details below. Note that I have set DerivedData folders relative to the projects' roots. Additional information: I get errors on freshly created iOS projects, just trying to preview the default ContentView. Xcode has full disk access set in System Preferences > Privacy & Security. I have cleaned build folders, deleted the simulators, Xcode itself, cleared various caches, restarted and reinstalled Xcode to no avail. Checking Editor > Canvas > Use Legacy Previews Execution did not fix it either. Apps run fine in Simulator. System info: macOS 26.4.1, Xcode 26.5 (17F42), MacBook Pro M1 and Mac Studio M2 Max. I have found two ways to fix the problem while keeping DerivedData relative to the project's root: create the project in some other “unprotected” directory (/Users/me/Developer in my case), or uncheck Editor > Canvas > Automatically Refresh Canvas. Either way makes previews work again. Possibly related: SwiftUI preview not working in Xcode 26 when “Automatically Refresh Canvas” is enabled Xcode 13.2.1 - Simulator works, Preview doesn't Excerpt from diagnostics: | | [Remote] JITError | | | | ================================== | | | | | [Remote] CouldNotLoadInputObjectFile: Could not load object file during preview: /Users/me/Documents/TestApp/DerivedData/TestApp/Build/Intermediates.noindex/TestApp.build/Debug-iphonesimulator/TestApp.build/Objects-normal/arm64/ContentView.1.preview-thunk-launch.o | | | | | | path: /Users/me/Documents/TestApp/DerivedData/TestApp/Build/Intermediates.noindex/TestApp.build/Debug-iphonesimulator/TestApp.build/Objects-normal/arm64/ContentView.1.preview-thunk-launch.o | | | | | | ================================== | | | | | | | [Remote] XOJITError | | | | | | | | XOJITError: '/Users/me/Documents/TestApp/DerivedData/TestApp/Build/Intermediates.noindex/TestApp.build/Debug-iphonesimulator/TestApp.build/Objects-normal/arm64/ContentView.1.preview-thunk-launch.o': Operation not permitted
4
0
159
1w
Xcode always shows error "Error Downloading Crash Log Information" when trying to download crash logs
For a couple of months now I haven't been able to see new crash reports for my App Store apps in Xcode. I see the list of crash reports in the Organizer, but selecting any of the new ones always shows the same error message: Error Downloading Crash Log Information: An error occurred preventing Xcode from downloading crash log information. "my.email at domain.com" failed with error: There was a failure decoding response: (HTTP 500, 20364 bytes) The data couldn't be read because it isn't in the correct format.. Pushing the Reload button makes the view load for a bit, but then the same error appears again. Since I want to keep fixing crashes in my apps as fast as possible, is Apple aware of the issue and working on a fix? I don't know if this is a Xcode or App Store Connect issue. I would have expected this issue to be fixed with the newest Xcode version 26.5, but it's still happening. I opened FB22589345 on April 23, but got no response so far.
3
7
187
1d
Bug in the Agentic Coding chat box
Since a few days ago, I noticed that every time you go to the top of the text in the Agentic Coding chat box, if you keep pressing the up arrow, the current message is replaced by the previous one. It's like someone decided to allow users to use the arrows to navigate to previous conversations in the same context, but this means that you are constantly jumping to previous messages by accident. The "feature" is error prone, confusing, and extremely annoying. If someone knows of an option in setting to disable it, please let me know. I'm constantly making mistakes, wasting tokens, editing the wrong message, and making the conversation confusing by sending the wrong message to the agent.
0
0
59
1w
Please upgrade Xcode to continue using Codex
Codex will no longer be available in Xcode 26.3 starting on Friday, May 8th. Please upgrade to Xcode 26.4 or later to continue using Codex.
Replies
0
Boosts
0
Views
301
Activity
2w
Swift Package Manager authentication failed
Swift Package Manager fails while downloading Firebase SDK. Error: Authentication failed because no credentials were provided. Package: https://github.com/firebase/firebase-ios-sdk.git Already tried: Reset package cache Removed DerivedData Re-added GitHub account Reinstalled Xcode
Replies
0
Boosts
0
Views
27
Activity
3h
Xcode crashes when downloading Swift package dependency
I'm trying to publish two frameworks I wrote in Swift on GitHub. https://github.com/nickasd/BoardGameKit https://github.com/nickasd/BoardGameKitHost I want to add the first framework as a dependency to one of my Xcode projects. I click on the + button in the Package Dependencies tab, select BoardGameKit and click Add Package. A sheet opens and after a couple seconds, while the sheet is still open, Xcode crashes. When I try the same steps with the second framework, Xcode survives and finally shows me a confirmation sheet, and clicking on Add Package works as expected. Both repositories look exactly the same to me, except for their name of course. I even force pushed the default, empty Swift package created in Xcode with the Framework template to both repositories, and still only the first one makes Xcode crash, even after deleting all DerivedData folders and restarting Xcode. What could be the issue? I created FB22832333.
Replies
2
Boosts
0
Views
79
Activity
22h
M1 芯片的 Mac mini 安装的 Xcode 26.3 打包出来的 App 在 iOS 12.5.8 设备上无法打开
我发现在 M1 芯片的 MacMini上使用 Xcode26.3打包出来的 App 在 iphone6设备 ios 12.5.8 的系统下 安装或者直接调试都会直接 启动后 立即 崩溃,但是在 intel 芯片的 MacBook pro 上使用 Xcode 26.3 在相同的设备相同的系统下,就可以正常安装和调试,请问这是为什么?
Replies
0
Boosts
0
Views
78
Activity
1d
Zooming in Storyboards/XIBs for macOS App?
I've found several references for this functionality being removed, but no viable workaround. When I'm trying to fine tune a layout the constraint lines, boundary boxes, etc. get in the way and I can't see what I'm doing. For doing pixel-perfect layouts in a storyboard it gets really tedious. This borders on an accessibility issue. Does anyone know when or if this is ever coming? It works fine with iOS apps.
Replies
1
Boosts
0
Views
69
Activity
1d
MetalToolchain and auto updates...
Hello, I can understand why you do not ship the MetalToolchain with the default Xcode installation any more due to the relatively low usage and high download size. That said, every time Xcode runs an auto update it wipes MetalToolchain and breaks my local development build. It would be nice if the updates would be smart enough to honor the fact that. I have already run: "xcodebuild -downloadComponent MetalToolchain" and include that in the update, rather than deleting the module. Thanks, Chris
Replies
1
Boosts
0
Views
108
Activity
1d
Any way to turn off delimiter auto-insertion?
In a recent Xcode update (maybe 26.5, maybe all 26 versions), Xcode started inserting the closing quote, parenthesis, or bracket. It happens like this. I type, say, an opening double quote ("). Then as soon as I type another character, it adds another double quote just ahead of the insertion point. Now, I have everything in the Settings->Editing->Completion section turned off. I also have virtually everything in the Indentation section turned off. Is this just a bug? I've reported it (FB22693037). But I'm surprised it wasn't caught by internal testing. I can't express how much I hate this behavior.
Replies
0
Boosts
0
Views
32
Activity
2d
XCode 26.5: cannot Copy shared cache symbols from Apple Watch
The process of copying shared cache symbols from my Apple Watch has been horrendous. I cannot even get past 2% complete before this process fails. Every device is on the same network. I have trusted my machine. Developer mode is enabled on the watch. I have successfully paired the phone and watch. I managed to install an Watch app onto the watch. But the shared cache symbols were never copied from the watch. I gathered several commands at the terminal to help me. rm -rf ~/Library/Developer/Xcode/DerivedData rm -rf ~/Library/Developer/CoreDevice sudo killall -9 remoted CoreDeviceService 2>/dev/null || true xcrun devicectl manage ddis update xcrun devicectl list devices Clear CoreDevice state. With Xcode quit: rm -rf ~/Library/Developer/Xcode/DerivedData rm -rf ~/Library/Caches/com.apple.dt.Xcode Reset Xcode's Local Network permission. tccutil reset Local-Network com.apple.dt.Xcode tccutil reset Bluetooth com.apple.dt.Xcode xcrun devicectl device info hardware --device MY_DEVICE_ID xcrun devicectl list devices ping -c 3 MY_IP_ADDRESS Confirm no VPN/proxy/filter is lurking scutil --nwi ifconfig | grep -E "utun|ipsec|tap|tun" xcrun devicectl device info details --device MY_DEVICE_ID xcrun devicectl manage pair --device MY_DEVICE_ID I keep obtain this type of error: Unable to copy shared cache files Domain: com.apple.dt.deviceprep Code: -33 User Info: { DVTErrorCreationDateKey = "2026-05-20 23:41:00 +0000"; NSLocalizedRecoverySuggestion = ""; "com.apple.dt.DVTCoreDevice.operationName" = dtfetchsymbols; } -- The operation couldn’t be completed. No route to host Domain: NSPOSIXErrorDomain Code: 65 Failure Reason: No route to host -- System Information macOS Version 26.5 (Build 25F71) Xcode 26.5 (24943) (Build 17F42) Timestamp: 2026-05-20T16:41:00-07:00 Does anyone have ideas to help me overcome this nightmare?
Replies
1
Boosts
0
Views
104
Activity
1d
"Unable to find module dependency" with custom PRODUCT_MODULE_NAME
Hi! Here is a brief introduction at first. I am developing a framework and our project has following structure: All frameworks are static ones. PublicAPI framework contains the only declarations that are visible to users, while ModuleX frameworks are internal modules. During build process we archive all targets and libtool all internal module binaries into PublicAPI one. This way we distribute our framework as a single xcframework package and hide all internal modules from users. Here is the problem part. All these frameworks exist in separate projects that have single static library target. I want to add new targets with different settings, say SWIFT_ACTIVE_COMPILATION_CONDITIONS or else. So project would look like this Also I would like both regular and extended targets to build frameworks with same module name, so that neither users (that use PublicAPI framework) nor I would have to change imports in my code. My idea was to set PRODUCT_MODULE_NAME in extended targets to the same value as in regular ones. But when I build PublicAPIExtended target I get an error Unable to find module dependency 'Module1' although derived data contains Module1Extended.framework with Module1 module inside. What did I do wrong? Is it possible to build project like this at all? And another thing - I also tried to build a scheme containing both PublicAPI and PublicAPIExtended targets and got different error even prior to build: error: Multiple commands produce '<ExtractAppIntentsMetadata Path(_str: "/Users/antonprotko/Library/Developer/Xcode/DerivedData/test-acncglphufkosyhjzbwrbzalsnlh/Build/Products/Debug") bar/Metadata.appintents>' note: Target 'bar copy' (project 'bar'): ExtractAppIntentsMetadata note: Target 'bar' (project 'bar'): ExtractAppIntentsMetadata Can I fix it somehow? Here is example project with similar targets - foo/foo_copy and bar/bar_copy share the same sources with different compilation conditions. bar targets depend on foo targets and building bar_copy fails with Unable to find module dependency: 'foo' https://drive.google.com/file/d/1Cj5cIw8U0LJ5Xt9ZnhbKIo240kbrizLE/view?usp=sharing
Replies
0
Boosts
0
Views
44
Activity
2d
xcodebuild test (CLI) does not sync .storekit to storekitd on iOS 26.5 — SKTestSession unusable in CI
On iOS 26.5 simulator runtime, running UI tests via xcodebuild test from the command line does not push the scheme's StoreKitConfigurationFileReference to the destination simulator's storekitd AppGroup Octane container. As a consequence, SKTestSession(configurationFileNamed:) either silently falls through to the production App Store (surfacing a "Sign in to Apple Account" SpringBoard alert during paywall tests), or throws SKInternalErrorDomain Code=3 "Error saving configuration file" if you call any SKTestSession instance method. The same project, same scheme, same .storekit file works correctly when launched via Xcode IDE (Cmd+R / Cmd+U) — which uses DVTDevice.handleStoreKitConfigurationSyncForBundleID:configurationFilePath: via an internal IDELaunchSession XPC path that the public xcodebuild CLI does not invoke. This regression makes StoreKit Test unusable in CI for any project using xcodebuild test or xcodebuild test-without-building against an iOS 26.5 simulator. Environment macOS: 26.x Xcode: 26.4.1 (25E253) iOS Simulator runtime affected: 26.5 iOS Simulator runtime that does not exhibit the bug: 26.1 Test target: XCTest UI tests Test plan: *.xctestplan with "storeKitConfiguration": "MyApp.storekit" in defaultOptions Affected scheme actions: Test (CLI) Not affected: Run, Test (Xcode IDE) Steps to Reproduce Create a SwiftUI iOS app com.example.MyApp. Add a MyApp.storekit with one auto-renewable subscription. Add a UI test target. In the xctestplan: defaultOptions.storeKitConfiguration = "MyApp.storekit". In the UI test base case: private var storeKitSession: SKTestSession? override func setUpWithError() throws { storeKitSession = try SKTestSession(configurationFileNamed: "MyApp") app.launch() } Boot a fresh iOS 26.5 simulator. Run via CLI: xcodebuild test \ -project MyApp.xcodeproj \ -scheme MyApp \ -testPlan MyAppUITests \ -destination "platform=iOS Simulator,name=iPhone 17 Pro" In the test, trigger paywall and call Product.purchase(). Expected Product.purchase() presents the StoreKit Test sheet labeled "[Environment] Xcode". Same behavior as Xcode IDE Cmd+U. Actual Production App Store flow triggers. SpringBoard alert "Sign in to Apple Account" appears. Tests waiting on the "Xcode"-labeled sheet fail with Element does not exist. Evidence The simulator's ~/Library/Developer/CoreSimulator/Devices/<UDID>/data/Containers/Shared/AppGroup/<storekit-AGID>/Documents/Persistence/Octane/com.example.MyApp/Configuration.storekit: Present (≈100 KB) when launched via Xcode IDE. Missing when launched via xcodebuild test CLI on the same simulator UDID. Workarounds Attempted (all fail on iOS 26.5) No-op XCTestCase "warmup" that calls XCUIApplication.launch() + sleep — does not trigger the sync because XCUIApplication.launch() routes through XCTRunner, not IDELaunchSession. Multi-destination xcodebuild test with -parallelize-tests-among-destinations. Manually cp-ing the .storekit file into the AppGroup Octane container — storekitd only loads via the XPC channel. launchctl kickstart -k system/com.apple.storekitd — wipes in-memory state, does not pick up disk file. Only working workaround: open project in Xcode IDE, Cmd+R, wait ~20–30 sec, Cmd+., then Cmd+U. Not viable for CI. Related Open Feedback FB22237318 — SKTestSession instance methods (clearTransactions(), failTransactionsEnabled = true) throw SKInternalErrorDomain Code=3 "Error saving configuration file". Discussion thread: https://developer.apple.com/forums/thread/808030 The iOS 26.5 Release Notes (https://developer.apple.com/documentation/ios-ipados-release-notes/ios-ipados-26_5-release-notes) under StoreKit Test list this issue as resolved in 26.5: "Fixed: SKTestSession may fail to save its configuration file when invoked outside of an Xcode debug session." However, on the public iOS 26.5 simulator runtime the behavior is unchanged — SKTestSession still hits Code=3 on any mutation, and xcodebuild test from CLI still does not sync the .storekit configuration. The 26.5 fix either did not actually ship, or this report describes a distinct but related issue that the fix did not cover. Impact Any CI/CD pipeline running UI tests for apps with StoreKit subscriptions is broken when targeting an iOS 26.5 simulator. Workarounds are either: Pin CI simulator runtime to iOS 26.1. Manually run the project in Xcode IDE before each test run (impossible headless). Has anyone found a CLI-friendly workaround? Or is there an undocumented xcodebuild flag / simctl command that can trigger the same DVTDevice sync from outside the IDE?
Replies
1
Boosts
0
Views
69
Activity
2d
"Clean Build Folder…" vs "Clean Build Folder Immediately"?
Xcode 26 (and previous versions) have these options: "Clean Build Folder…" vs "Clean Build Folder Immediately" (if you hold the option key). I can't tell how they're different. The ellipsis traditionally means you're going to get a dialog you have to address before the command will execute, but that doesn’t happen. Both seem to just delete files in the build folder.
Replies
0
Boosts
0
Views
71
Activity
3d
M4 Mac Mini: Xcode generates private keys with wrong label - codesigning impossible
M4 Mac Mini: Xcode generates private keys with wrong label - codesigning impossible Background This is a follow up to my November 2024 thread "Keychain issues after installing backup on new Mac" which was closed because I had a temporary workaround. That workaround using my wife's MacBook Air for signing is not sustainable. I used AI assistance to determine the root cause. My DTS case 102877839447 is open but has not yet been forwarded to a DTS engineer. Environment Mac Mini M4, macOS 15.4.1 (Build 25E253) Xcode 26.4.1 (17E202) Team ID: Q23726668V (Computerade Products) Working comparison machine: MacBook Air, macOS 15.3 Precise Bug — Reproducible Every Time Every time Xcode generates a new certificate and key pair on my Mac Mini: Certificate: Apple Development: Michael Birch (9KD5TCGGHG) ✅ Private key: Apple Development: Michael Birch (Computerade Products) ❌ The key uses the organization name instead of the certificate identifier. They never pair as a valid codesigning identity. security find-identity -v -p codesigning always returns 0 valid identities. Cryptographic Evidence The internal application labels confirm the keys are cryptographically unrelated to their certificates: Key internal application label: 53C26EB056997276B5E938258D00665ACABD1F0F Certificate public key hash: 57cd1af4a9162f26b1a6d750e05a63a2166b75ff These do not match ❌ Confirmed Eliminated As Causes Keychain search list corruption — found and fixed Partition list — set correctly Access control — set to allow all applications Full Disk Access — granted to Xcode Xcode caches and preferences — completely cleared Login keychain — completely reset Orphaned certificates and keys — all removed SIP enabled, system fully up to date Valid P12 Import Also Fails A p12 exported from the working MacBook Air and cryptographically verified as a matched pair also fails on the Mac Mini: security import returns MAC verification failed Keychain Access import returns OSStatus -2 Importing certificate and key separately as PEM files succeeds but they are not recognized as a valid identity pair despite matching application labels A3F3F193B7896DA9055353F59AB450778CB09AE7 Question Is there a known issue with M4 Mac Mini keychain infrastructure where private keys are generated with incorrect internal application labels? Is there a lower level diagnostic or fix beyond what the security command provides? The problem is specific to my Mac Mini M4 and persisted thru more than a year of Mac OS and xCode updates.
Replies
0
Boosts
0
Views
43
Activity
3d
Xcode resets commit message when leaving changes editor
After entering a commit message into the commit message field in the Xcode source control changes editor, it will clear any commit message that I entered if I go to another part of Xcode and open a file in the editor and then go back to the changes screen. FB22806896 https://github.com/feedback-assistant/reports/issues/801
Replies
0
Boosts
0
Views
87
Activity
4d
After the last update, the Undo button is not appearing in the chat screen.
I enter the following example code into the chat screen, the code is applied, but the Undo button does not appear. The Undo button is also grayed out in the Edit menu. I don't know if this is due to the update or a settings issue, as this is my first time using Xcode. Before the update, there were no problems; the Undo button would appear right next to the chat screen after the code was applied, but now it's gone. Can you help me with this? Edit only: MetalPortfolio/MetalPortfolio/Models/Transaction.swift Goal: Make Transaction decoding backward-compatible so older saved transactions do not fail to load when newer fields are missing. Critical rules: - Do not edit any other file. - Do not change Transaction stored property names. - Do not change encoding format. - Do not change UI. - Do not change storage/export/import logic yet. - Do not change calculations. - Keep existing behavior for valid current JSON. Implementation: In Transaction.init(from:), change only optional/backward-compatible decoding where safe. Required: - fee should decode with default 0 if missing: fee = try container.decodeIfPresent(Double.self, forKey: .fee) ?? 0 Optional if consistent with existing defaults: - unit can keep decodeIfPresent fallback. - currency can keep decodeIfPresent fallback. Do not make core required fields optional: - id - type - asset - quantity - price - date Return only: - which file changed - exact decoding behavior changed
Replies
1
Boosts
0
Views
145
Activity
4d
Unable to use codex agent in xcode
Whilst using codex, I got an error "The data couldn’t be read because it isn’t in the correct format." I determined that I was no longer signed in. I went through the OAUTH chain opening a web browser and going through the login. However every time I do it, the account still shows "Not signed In" I am on 26.5. I also removed the codex from components and redownloaded it. That made no difference. Any one else having these issues? Claude is working.
Replies
1
Boosts
0
Views
101
Activity
1w
Xcode stuck generating localization comments
Xcode 26.5 stucks on Localization Generating Comments: Running on macOS Tahoe 26.5 When this happens, Xcode does not add new keys, although enabled: The only (known) workaround is to restart Xcode. Same happened with Xcode 26.4, 26.4.1 on macOS 26.4.1.
Replies
1
Boosts
0
Views
137
Activity
1w
StoreKit testing not working on iOS26.5 simulator
Hi, I'm trying to run our StoreKit unit tests with Xcode26.5 on an iOS26.5 simulator. Host computer has macOS26.5. All tests are failing and in the console I see logs such as [SKTestSession] Error saving configuration file: Error Domain=SKInternalErrorDomain Code=3 "(null)" [SKTestSession] Error deleting all transactions: Error Domain=SKInternalErrorDomain Code=3 "(null)" [SKTestSession] Error clearing overrides: Error Domain=SKInternalErrorDomain Code=3 "(null)" [SKTestSession] Error setting value to 1 for identifier 2 for jp.unext.mediaplayer: Error Domain=SKInternalErrorDomain Code=3 "(null)" And the simulator asks me to provide my AppleID. Tests have been broken since at least 26.4 The release notes claims that it has been fixed but not for me. https://developer.apple.com/documentation/ios-ipados-release-notes/ios-ipados-26_5-release-notes#StoreKit-Testing-in-Xcode Does anyone else have the same issue? Reported FB22774836 just in case.
Replies
6
Boosts
8
Views
452
Activity
1d
XCode Quick Help panel
I'm a big fan of keeping documentation in the code, so it appears at the point of use. Obviously, DocC and the Quick Help panel are a pretty important part of that strategy. Unfortunately, it only works randomly, so even if I've just build documentation (which should not even matter, the doc is just a cmd+click away), Quick Help stays blank, often even on system items like Label. It seems totally accidental, which makes it hard to make to reproduce. Sometimes an Xcode restart helps, sometimes not. Sometimes changing the editor display helps, sometimes not. Any tips on that?
Replies
1
Boosts
0
Views
96
Activity
1w
Workarounds for Xcode previews errors: Cannot preview in this file - Failed to Launch
I have started to have issues with SwiftUI previews of iOS apps with projects under the Documents folder. I have experimented that in Xcode 26.4 and I am still seeing it in 26.5. The error is: Cannot preview in this file. Failed to launch xyz.abc.TestApp Looking at the diagnostics, Xcode gets a permission denied error when trying to open /Users/me/Documents/path/to/TestApp/DerivedData/TestApp/Build/Intermediates.noindex/TestApp.build/Debug-iphonesimulator/TestApp.build/Objects-normal/arm64/ContentView.1.preview-thunk-launch.o Error details below. Note that I have set DerivedData folders relative to the projects' roots. Additional information: I get errors on freshly created iOS projects, just trying to preview the default ContentView. Xcode has full disk access set in System Preferences > Privacy & Security. I have cleaned build folders, deleted the simulators, Xcode itself, cleared various caches, restarted and reinstalled Xcode to no avail. Checking Editor > Canvas > Use Legacy Previews Execution did not fix it either. Apps run fine in Simulator. System info: macOS 26.4.1, Xcode 26.5 (17F42), MacBook Pro M1 and Mac Studio M2 Max. I have found two ways to fix the problem while keeping DerivedData relative to the project's root: create the project in some other “unprotected” directory (/Users/me/Developer in my case), or uncheck Editor > Canvas > Automatically Refresh Canvas. Either way makes previews work again. Possibly related: SwiftUI preview not working in Xcode 26 when “Automatically Refresh Canvas” is enabled Xcode 13.2.1 - Simulator works, Preview doesn't Excerpt from diagnostics: | | [Remote] JITError | | | | ================================== | | | | | [Remote] CouldNotLoadInputObjectFile: Could not load object file during preview: /Users/me/Documents/TestApp/DerivedData/TestApp/Build/Intermediates.noindex/TestApp.build/Debug-iphonesimulator/TestApp.build/Objects-normal/arm64/ContentView.1.preview-thunk-launch.o | | | | | | path: /Users/me/Documents/TestApp/DerivedData/TestApp/Build/Intermediates.noindex/TestApp.build/Debug-iphonesimulator/TestApp.build/Objects-normal/arm64/ContentView.1.preview-thunk-launch.o | | | | | | ================================== | | | | | | | [Remote] XOJITError | | | | | | | | XOJITError: '/Users/me/Documents/TestApp/DerivedData/TestApp/Build/Intermediates.noindex/TestApp.build/Debug-iphonesimulator/TestApp.build/Objects-normal/arm64/ContentView.1.preview-thunk-launch.o': Operation not permitted
Replies
4
Boosts
0
Views
159
Activity
1w
Xcode always shows error "Error Downloading Crash Log Information" when trying to download crash logs
For a couple of months now I haven't been able to see new crash reports for my App Store apps in Xcode. I see the list of crash reports in the Organizer, but selecting any of the new ones always shows the same error message: Error Downloading Crash Log Information: An error occurred preventing Xcode from downloading crash log information. "my.email at domain.com" failed with error: There was a failure decoding response: (HTTP 500, 20364 bytes) The data couldn't be read because it isn't in the correct format.. Pushing the Reload button makes the view load for a bit, but then the same error appears again. Since I want to keep fixing crashes in my apps as fast as possible, is Apple aware of the issue and working on a fix? I don't know if this is a Xcode or App Store Connect issue. I would have expected this issue to be fixed with the newest Xcode version 26.5, but it's still happening. I opened FB22589345 on April 23, but got no response so far.
Replies
3
Boosts
7
Views
187
Activity
1d
Bug in the Agentic Coding chat box
Since a few days ago, I noticed that every time you go to the top of the text in the Agentic Coding chat box, if you keep pressing the up arrow, the current message is replaced by the previous one. It's like someone decided to allow users to use the arrows to navigate to previous conversations in the same context, but this means that you are constantly jumping to previous messages by accident. The "feature" is error prone, confusing, and extremely annoying. If someone knows of an option in setting to disable it, please let me know. I'm constantly making mistakes, wasting tokens, editing the wrong message, and making the conversation confusing by sending the wrong message to the agent.
Replies
0
Boosts
0
Views
59
Activity
1w