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

Xcode Documentation

Posts under Xcode subtopic

Post

Replies

Boosts

Views

Activity

Unable to reset simulators
I'm unable to reset simulators using the menu or the xcrun simctl tool: <output of xcrun simctl list> == Devices == -- iOS 17.5 -- iPhone SE (3rd generation) (5A06623A-173D-4C96-8DD3-3E9FE39A06F1) (Shutdown) iPhone 15 (iOS 17.5) (F4329E8D-29BB-4EA7-8465-C11A98D04ED7) (Shutdown) -- iOS 18.0 -- iPhone SE (3rd generation) (2DDE8F03-F8E1-4C1B-8E28-CD9B208F3FFA) (Shutdown) iPhone 16 Pro (DE788688-8AC6-40A0-B25C-A56AA423798E) (Shutdown) iPhone 16 Pro Max (1405184C-36A9-40F3-B0D0-4EEB88452883) (Shutdown) iPhone 16 (0CBBA7DB-B20E-4F17-BBC5-910F1F6E1A0A) (Shutdown) iPhone 16 Plus (95421C27-11A0-4FCF-A889-DAAE8557B271) (Shutdown) == Device Pairs == ~/Library`` ❯ xcrun simctl erase 0CBBA7DB-B20E-4F17-BBC5-910F1F6E1A0A An error was encountered processing the command (domain=NSCocoaErrorDomain, code=513): “data” couldn’t be moved because you don’t have permission to access “Deleting-8FEDFF47-5B2F-4534-BCA2-036BBE68CE37”. You don’t have permission. To view or change permissions, select the item in the Finder and choose File > Get Info. Underlying error (domain=NSPOSIXErrorDomain, code=1): The operation couldn’t be completed. Operation not permitted Operation not permitted Xcode Version 16.0 (16A242d) MacOS 15.0.1 (24A348)
6
5
2.1k
1w
Xcode 27: spike in "Class X is implemented in both" warnings
Anyone else seeing a lot more "Class X is implemented in both ..." warnings on Xcode 27 than on Xcode 26? Same source, same flags, the count goes from a handful to a couple thousand, and some now correlate with real crashes (cast failures, missing protocol conformances) instead of the usual harmless first-wins behavior. Is this a known change in Swift 6.4 / Xcode 27? Is there a new flag I should be passing? Any suggestions welcome.
3
0
232
1w
Apps Built with Xcode 26 Fail to Launch on iOS 12 Devices While the Same Project Works Correctly When Built with Xcode 16
PLATFORM AND VERSION iOS Development environment: Xcode 26.4.1 (17E202) (or Xcode26.3 and Xcode26.5), macOS 26.4.1 (25E253) Run-time configuration: iOS iOS12.5.7 DESCRIPTION OF PROBLEM Applications built with Xcode 26 fail to launch on iOS 12 devices. The application installs successfully, but terminates immediately after launch. The application does not reach application startup code, including application:didFinishLaunchingWithOptions:. The same project, source code, build configuration, and deployment target work correctly on the same iOS 12 devices when built using Xcode 16. This issue appears to be related to binaries generated by Xcode 26 and is reproducible across multiple builds and devices running iOS 12. We would like to confirm whether iOS 12 is expected to remain supported when building applications with Xcode 26 and whether this behavior is a known issue. STEPS TO REPRODUCE Open an existing iOS application project. Set the deployment target to iOS 12.x. Build and archive the application using Xcode 26. Install the application on a physical device running iOS 12.x. Launch the application.
1
0
75
1w
Annoying popup window in Xcode Previews when the initial controller of the main storyboard is a macOS window
I started a project targeting macOS and used Storyboard app lifecycle. I also used Xcode Previews in this project. If I: Keep the entry point of the main storyboard to a window controller. (as default setup in macOS), Turn the Xcode window into full-screen, That window controller would pop up its window every time Xcode Previews refreshes. I tested in Xcode 26.3 RC and many versions before.
7
0
329
1w
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?
5
2
591
1w
Xcode 26: The horror of S-L-O-W T-Y-P-I-N-G returns
FB22844728 Xcode 26.5, macOS 26.5, MacStudio M1 64 GB The disaster of S-L-O-W T-Y-P-I-N-G that plagued Xcode several years ago returns. I guess all the ultra-advanced LLM neuroneirowebs still can't advise those at Apple who develop the Xcode app how to provide this uber-exotic, unheard-of functionality: JUST TYPING THE CODE. This disaster doesn't affect all projects, but it does affect the exact one I'm working on, and I need to type a lot of code there. Significant time is already wasted. I performed all the recommended steps like relaunching, restarting, and deleting deprived data with no effect. Hope something can be done about it..
5
0
325
1w
Using Xcode Build to build a framework, mach-o binary and a package separately
I am building an interactive application. My application architecture looks like this: There will be a LoaderBinary that will load 1 or more shared libraries (.framework in this case). This is also where the entry point from an OS perspective lies. There will be 1 or more frameworks built. This framework is expected to have large part of my logic as shared code so that multiple flows like the application flow, widget, notifications etc can reuse code by loading this framework itself. Now, I want to achieve the following: Building a framework independently - I believe this is doable and works fine too. Building a mach-o binary - This is what we are not clear if it is allowed or not to build just a mach-o binary ? Yes, there is an option to build a command-line tool but as this is an interactive binary, what should be the path to take ? Building a macOS bundle (.app) using 1 and 2 - Now, as I have a PRE-BUILT framework and a PRE-BUILT mach-o binary, can I create a application bundle using these ? Some directions here will help to take this forward - in alignment with both my architecture as well as how Apple Build system works. Thanks!
3
1
230
1w
Apple watch Xcode pairing & connection issues
I’m blocked debugging a watchOS app on a physical Apple Watch. The iPhone connects to Xcode normally (wired), but the Watch either fails to connect with a tunnel timeout or disappears entirely from Xcode after I unpaired it inside Devices & Simulators. Environment Mac: macOS 26.x (Apple Silicon Mac) Xcode: 26.2 iPhone: iOS 26.1 Apple Watch Ultra: watchOS 26.2 (build 23S303) Connection: iPhone connected to Mac via USB (trusted). Watch paired to iPhone and working normally in the Watch app. Issue A (when Watch is visible in Xcode) In Xcode → Window → Devices and Simulators, the Watch shows up but is not usable and fails to connect. Error: “Previous preparation error: A connection to this device could not be established.” “Timed out while attempting to establish tunnel using negotiated network parameters.” In some attempts the Watch shows “Capacity: Unknown” / limited details, and then fails during preparation. Issue B (after unpairing Watch in Xcode only) I unpaired/removed the Watch in Xcode (Devices & Simulators). I did not unpair the Watch from the iPhone. Now: iPhone appears in Xcode and works normally for builds. Watch is still paired to the iPhone and works normally. Watch no longer appears anywhere in Xcode Devices & Simulators (no paired watch section, no watch run destination). What I’ve tried Reboots of Mac, iPhone, Watch (multiple times) Watch unlocked, awake; iPhone unlocked and close to Watch Verified Watch is paired and connected in iPhone Watch app Developer Mode enabled on iPhone and Watch Wi-Fi and Bluetooth ON (Mac/iPhone/Watch), tried toggling both Tried on home Wi-Fi and also with iPhone hotspot (same result) Resetting trust prompts / reconnecting iPhone via USB, re-trusting Mac Apple Watch: “Clear Trusted Computers” Xcode: removing/re-adding devices; clearing derived data; restarting Xcode Watch Developer networking test: Responsiveness = Medium (430 RPM) Questions 1. Is this a known issue/regression with Xcode 26.2 + watchOS 26.2 tunneling (CoreDevice / devicectl)? 2. Is there an Apple-supported way to force Xcode to re-discover a paired Watch after it was removed from Xcode Devices & Simulators (without unpairing the Watch from the iPhone)? 3. Any recommended logs or diagnostic steps I should collect (Console logs, sysdiagnose, specific Xcode/CoreDevice logs) to include in a Feedback report? If helpful, I can provide the full error text from Xcode’s Devices window and any logs you recommend. Thank you in advance,
21
15
2.7k
1w
Screen recording shows iOS 26 navigation/sheet transition corner-rounding
When taking a recording of my app on simulator or iPhone, the recording shows the bottom corners of content go from rounded to square during normal push and sheet transitions. Steps to reproduce: Create a new SwiftUI app and use the attached content view. Run on an iOS 26 Simulator. Start a Simulator screen recording. Tap a row to push, and tap "Filter" to present the sheet. Stop the recording and play it back frame by frame. You should be able to see the bottom corners round and go to square during the screen navigation. Question: Is there a bug when recording the apps on iOS 26? Configuration: Xcode 26.4.1 iOS 26 Simulator — iPhone 17 Pro Real device: iPhone 16 Pro Max Attachments: ContentView Link to the recording: https://drive.google.com/file/d/1HIwGXC39EVTbRVhJWBdFTJYCENuLxcc_/view?usp=drive_link For Reference: https://developer.apple.com/forums/thread/792662
0
0
40
1w
Xcode Codex sign-in fails after updating OpenAI component
Environment: macOS: Tahoe 26.4 Xcode: 26.5 ChatGPT account successfully authenticated Codex CLI installed and working Codex App installed and working Steps to reproduce: Install Xcode Codex/OpenAI component version where GPT-5.4 is the highest available model. Sign in with ChatGPT account. Confirm Codex works in Xcode. Update the OpenAI/Codex component in Xcode. Attempt to sign in again. Expected result: Xcode completes authentication and shows signed-in status. Actual result: Browser successfully completes authentication and displays "Signed in to Codex." Xcode remains in a sign-in loop or shows "Not Signed In." Authentication never completes. Additional observations: Codex CLI authentication succeeds. Codex App authentication succeeds. ChatGPT web/app access succeeds. Anthropic/Claude component updates continue to work normally in Xcode. Issue appears specific to the updated OpenAI/Codex Xcode component. Older component (GPT-5.4 maximum model available) authenticates successfully.
3
5
450
1w
Calling .spotlightQuery() using AppIntentsTesting results in a crash on Xcode 27 beta 1
On https://developer.apple.com/documentation/AppIntentsTesting/testing-your-app-intents-code Apple showcases the following example using AppIntentsTesting to query entities indexed in spotlight. For me, calling .spotlightQuery on any entity definition causes a crash. func testAllEventsIndexed() async throws { let eventDef = definitions.entities["EventEntity"] let allIndexed = try await eventDef .spotlightQuery(nil) XCTAssertGreaterThanOrEqual(allIndexed.count, 3) } Crash: expression unexpectedly raised an error: Failed to obtain the result of the distributed invocation after it was executed. Remote threw executionPermissionDenied(requestBundleID: Is anyone else seeing this crash, or is it just me? Thanks!
4
0
141
1w
Simulator screen recording shows iOS 26 navigation/sheet transition corner-rounding that is not visible on device
On iOS 26, a Simulator screen recording shows the bottom corners of content go from rounded to square during normal push and sheet transitions. This happens on the simulator, but I don't see this on a real iPhone. Steps to reproduce: Create a new SwiftUI app and use the attached content view. Run on an iOS 26 Simulator. Start a Simulator screen recording. Tap a row to push, and tap "Filter" to present the sheet. Stop the recording and play it back frame by frame. Run the same app on a real iPhone and watch the transitions live. Question: Is this a new feature or a simulator bug? Configuration: Xcode 26.4.1 iOS 26 Simulator — iPhone 17 Pro Real device: iPhone 16 Pro Max Attachments: ContentView
0
0
33
1w
Xcode 26 on macOS 27?
It doesn't seem to be able to launch. It says "This version of Xcode is not compatible with this version of macOS." So, does that mean that users who have updated to macOS 27 cannot submit apps to the App Store? Do I have to wait until Xcode 27 starts accepting submissions? Environment: macOS 27.0 / Xcode 26.6 RC
1
5
437
1w
Xcode 26.4 breaks compilation
With the latest Xcode 26.4 my project fails to compile due to a "compiler unable to type-check in reasonable time" error with a library I've been using for years and has not changed. The library is https://github.com/ngageoint/mgrs-ios and is specifically around this line https://github.com/ngageoint/mgrs-ios/blob/master/mgrs-ios/utm/UTM.swift#L96. Since this isn't my library I can't change it, but again we've been using this library for years now without issue - it was only when Xcode updated this morning that our compilation workflow broke. (Compilation machine is an M3 Pro with 18GB of RAM, so I don't think that's the problem here)
4
2
317
1w
Xcode 26.4 and 26.3: Swift compiler crashes during archive with iOS 17 deployment target
I submitted this to Feedback Assistant as FB22331090 and wanted to share a minimal reproducible example here in case others are seeing the same issue. Environment: Xcode 26.4 or Xcode 26.3 Apple Swift version 6.3 (swiftlang-6.3.0.123.5 clang-2100.0.123.102) Effective Swift language version 5.10 Deployment target: iOS 17.0 The sample app builds successfully for normal development use, but archive fails. The crash happens during optimization in EarlyPerfInliner while compiling the synthesized deinit of a nested generic Coordinator class. The coordinator stores a UIHostingController. Minimal reproducer: import SwiftUI struct ReproView<Content: View>: UIViewRepresentable { let content: Content func makeUIView(context: Context) -> UIView { context.coordinator.host.view } func updateUIView(_ uiView: UIView, context: Context) { context.coordinator.host.rootView = content } func makeCoordinator() -> Coordinator { Coordinator(content: content) } final class Coordinator { let host: UIHostingController<Content> init(content: Content) { host = UIHostingController(rootView: content) } } } Used from ContentView like this: ReproView(content: Text("Hello")) Steps: Create a new SwiftUI iOS app. Set deployment target to iOS 17.0. Add the code above. Archive. Expected result: Archive succeeds, or the compiler emits a normal diagnostic. Actual result: The Swift compiler crashes and prints: "Please submit a bug report" "While running pass ... SILFunctionTransform 'EarlyPerfInliner'" The crash occurs while compiling the synthesized deinit for ReproView.Coordinator. Relevant log lines from my archive log: line 209: Please submit a bug report line 215: While running pass ... EarlyPerfInliner line 216: for 'deinit' at ReproView.swift:19:17 One more detail: The same sample archived successfully when the deployment target was higher. Lowering the deployment target to iOS 17.0 made the archive crash reproducible. This may be related to another forum thread about release-only compiler crashes, but the reproducer here is different: this one uses a generic UIViewRepresentable with a nested Coordinator storing UIHostingController.
3
1
392
1w
Is SKTestSession available for Swift Package tests?
I'm trying to test my StoreKit package using local "Consumable.storekit" configuration added to test target as a .copy() resource. I receive various errors. On purchase attempts I receive StoreKitError.unknown. In the console I see this diagnostic messages: [SKTestSession] Error saving configuration file: Error Domain=SKInternalErrorDomain Code=3 "(null)" [SKTestSession] Error setting value to 1 for identifier 2 for com.apple.dt.xctest.tool: Error Domain=SKInternalErrorDomain Code=3 "(null)" I these last two cases product loading failed. It feels like session require mutable .storekit file? Also, some people mention that Host Application must be selected, but it's related to Xcode projects. What is the correct way to test StoreKit within a Swift Package?
1
0
102
1w
Unable to debug with iOS 27 and xcode-beta
▿ DeviceKit.(unknown context at $1058036ec).ErrorDescription title: "The developer disk image could not be mounted on this device." errorClass: "CoreDeviceError" errorCode: "12040" DeviceIdentifier: 0DFB4363-6028-52E1-8C03-17D79DAxxxx #0 super: NSMutableString super: NSString super: NSObject ▿ underlyingErrors: 1 element ▿ DeviceKit.(unknown context at $1058036ec).ErrorDescription - title: "Personalization of the Cryptex-based developer disk image failed." - errorClass: "NSError" - errorCode: "12051" - DDIBuildUpdate: 27A5194q (developerTools) #1 - super: NSMutableString - super: NSString - super: NSObject - DDIPath: /Library/Developer/DeveloperDiskImages/iOS_DDI #2 - super: NSMutableString - super: NSString - super: NSObject - DDIPlatform: iOS #3 - super: NSString - super: NSObject - DDIVariant: external #4 - super: NSString - super: NSObject - DeviceBoardID: 4 #5 - super: NSNumber - super: NSValue - super: NSObject - DeviceChipID: 33040 #6 - super: NSNumber - super: NSValue - super: NSObject - DeviceFusing: prod #7 - super: NSString - super: NSObject - DeviceIdentifier: 0DFB4363-6028-52E1-8C03-17D79DA5E159 #8 - super: NSMutableString - super: NSString - super: NSObject - NSLocalizedFailureReason: An error occurred while personalizing the developer disk image. #9 - super: NSMutableString - super: NSString - super: NSObject - NSLocalizedRecoverySuggestion: Ensure the device is running a supported version of the operating system. If the issue persists, gather a diagnostic report by running 'devicectl diagnose' from Terminal and file a bug report at https://bugreport.apple.com. #10 - super: NSMutableString - super: NSString - super: NSObject - NSURL: file:///Library/Developer/DeveloperDiskImages/iOS_DDI/ #11 - super: NSObject - UseCredentials: 0 #12 - super: NSNumber - super: NSValue - super: NSObject ▿ underlyingErrors: 1 element ▿ DeviceKit.(unknown context at $1058036ec).ErrorDescription - title: "The operation couldn’t be completed. (CryptexKitHost.TatsuError error 4.)" - errorClass: "NSError" - errorCode: "4"
2
1
150
1w
Linker trying to link Metal toolchain for every object file on Catalyst
When building our project for Mac Catalyst with Xcode 26.2, we get this warning almost a hundred times, once for every object file: directory not found for option '-L/var/run/com.apple.security.cryptexd/mnt/com.apple.MobileAsset.MetalToolchain-v17.3.48.0.UZtKea/Metal.xctoolchain/usr/lib/swift/maccatalyst' Somehow, every Link <FileName>.o build step got the following parameter, regardless if the target contained Metal files or not: -L/var/run/com.apple.security.cryptexd/mnt/com.apple.MobileAsset.MetalToolchain-v17.3.48.0.UZtKea/Metal.xctoolchain/usr/lib/swift/maccatalyst The toolchain is mounted at this point, but the directory usr/lib/swift/maccatalyst doesn't exist. When building the project for iOS, the option doesn't exist and the warning is not shown. We already check the build settings, but we couldn't find a reason why the linker is trying to link against the toolchain here. Even for targets that do contain Metal files, we get the following linker warning: search path '/var/run/com.apple.security.cryptexd/mnt/com.apple.MobileAsset.MetalToolchain-v17.3.48.0.UZtKea/Metal.xctoolchain/usr/lib/swift/maccatalyst' not found Is this a known issue? Is there a way to get rid of these warnings?
2
3
1.1k
1w
Unable to reset simulators
I'm unable to reset simulators using the menu or the xcrun simctl tool: <output of xcrun simctl list> == Devices == -- iOS 17.5 -- iPhone SE (3rd generation) (5A06623A-173D-4C96-8DD3-3E9FE39A06F1) (Shutdown) iPhone 15 (iOS 17.5) (F4329E8D-29BB-4EA7-8465-C11A98D04ED7) (Shutdown) -- iOS 18.0 -- iPhone SE (3rd generation) (2DDE8F03-F8E1-4C1B-8E28-CD9B208F3FFA) (Shutdown) iPhone 16 Pro (DE788688-8AC6-40A0-B25C-A56AA423798E) (Shutdown) iPhone 16 Pro Max (1405184C-36A9-40F3-B0D0-4EEB88452883) (Shutdown) iPhone 16 (0CBBA7DB-B20E-4F17-BBC5-910F1F6E1A0A) (Shutdown) iPhone 16 Plus (95421C27-11A0-4FCF-A889-DAAE8557B271) (Shutdown) == Device Pairs == ~/Library`` ❯ xcrun simctl erase 0CBBA7DB-B20E-4F17-BBC5-910F1F6E1A0A An error was encountered processing the command (domain=NSCocoaErrorDomain, code=513): “data” couldn’t be moved because you don’t have permission to access “Deleting-8FEDFF47-5B2F-4534-BCA2-036BBE68CE37”. You don’t have permission. To view or change permissions, select the item in the Finder and choose File > Get Info. Underlying error (domain=NSPOSIXErrorDomain, code=1): The operation couldn’t be completed. Operation not permitted Operation not permitted Xcode Version 16.0 (16A242d) MacOS 15.0.1 (24A348)
Replies
6
Boosts
5
Views
2.1k
Activity
1w
Xcode 27: spike in "Class X is implemented in both" warnings
Anyone else seeing a lot more "Class X is implemented in both ..." warnings on Xcode 27 than on Xcode 26? Same source, same flags, the count goes from a handful to a couple thousand, and some now correlate with real crashes (cast failures, missing protocol conformances) instead of the usual harmless first-wins behavior. Is this a known change in Swift 6.4 / Xcode 27? Is there a new flag I should be passing? Any suggestions welcome.
Replies
3
Boosts
0
Views
232
Activity
1w
Apps Built with Xcode 26 Fail to Launch on iOS 12 Devices While the Same Project Works Correctly When Built with Xcode 16
PLATFORM AND VERSION iOS Development environment: Xcode 26.4.1 (17E202) (or Xcode26.3 and Xcode26.5), macOS 26.4.1 (25E253) Run-time configuration: iOS iOS12.5.7 DESCRIPTION OF PROBLEM Applications built with Xcode 26 fail to launch on iOS 12 devices. The application installs successfully, but terminates immediately after launch. The application does not reach application startup code, including application:didFinishLaunchingWithOptions:. The same project, source code, build configuration, and deployment target work correctly on the same iOS 12 devices when built using Xcode 16. This issue appears to be related to binaries generated by Xcode 26 and is reproducible across multiple builds and devices running iOS 12. We would like to confirm whether iOS 12 is expected to remain supported when building applications with Xcode 26 and whether this behavior is a known issue. STEPS TO REPRODUCE Open an existing iOS application project. Set the deployment target to iOS 12.x. Build and archive the application using Xcode 26. Install the application on a physical device running iOS 12.x. Launch the application.
Replies
1
Boosts
0
Views
75
Activity
1w
Codex integration just stopped working
Nothing changed on my end, Pro subscription still active, but Xcode 26.5 (17F42) simply does not want to log into Codex anymore. It opens the OAuth flow and after finishing and closing the window, it still says "Not Signed In". Codex login works everywhere else, including the Codex app. What to do?
Replies
27
Boosts
3
Views
1.3k
Activity
1w
Model switching inside Coding Assistant
Is anyone else finding model switching a bit disruptive during longer coding sessions? As we start using different models for exploration, implementation and review, having to go through settings interrupts the workflow. I would love to see model and reasoning controls directly inside the Coding Assistant UI.
Replies
0
Boosts
0
Views
75
Activity
1w
Annoying popup window in Xcode Previews when the initial controller of the main storyboard is a macOS window
I started a project targeting macOS and used Storyboard app lifecycle. I also used Xcode Previews in this project. If I: Keep the entry point of the main storyboard to a window controller. (as default setup in macOS), Turn the Xcode window into full-screen, That window controller would pop up its window every time Xcode Previews refreshes. I tested in Xcode 26.3 RC and many versions before.
Replies
7
Boosts
0
Views
329
Activity
1w
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
5
Boosts
2
Views
591
Activity
1w
Xcode 26: The horror of S-L-O-W T-Y-P-I-N-G returns
FB22844728 Xcode 26.5, macOS 26.5, MacStudio M1 64 GB The disaster of S-L-O-W T-Y-P-I-N-G that plagued Xcode several years ago returns. I guess all the ultra-advanced LLM neuroneirowebs still can't advise those at Apple who develop the Xcode app how to provide this uber-exotic, unheard-of functionality: JUST TYPING THE CODE. This disaster doesn't affect all projects, but it does affect the exact one I'm working on, and I need to type a lot of code there. Significant time is already wasted. I performed all the recommended steps like relaunching, restarting, and deleting deprived data with no effect. Hope something can be done about it..
Replies
5
Boosts
0
Views
325
Activity
1w
Using Xcode Build to build a framework, mach-o binary and a package separately
I am building an interactive application. My application architecture looks like this: There will be a LoaderBinary that will load 1 or more shared libraries (.framework in this case). This is also where the entry point from an OS perspective lies. There will be 1 or more frameworks built. This framework is expected to have large part of my logic as shared code so that multiple flows like the application flow, widget, notifications etc can reuse code by loading this framework itself. Now, I want to achieve the following: Building a framework independently - I believe this is doable and works fine too. Building a mach-o binary - This is what we are not clear if it is allowed or not to build just a mach-o binary ? Yes, there is an option to build a command-line tool but as this is an interactive binary, what should be the path to take ? Building a macOS bundle (.app) using 1 and 2 - Now, as I have a PRE-BUILT framework and a PRE-BUILT mach-o binary, can I create a application bundle using these ? Some directions here will help to take this forward - in alignment with both my architecture as well as how Apple Build system works. Thanks!
Replies
3
Boosts
1
Views
230
Activity
1w
Apple watch Xcode pairing & connection issues
I’m blocked debugging a watchOS app on a physical Apple Watch. The iPhone connects to Xcode normally (wired), but the Watch either fails to connect with a tunnel timeout or disappears entirely from Xcode after I unpaired it inside Devices & Simulators. Environment Mac: macOS 26.x (Apple Silicon Mac) Xcode: 26.2 iPhone: iOS 26.1 Apple Watch Ultra: watchOS 26.2 (build 23S303) Connection: iPhone connected to Mac via USB (trusted). Watch paired to iPhone and working normally in the Watch app. Issue A (when Watch is visible in Xcode) In Xcode → Window → Devices and Simulators, the Watch shows up but is not usable and fails to connect. Error: “Previous preparation error: A connection to this device could not be established.” “Timed out while attempting to establish tunnel using negotiated network parameters.” In some attempts the Watch shows “Capacity: Unknown” / limited details, and then fails during preparation. Issue B (after unpairing Watch in Xcode only) I unpaired/removed the Watch in Xcode (Devices & Simulators). I did not unpair the Watch from the iPhone. Now: iPhone appears in Xcode and works normally for builds. Watch is still paired to the iPhone and works normally. Watch no longer appears anywhere in Xcode Devices & Simulators (no paired watch section, no watch run destination). What I’ve tried Reboots of Mac, iPhone, Watch (multiple times) Watch unlocked, awake; iPhone unlocked and close to Watch Verified Watch is paired and connected in iPhone Watch app Developer Mode enabled on iPhone and Watch Wi-Fi and Bluetooth ON (Mac/iPhone/Watch), tried toggling both Tried on home Wi-Fi and also with iPhone hotspot (same result) Resetting trust prompts / reconnecting iPhone via USB, re-trusting Mac Apple Watch: “Clear Trusted Computers” Xcode: removing/re-adding devices; clearing derived data; restarting Xcode Watch Developer networking test: Responsiveness = Medium (430 RPM) Questions 1. Is this a known issue/regression with Xcode 26.2 + watchOS 26.2 tunneling (CoreDevice / devicectl)? 2. Is there an Apple-supported way to force Xcode to re-discover a paired Watch after it was removed from Xcode Devices & Simulators (without unpairing the Watch from the iPhone)? 3. Any recommended logs or diagnostic steps I should collect (Console logs, sysdiagnose, specific Xcode/CoreDevice logs) to include in a Feedback report? If helpful, I can provide the full error text from Xcode’s Devices window and any logs you recommend. Thank you in advance,
Replies
21
Boosts
15
Views
2.7k
Activity
1w
Screen recording shows iOS 26 navigation/sheet transition corner-rounding
When taking a recording of my app on simulator or iPhone, the recording shows the bottom corners of content go from rounded to square during normal push and sheet transitions. Steps to reproduce: Create a new SwiftUI app and use the attached content view. Run on an iOS 26 Simulator. Start a Simulator screen recording. Tap a row to push, and tap "Filter" to present the sheet. Stop the recording and play it back frame by frame. You should be able to see the bottom corners round and go to square during the screen navigation. Question: Is there a bug when recording the apps on iOS 26? Configuration: Xcode 26.4.1 iOS 26 Simulator — iPhone 17 Pro Real device: iPhone 16 Pro Max Attachments: ContentView Link to the recording: https://drive.google.com/file/d/1HIwGXC39EVTbRVhJWBdFTJYCENuLxcc_/view?usp=drive_link For Reference: https://developer.apple.com/forums/thread/792662
Replies
0
Boosts
0
Views
40
Activity
1w
Xcode Codex sign-in fails after updating OpenAI component
Environment: macOS: Tahoe 26.4 Xcode: 26.5 ChatGPT account successfully authenticated Codex CLI installed and working Codex App installed and working Steps to reproduce: Install Xcode Codex/OpenAI component version where GPT-5.4 is the highest available model. Sign in with ChatGPT account. Confirm Codex works in Xcode. Update the OpenAI/Codex component in Xcode. Attempt to sign in again. Expected result: Xcode completes authentication and shows signed-in status. Actual result: Browser successfully completes authentication and displays "Signed in to Codex." Xcode remains in a sign-in loop or shows "Not Signed In." Authentication never completes. Additional observations: Codex CLI authentication succeeds. Codex App authentication succeeds. ChatGPT web/app access succeeds. Anthropic/Claude component updates continue to work normally in Xcode. Issue appears specific to the updated OpenAI/Codex Xcode component. Older component (GPT-5.4 maximum model available) authenticates successfully.
Replies
3
Boosts
5
Views
450
Activity
1w
Calling .spotlightQuery() using AppIntentsTesting results in a crash on Xcode 27 beta 1
On https://developer.apple.com/documentation/AppIntentsTesting/testing-your-app-intents-code Apple showcases the following example using AppIntentsTesting to query entities indexed in spotlight. For me, calling .spotlightQuery on any entity definition causes a crash. func testAllEventsIndexed() async throws { let eventDef = definitions.entities["EventEntity"] let allIndexed = try await eventDef .spotlightQuery(nil) XCTAssertGreaterThanOrEqual(allIndexed.count, 3) } Crash: expression unexpectedly raised an error: Failed to obtain the result of the distributed invocation after it was executed. Remote threw executionPermissionDenied(requestBundleID: Is anyone else seeing this crash, or is it just me? Thanks!
Replies
4
Boosts
0
Views
141
Activity
1w
Simulator screen recording shows iOS 26 navigation/sheet transition corner-rounding that is not visible on device
On iOS 26, a Simulator screen recording shows the bottom corners of content go from rounded to square during normal push and sheet transitions. This happens on the simulator, but I don't see this on a real iPhone. Steps to reproduce: Create a new SwiftUI app and use the attached content view. Run on an iOS 26 Simulator. Start a Simulator screen recording. Tap a row to push, and tap "Filter" to present the sheet. Stop the recording and play it back frame by frame. Run the same app on a real iPhone and watch the transitions live. Question: Is this a new feature or a simulator bug? Configuration: Xcode 26.4.1 iOS 26 Simulator — iPhone 17 Pro Real device: iPhone 16 Pro Max Attachments: ContentView
Replies
0
Boosts
0
Views
33
Activity
1w
Xcode 26 on macOS 27?
It doesn't seem to be able to launch. It says "This version of Xcode is not compatible with this version of macOS." So, does that mean that users who have updated to macOS 27 cannot submit apps to the App Store? Do I have to wait until Xcode 27 starts accepting submissions? Environment: macOS 27.0 / Xcode 26.6 RC
Replies
1
Boosts
5
Views
437
Activity
1w
Xcode 26.4 breaks compilation
With the latest Xcode 26.4 my project fails to compile due to a "compiler unable to type-check in reasonable time" error with a library I've been using for years and has not changed. The library is https://github.com/ngageoint/mgrs-ios and is specifically around this line https://github.com/ngageoint/mgrs-ios/blob/master/mgrs-ios/utm/UTM.swift#L96. Since this isn't my library I can't change it, but again we've been using this library for years now without issue - it was only when Xcode updated this morning that our compilation workflow broke. (Compilation machine is an M3 Pro with 18GB of RAM, so I don't think that's the problem here)
Replies
4
Boosts
2
Views
317
Activity
1w
Xcode 26.4 and 26.3: Swift compiler crashes during archive with iOS 17 deployment target
I submitted this to Feedback Assistant as FB22331090 and wanted to share a minimal reproducible example here in case others are seeing the same issue. Environment: Xcode 26.4 or Xcode 26.3 Apple Swift version 6.3 (swiftlang-6.3.0.123.5 clang-2100.0.123.102) Effective Swift language version 5.10 Deployment target: iOS 17.0 The sample app builds successfully for normal development use, but archive fails. The crash happens during optimization in EarlyPerfInliner while compiling the synthesized deinit of a nested generic Coordinator class. The coordinator stores a UIHostingController. Minimal reproducer: import SwiftUI struct ReproView<Content: View>: UIViewRepresentable { let content: Content func makeUIView(context: Context) -> UIView { context.coordinator.host.view } func updateUIView(_ uiView: UIView, context: Context) { context.coordinator.host.rootView = content } func makeCoordinator() -> Coordinator { Coordinator(content: content) } final class Coordinator { let host: UIHostingController<Content> init(content: Content) { host = UIHostingController(rootView: content) } } } Used from ContentView like this: ReproView(content: Text("Hello")) Steps: Create a new SwiftUI iOS app. Set deployment target to iOS 17.0. Add the code above. Archive. Expected result: Archive succeeds, or the compiler emits a normal diagnostic. Actual result: The Swift compiler crashes and prints: "Please submit a bug report" "While running pass ... SILFunctionTransform 'EarlyPerfInliner'" The crash occurs while compiling the synthesized deinit for ReproView.Coordinator. Relevant log lines from my archive log: line 209: Please submit a bug report line 215: While running pass ... EarlyPerfInliner line 216: for 'deinit' at ReproView.swift:19:17 One more detail: The same sample archived successfully when the deployment target was higher. Lowering the deployment target to iOS 17.0 made the archive crash reproducible. This may be related to another forum thread about release-only compiler crashes, but the reproducer here is different: this one uses a generic UIViewRepresentable with a nested Coordinator storing UIHostingController.
Replies
3
Boosts
1
Views
392
Activity
1w
Is SKTestSession available for Swift Package tests?
I'm trying to test my StoreKit package using local "Consumable.storekit" configuration added to test target as a .copy() resource. I receive various errors. On purchase attempts I receive StoreKitError.unknown. In the console I see this diagnostic messages: [SKTestSession] Error saving configuration file: Error Domain=SKInternalErrorDomain Code=3 "(null)" [SKTestSession] Error setting value to 1 for identifier 2 for com.apple.dt.xctest.tool: Error Domain=SKInternalErrorDomain Code=3 "(null)" I these last two cases product loading failed. It feels like session require mutable .storekit file? Also, some people mention that Host Application must be selected, but it's related to Xcode projects. What is the correct way to test StoreKit within a Swift Package?
Replies
1
Boosts
0
Views
102
Activity
1w
Unable to debug with iOS 27 and xcode-beta
▿ DeviceKit.(unknown context at $1058036ec).ErrorDescription title: "The developer disk image could not be mounted on this device." errorClass: "CoreDeviceError" errorCode: "12040" DeviceIdentifier: 0DFB4363-6028-52E1-8C03-17D79DAxxxx #0 super: NSMutableString super: NSString super: NSObject ▿ underlyingErrors: 1 element ▿ DeviceKit.(unknown context at $1058036ec).ErrorDescription - title: "Personalization of the Cryptex-based developer disk image failed." - errorClass: "NSError" - errorCode: "12051" - DDIBuildUpdate: 27A5194q (developerTools) #1 - super: NSMutableString - super: NSString - super: NSObject - DDIPath: /Library/Developer/DeveloperDiskImages/iOS_DDI #2 - super: NSMutableString - super: NSString - super: NSObject - DDIPlatform: iOS #3 - super: NSString - super: NSObject - DDIVariant: external #4 - super: NSString - super: NSObject - DeviceBoardID: 4 #5 - super: NSNumber - super: NSValue - super: NSObject - DeviceChipID: 33040 #6 - super: NSNumber - super: NSValue - super: NSObject - DeviceFusing: prod #7 - super: NSString - super: NSObject - DeviceIdentifier: 0DFB4363-6028-52E1-8C03-17D79DA5E159 #8 - super: NSMutableString - super: NSString - super: NSObject - NSLocalizedFailureReason: An error occurred while personalizing the developer disk image. #9 - super: NSMutableString - super: NSString - super: NSObject - NSLocalizedRecoverySuggestion: Ensure the device is running a supported version of the operating system. If the issue persists, gather a diagnostic report by running 'devicectl diagnose' from Terminal and file a bug report at https://bugreport.apple.com. #10 - super: NSMutableString - super: NSString - super: NSObject - NSURL: file:///Library/Developer/DeveloperDiskImages/iOS_DDI/ #11 - super: NSObject - UseCredentials: 0 #12 - super: NSNumber - super: NSValue - super: NSObject ▿ underlyingErrors: 1 element ▿ DeviceKit.(unknown context at $1058036ec).ErrorDescription - title: "The operation couldn’t be completed. (CryptexKitHost.TatsuError error 4.)" - errorClass: "NSError" - errorCode: "4"
Replies
2
Boosts
1
Views
150
Activity
1w
Linker trying to link Metal toolchain for every object file on Catalyst
When building our project for Mac Catalyst with Xcode 26.2, we get this warning almost a hundred times, once for every object file: directory not found for option '-L/var/run/com.apple.security.cryptexd/mnt/com.apple.MobileAsset.MetalToolchain-v17.3.48.0.UZtKea/Metal.xctoolchain/usr/lib/swift/maccatalyst' Somehow, every Link <FileName>.o build step got the following parameter, regardless if the target contained Metal files or not: -L/var/run/com.apple.security.cryptexd/mnt/com.apple.MobileAsset.MetalToolchain-v17.3.48.0.UZtKea/Metal.xctoolchain/usr/lib/swift/maccatalyst The toolchain is mounted at this point, but the directory usr/lib/swift/maccatalyst doesn't exist. When building the project for iOS, the option doesn't exist and the warning is not shown. We already check the build settings, but we couldn't find a reason why the linker is trying to link against the toolchain here. Even for targets that do contain Metal files, we get the following linker warning: search path '/var/run/com.apple.security.cryptexd/mnt/com.apple.MobileAsset.MetalToolchain-v17.3.48.0.UZtKea/Metal.xctoolchain/usr/lib/swift/maccatalyst' not found Is this a known issue? Is there a way to get rid of these warnings?
Replies
2
Boosts
3
Views
1.1k
Activity
1w