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 27 - "Clear Recent" options is missing from run destinations
Overview On Xcode 27, when trying to run on a specific destination, the option to “Clear Recent” is missing. This was available in Xcode 26. Manage Devices option exists, but this is to permanently add / remove destinations, this is different from “Clear Recent”. Please bring back “Clear Recent” (from Xcode 26 to Xcode 27) option to Xcode as it is very useful Environment: macOS 26.5.1 (25F80) Xcode 27.0 beta (27A5194q) Feedback FB23055381
3
0
213
3w
[Feature request] Xcode 27 Easier Previewing while using coding agent
Filed a feature request in feedback assistant, but starting a discussion here as well since I'm probably not the only one. The issue I have is that coding assistant and previews seem to be mutually exclusive. That means that when I'm iterating on UI, I either have to rely on the coding assistant showing me preview screenshots (cannot interact), firing up Device Hub (have to manually kick off a build after each change) or manually opening the associated preview (requires a lot of hoping back and forth). This feels inefficient and means I have to hop around and manage my windows and tabs more. A slight work around is to open a split view with the file and preview there. This layout is inefficient and clunky. I would love if Xcode supported a pinned preview next to coding assistant (or automatically showed the relevant one). I imagine this working just like showing a preview next to a file cmd + opt + return hides/shows the preview. FB23219611
3
0
317
3w
Build
I don’t have a plus sign next to build in my app developer account page, so I can’t upload my app or send it in for review… anyone have this happen to them? Any solutions besides wait for them to fix it internally?
0
0
56
3w
Xcode 27 Beta 1: Agent fails to work on Library project: "AgentLS: The tool failed with no output"
First of all: I love the Xcode implementation of agents. Even right out the gate it works really well on regular projects. However it's rough around the edges--it's beta 1 after all, and I've been prodding around the permissions section. My configuration: macOS 26.5.1, Gemini 3.1 Pro agent via Gemini Enterprise Agent Platform Things were working fine until I got nervous about the agent downloading things using google_web_search and web_fetch since I expected the agent to do that in the cloud but apparently it's automatically downloading stuff to my device, so I disabled those tools out of caution. Later I stumbled upon the skills documents in /Users/USERNAME/Library/Developer/Xcode/CodingAssistant/gemini/.gemini/GEMINI.md which basically tells the agent to: ...take special care to avoid using command line tools like ls or find just to learn basic information about the project or its contents. The user may be prompted to approve every single one of those command line invocations, so it's best to use them sparingly. So I said "Why not?" and deleted the rest of the permissions for better security--you never know what a beta 1 agent might do, and the text implies the worst that'll happen is they'll ask for permission. Now my agent permissions page is empty. After I did that I noticed my agent no longer works in the library project I've been working on. It can't read project files at all, even though things were fine before. Strangely, the agent works just fine in a regular app project--it's just acting up in the library project. Here's a sample of the verbose output: Thinking: I'm currently examining the workspace path provided, which appears to differ slightly from the actual file structure I'm encountering within the PROJECTNAME directory. I'm trying to reconcile this discrepancy. I've realized the paths provided are Xcode workspace-relative and require specific Xcode tools for interaction. I was attempting direct file system access, which is incorrect. I will now attempt to use the appropriate mcp_xcode-tools commands, similar to how I successfully used XcodeLS earlier, to access these files within the project context. I attempted to use mcp_xcode-tools_XcodeRead, but it wasn't recognized. It seems the Xcode tools are not available in my current Plan Mode environment, which is perplexing given previous successful usage. I need to investigate this discrepancy further. AgentLS: The tool failed with no output. Thinking: I'm currently examining the contents of the /Users/USERNAME/Documents/PROJECTNAME/.swiftpm/xcode directory to understand the project structure. OBJECTNAME: 0 items Thinking: I'm currently trying to figure out the best way to access the swift-markdown and MarkdownView source files. It seems they're presented as workspace-relative paths, so I'll need to use the Xcode-specific tools like XcodeRead and XcodeGrep to interact with them. I'm trying to ascertain the precise names of the swift-markdown and MarkdownView source files, as they appear to be workspace-relative. I'm considering invoking the generalist agent, as the mcp_xcode-tools_XcodeRead tool might not be directly available to me at this level, and I need to confirm its accessibility. Note how it successfully used XcodeLS earlier but is now failing. Even if ls is allowed, it still fails. Reinstalling doesn't fix the issue, so I'm stuck without agent support for this library project. Other issues I've noticed Rolling back agent-made changes is painful, slow, and expensive when it really shouldn't be (just undo what was done instead of telling the agent to undo) Agent made changes are often not given rainbow highlights as they should Artifacts don't always show up Please don't make me manually toggle "verbose" every time I open a conversation. If it's not already obvious, I just like verbosity. I'd love to learn more about the Xcode agent tools available to the agent but there seems to be a lack of documentation anywhere. I've been resorting to extracting stuff from /Users/USERNAME/Library/Developer/Xcode/CodingAssistant/gemini/.gemini/ but those are skills, not tools. Still, it's a fantastic resource for a budding developer! I tried to repopulate my agent command permissions to see if that's the cause, but aside from ls, head, tail, grep, pwd, I don't know what else belongs there and reinstalling doesn't repopulate it. There's also no reset button.
0
0
87
3w
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.2k
3w
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
88
4w
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
359
4w
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
370
4w
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
251
4w
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
3k
4w
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
52
4w
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
562
4w
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
180
4w
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
41
4w
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
336
4w
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
464
4w
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
138
4w
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
164
Jun ’26
Xcode 27 - "Clear Recent" options is missing from run destinations
Overview On Xcode 27, when trying to run on a specific destination, the option to “Clear Recent” is missing. This was available in Xcode 26. Manage Devices option exists, but this is to permanently add / remove destinations, this is different from “Clear Recent”. Please bring back “Clear Recent” (from Xcode 26 to Xcode 27) option to Xcode as it is very useful Environment: macOS 26.5.1 (25F80) Xcode 27.0 beta (27A5194q) Feedback FB23055381
Replies
3
Boosts
0
Views
213
Activity
3w
[Feature request] Xcode 27 Easier Previewing while using coding agent
Filed a feature request in feedback assistant, but starting a discussion here as well since I'm probably not the only one. The issue I have is that coding assistant and previews seem to be mutually exclusive. That means that when I'm iterating on UI, I either have to rely on the coding assistant showing me preview screenshots (cannot interact), firing up Device Hub (have to manually kick off a build after each change) or manually opening the associated preview (requires a lot of hoping back and forth). This feels inefficient and means I have to hop around and manage my windows and tabs more. A slight work around is to open a split view with the file and preview there. This layout is inefficient and clunky. I would love if Xcode supported a pinned preview next to coding assistant (or automatically showed the relevant one). I imagine this working just like showing a preview next to a file cmd + opt + return hides/shows the preview. FB23219611
Replies
3
Boosts
0
Views
317
Activity
3w
Direct Download iOS 17
Hi I have a problem downloading the iOS simulator, I have a slow internet connection. Is there some way I can get a direct download link to the 7GB DMG image. To donload on a local nearby server? Please Help
Replies
1
Boosts
0
Views
649
Activity
3w
Build
I don’t have a plus sign next to build in my app developer account page, so I can’t upload my app or send it in for review… anyone have this happen to them? Any solutions besides wait for them to fix it internally?
Replies
0
Boosts
0
Views
56
Activity
3w
Xcode 27 Beta 1: Agent fails to work on Library project: "AgentLS: The tool failed with no output"
First of all: I love the Xcode implementation of agents. Even right out the gate it works really well on regular projects. However it's rough around the edges--it's beta 1 after all, and I've been prodding around the permissions section. My configuration: macOS 26.5.1, Gemini 3.1 Pro agent via Gemini Enterprise Agent Platform Things were working fine until I got nervous about the agent downloading things using google_web_search and web_fetch since I expected the agent to do that in the cloud but apparently it's automatically downloading stuff to my device, so I disabled those tools out of caution. Later I stumbled upon the skills documents in /Users/USERNAME/Library/Developer/Xcode/CodingAssistant/gemini/.gemini/GEMINI.md which basically tells the agent to: ...take special care to avoid using command line tools like ls or find just to learn basic information about the project or its contents. The user may be prompted to approve every single one of those command line invocations, so it's best to use them sparingly. So I said "Why not?" and deleted the rest of the permissions for better security--you never know what a beta 1 agent might do, and the text implies the worst that'll happen is they'll ask for permission. Now my agent permissions page is empty. After I did that I noticed my agent no longer works in the library project I've been working on. It can't read project files at all, even though things were fine before. Strangely, the agent works just fine in a regular app project--it's just acting up in the library project. Here's a sample of the verbose output: Thinking: I'm currently examining the workspace path provided, which appears to differ slightly from the actual file structure I'm encountering within the PROJECTNAME directory. I'm trying to reconcile this discrepancy. I've realized the paths provided are Xcode workspace-relative and require specific Xcode tools for interaction. I was attempting direct file system access, which is incorrect. I will now attempt to use the appropriate mcp_xcode-tools commands, similar to how I successfully used XcodeLS earlier, to access these files within the project context. I attempted to use mcp_xcode-tools_XcodeRead, but it wasn't recognized. It seems the Xcode tools are not available in my current Plan Mode environment, which is perplexing given previous successful usage. I need to investigate this discrepancy further. AgentLS: The tool failed with no output. Thinking: I'm currently examining the contents of the /Users/USERNAME/Documents/PROJECTNAME/.swiftpm/xcode directory to understand the project structure. OBJECTNAME: 0 items Thinking: I'm currently trying to figure out the best way to access the swift-markdown and MarkdownView source files. It seems they're presented as workspace-relative paths, so I'll need to use the Xcode-specific tools like XcodeRead and XcodeGrep to interact with them. I'm trying to ascertain the precise names of the swift-markdown and MarkdownView source files, as they appear to be workspace-relative. I'm considering invoking the generalist agent, as the mcp_xcode-tools_XcodeRead tool might not be directly available to me at this level, and I need to confirm its accessibility. Note how it successfully used XcodeLS earlier but is now failing. Even if ls is allowed, it still fails. Reinstalling doesn't fix the issue, so I'm stuck without agent support for this library project. Other issues I've noticed Rolling back agent-made changes is painful, slow, and expensive when it really shouldn't be (just undo what was done instead of telling the agent to undo) Agent made changes are often not given rainbow highlights as they should Artifacts don't always show up Please don't make me manually toggle "verbose" every time I open a conversation. If it's not already obvious, I just like verbosity. I'd love to learn more about the Xcode agent tools available to the agent but there seems to be a lack of documentation anywhere. I've been resorting to extracting stuff from /Users/USERNAME/Library/Developer/Xcode/CodingAssistant/gemini/.gemini/ but those are skills, not tools. Still, it's a fantastic resource for a budding developer! I tried to repopulate my agent command permissions to see if that's the cause, but aside from ls, head, tail, grep, pwd, I don't know what else belongs there and reinstalling doesn't repopulate it. There's also no reset button.
Replies
0
Boosts
0
Views
87
Activity
3w
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.2k
Activity
3w
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
88
Activity
4w
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
101
Activity
4w
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
359
Activity
4w
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
370
Activity
4w
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
251
Activity
4w
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
3k
Activity
4w
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
52
Activity
4w
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
562
Activity
4w
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
180
Activity
4w
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
41
Activity
4w
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
336
Activity
4w
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
464
Activity
4w
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
138
Activity
4w
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
164
Activity
Jun ’26