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

Posts under Xcode tag

200 Posts

Post

Replies

Boosts

Views

Activity

Resolving a "Simulator runtime is not available" error
Some Macs recently received a macOS system update which disabled the simulator runtimes used by Xcode 15, including the simulators for iOS, tvOS, watchOS, and visionOS. If your Mac received this update, you will receive the following error message and will be unable to use the simulator: The com.apple.CoreSimulator.SimRuntime.iOS-17-2 simulator runtime is not available. Domain: com.apple.CoreSimulator.SimError Code: 401 Failure Reason: runtime profile not found using "System" match policy Recovery Suggestion: Download the com.apple.CoreSimulator.SimRuntime.iOS-17-2 simulator runtime from the Xcode To resume using the simulator, please reboot your Mac. After rebooting, check Xcode Preferences → Platforms to ensure that the simulator runtime you would like to use is still installed. If it is missing, use the Get button to download it again. The Xcode 15.3 Release Notes are also updated with this information.
0
0
10k
May ’24
How to deliver a USBDriverKit driver in an SDK or Framework for sale to third parties?
I have a product that currently communicates to a piece of proprietary Medical hardware via USB. We have a driver created with USBDriverKit that is a hard requirement for this product to function. Currently, we are delivering an iPadOS application that utilizes the driver. Our next step is to create an SDK that includes all of the Frameworks and the driver utilized by the application. Since the driver is a system extension that lives in the application, how do we bundle it with our SDK and make it available for use by third-parties?
4
0
40
10m
Xcode copilot agent
Has anyone managed to get Copilot working using the new ACP integration in Xcode 26.6 and Xcode 27 beta? I have tried setting it up using the path to the copilot binary as instructed and the flags --acp --stdio but Xcode just displays a "Your request couldn't be completed" error: JSON-RPC global stream failed: The operation couldn’t be completed. (IDEIntelligenceProtocol.JSONRPCElement.Error error 1.) I am running the latest version of copilot cli and it works in many other IDEs.
7
3
121
3h
Xcode 27 Agent is impossible to work with.
Working with Agents in Xcode 27 is a nightmare right now. Every conversation opens in a new window, so you don't see the code you and the agent are working on. You have to go back and forward between the code file and the conversation tab to get the names of data types or functions you need to ask the agent to work on, or to see exactly what you need to ask or how to explain it to the agent. We need the conversation and the code to be side by side to be able to work on the code and provide the right instructions, as we do in Xcode 26. The current interface just completely ruins any reasonable workflow, unless you are vibe coding, which I don't recommend. Let me know if there is a way to open the conversation on one side and code files on the other, or PLEASE change it back of what it was before or I will have to keep working on Xcode 26 and miss all the new features. Thanks
5
1
109
4h
How to get Xcode to automatically build and package a driver
I have a workspace containing a DriverKit USB driver and the containing application that utilizes the driver. These are in separate projects. How do I configure the application project or the workspace so that, when I build the app, the driver is automatically built and copied into the application package as required for delivery? Currently I have to manually select the driver target, build, and then select the app target and build. In order to get the driver into the app, I have included it as a build-phase dependency but I had to hardcode the driver project output path and it doesn't build it automatically. Additionally, because I hard-coded the debug path, when I try and create an Archive to deliver the app, the app includes the debug version of the driver instead of the release version. I'm obviously doing this wrong because it is as clunky as can be.
3
0
35
4h
Clarification on the planned removal of UIDesignRequiresCompatibility
Dear Apple Developer Support, I am developing and maintaining an iOS application. In iOS 26, we understand that setting UIDesignRequiresCompatibility to true in the Info.plist file allows an app to opt out of the Liquid Glass design. However, we also understand that during WWDC25 Platforms State of the Union, Apple stated: "We intend this option to be removed in the next major release." We would appreciate clarification on the following points. Questions Should the phrase "next major release" be interpreted as iOS 27? Is it currently Apple's plan to make UIDesignRequiresCompatibility unavailable or remove it in iOS 27? Or is the statement above only an intended direction, with the actual removal schedule still subject to change? If there is any publicly shareable information regarding the future availability or deprecation timeline of UIDesignRequiresCompatibility, could you please provide it? Background We develop and maintain a business application that contains a large number of custom screens and UI components. Adapting the entire application to the Liquid Glass design system will require significant design review, implementation effort, and testing. As a result, the future availability of UIDesignRequiresCompatibility is a critical factor in our development planning and resource allocation. For this reason, we would greatly appreciate any guidance you can provide regarding Apple's current plans for this compatibility option. Thank you for your time and assistance. Best regards, Toshiyuki
4
0
77
17h
Best practices for avoiding target and cache conflicts in Xcode when working with Git worktrees?
How do you prevent Xcode global resource conflicts when utilizing git worktree? I am adopting git worktree to manage multiple concurrent branches of our iOS project simultaneously. While Git handles the isolated source files perfectly, Xcode struggles because it relies heavily on global, centralized states behind the scenes. When opening multiple worktrees concurrently in Xcode, I run into several breaking issues with globally shared resources: DerivedData Collision: By default, Xcode hashes the project path/name to generate a folder in ~/Library/Developer/Xcode/DerivedData. Because the project files have identical names (just different root directory paths), Xcode occasionally maps them to overlapping cache locations, causing incremental build corruption. Swift Package Manager (SPM) Fetching: The global SPM cache (~/Library/Developer/Xcode/DerivedData/../SourcePackages) seems to choke or trigger duplicate index/fetch cycles when two worktrees try to resolve dependencies at the same time. Simulator/Previews Overwriting: Running an app from Worktree_A installs it on the simulator. Running it from Worktree_B overwrites the exact same App Sandbox container, destroying test data. My Question: What are the best practices, custom build configurations, or tooling scripts to safely isolate Xcode instances when working across multiple active Git worktrees? How can we force Xcode to treat each worktree as a completely independent environment?
0
0
18
20h
Best practices for speeding up watchOS physical device debugging loops in Xcode?
What are the best practices for a painless physical watchOS debugging loop in Xcode? Debugging a standalone or companion watchOS app on a physical Apple Watch is arguably the slowest feedback loop in Apple development. Every minor code change often results in Xcode getting stuck on "Installing to Apple Watch" for minutes, or throwing a "Failed to attach" LLDB error after a long timeout. The biggest bottlenecks seem to be: The initial Symbol Copying / dyld shared cache sync: This takes forever whenever watchOS gets updated. Can these symbols be pre-cached or manually downloaded on the Mac via an internet connection rather than pulling them byte-by-byte from the watch? Slow Installation over Bluetooth: The watch often defaults to a sluggish Bluetooth link with the iPhone instead of leveraging local Wi-Fi or the direct Mac-to-Watch network tunnel. Debugger Connection Timeouts: Xcode routinely loses track of the target process before the app finishes launching on the watch. My Question: What are your recommended workflows, hidden Xcode flags, build settings, or networking setups to make physical watchOS debugging as close to the simulator experience as possible? Specifically, how do we handle symbol caching and force faster deployment pipelines?
0
0
29
20h
How do I find all references and usages of a let or var in Xcode?
How to trace/find all usages of a variable or constant in Xcode? I know that I can use Find > Show Callers (Ctrl + Cmd + Shift + H) in Xcode to instantly find every place a function or method is executed. However, this feature frequently returns "No Callers" or fails completely when I try to use it on a global or instance variable (var or let). Using a standard global text search (Cmd + Shift + F) works, but it returns a lot of noise, including comments, unrelated strings, and matching text in completely different scopes. My Question: What is the best, most reliable way in Xcode to find only the actual structural references (reads and writes) of a specific Swift variable across a project? Is there a built-in static analysis tool or shortcut designed specifically for data tracking rather than function execution?
0
1
20
20h
Xcode 26.6 and 27 Gemini Authentication with Configuration Files
I’m attempting to set up Gemini agentic support in Xcode 26.6 RC (and I'm assuming the process is the same in 27), but since I need to use Gemini with a corporate account, I have a Google Cloud Project ID, not an API key, so it seems like the configuration file route is the right path? After consulting Gemini and filling out the .env file and settings.json files, Xcode is complaining about needing to be authenticated, and I can’t seem to see how to trigger the auth, like one might do in Gemini CLI. I'd appreciate any suggestions or advice at this point. Thanks in advance!
1
0
37
21h
Debugging multi-window AppKit apps: Identifying the window associated with a breakpoint
When working on a multi-window AppKit app, how do you identify which window instance is associated with the current breakpoint? The same question applies when using LLDB. If execution stops inside an object that can exist in more than one window, such as a shared NSViewController subclass, how do you know which window’s object you are currently inspecting? Does Xcode provide a mechanism for showing the NSWindow associated with the current view, view controller or responder while debugging? My current approach is to print object identities and compare them manually. For example, if several identical windows are open, I might print the current object and its window: print(self, #function) Then I interact with one window, make a note of the printed memory addresses in the console, switch to another window and compare the output. This works, but it feels manual. I am not dealing with different window subclasses. The windows may be instances of the same class and may contain instances of the same view controller classes. I simply want an easier way to distinguish which window instance I am debugging. Is there a recommended Xcode, LLDB or AppKit workflow for this?
0
0
13
22h
Create with Xcode 27 → submit with Xcode 26?
I'd like to use Xcode 27 Beta, for its Coding Intelligence features, on existing iOS 17 thru 26 production code. As long as I don't allow iOS 27 as a target, will I be able to use Xcode 26 to submit the Xcode 27 project files now to the App Store for distribution? I can imagine situations where Xcode 27 makes use of a new backward-compatible API feature that Xcode 26 balks at. Perhaps I'll have to watch out for that, unless there's a way to tell Xcode 27 to avoid it automatically?
0
1
34
22h
Xcode 26.4: IBOutlets/IBActions gutter circles missing — cannot connect storyboard to code (works in 26.3)
I’m seeing a regression in Xcode 26.4 where Interface Builder will not allow connecting IBOutlets or IBActions. Symptoms: The usual gutter circle/dot does not appear next to IBOutlet / IBAction in the code editor Because of this, I cannot: drag from storyboard → code drag from code → storyboard The class is valid and already connected to the storyboard (existing outlets work) Assistant Editor opens the correct view controller file Important: The exact same project, unchanged, works perfectly in Xcode 26.3. I can create and connect outlets/actions normally there. ⸻ Environment Xcode: 26.4 macOS: 26.4 Mac Mini M4 Pro 64G Ram Project: Objective-C UIKit app using Storyboards This is a long-running, ObjC, project (not newly created) ⸻ What I’ve already tried To rule out the usual suspects: Verified View Controller Custom Class is correctly set in Identity Inspector Verified files are in the correct Target Membership Verified outlets are declared correctly in the .h file: @property (weak, nonatomic) IBOutlet UILabel *exampleLabel; Opened correct file manually (not relying on Automatic Assistant) Tried both: storyboard → code drag code → storyboard drag Tried using Connections Inspector Clean Build Folder Deleted entire DerivedData Restarted Xcode Updated macOS to 26.4 Ran: sudo xcodebuild -runFirstLaunch Confirmed required platform components installed Reopened project fresh ⸻ Observations In Xcode 26.4 the outlet “connection circles” are completely missing In Xcode 26.3 they appear immediately for the same code Existing connections still function at runtime — this is purely an Interface Builder issue ⸻ Question The gutter circles appearance has always been flaky in Xcode over the 13+ years I've been using it but now with 26.4 they have completely disappeared. Has anyone else seen this in Xcode 26.4, or found a workaround? At this point it looks like a regression in Interface Builder, but I haven’t found any mention of it yet.
29
12
3k
1d
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,
20
14
2.4k
1d
Orphaned 9GB Simulator Runtime in /System/Library/AssetsV2 - Cannot Delete (SIP protected)
I have an orphaned asset folder taking up 9.13GB located at: /System/Library/AssetsV2/com_apple_MobileAsset_iOSSimulatorRuntime/c0d3fd05106683ba0b3680d4d1afec65f098d700.asset It contains SimulatorRuntimeAsset version 18.5 (Build 22F77). Active Version: My current Xcode setup is using version 26.2 (Build 23C54). I checked the plist files in the directory and found what seems to be the cause of the issue: The "Never Collected" Flag: The Info.plist inside the orphaned asset folder explicitly sets the garbage collection behavior to "NeverCollected": <key>__AssetDefaultGarbageCollectionBehavior</key> <string>NeverCollected</string> The Catalog Mismatch: The master catalog file (com_apple_MobileAsset_iOSSimulatorRuntime.xml) in the parent directory only lists the new version (26.2). Because the old version (18.5) is missing from this XML, Xcode and mobileassetd seem to have lost track of it entirely. What I Have Tried (All Failed) Xcode Components: The version 18.5 does not appear in Settings -> Components, so I cannot delete it via the GUI. Simctl: xcrun simctl list runtimes does not list this version. Running xcrun simctl runtime delete 22F77 fails with: "No runtime disk images or bundles found matching '22F77'." Manual Deletion: sudo rm -rf [path] fails with "Operation not permitted", presumably because /System/Library/AssetsV2 is SIP-protected. Third-party Tools: Apps like DevCleaner do not detect this runtime (likely because they only scan ~/Library or /Library, not /System/Library). Has anyone found a way to force the system (perhaps via mobileassetd or a specific xcrun flag) to re-evaluate this folder and respect a deletion request? I am trying to avoid booting into Recovery Mode just to delete a cache file. Any insights on how AssetsV2 handles these "orphaned" files would be appreciated.
22
9
2.6k
1d
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
0
0
23
1d
@State changes in Xcode 27 are causing variable definitions spanning multiple lines to produce unexpected compiler errors.
On Xcode 27, the compiler incorrectly errors when a @State variable definition is placed on multiple lines. The code compiles without any issues on Xcode 26 and is valid Swift. The issue is fixed if the var definition is placed on a single line. The following code produces issues: @State internal var bodyText = "Hi" However, the code below works: @State internal var bodyText = "Hi" The issue is reproducible in any new project with a simple view: import SwiftUI import Playgrounds @main struct MyApp: App { var body: some Scene { WindowGroup { ContentView() } } } struct ContentView: View { @State internal var bodyText = "Hi" var body: some View { Text(bodyText) .padding() } } #Preview { ContentView() } The expected behavior is for valid Swift code to not trigger compiler error. Filed FB23044343
1
0
82
1d
Resolving a "Simulator runtime is not available" error
Some Macs recently received a macOS system update which disabled the simulator runtimes used by Xcode 15, including the simulators for iOS, tvOS, watchOS, and visionOS. If your Mac received this update, you will receive the following error message and will be unable to use the simulator: The com.apple.CoreSimulator.SimRuntime.iOS-17-2 simulator runtime is not available. Domain: com.apple.CoreSimulator.SimError Code: 401 Failure Reason: runtime profile not found using "System" match policy Recovery Suggestion: Download the com.apple.CoreSimulator.SimRuntime.iOS-17-2 simulator runtime from the Xcode To resume using the simulator, please reboot your Mac. After rebooting, check Xcode Preferences → Platforms to ensure that the simulator runtime you would like to use is still installed. If it is missing, use the Get button to download it again. The Xcode 15.3 Release Notes are also updated with this information.
Replies
0
Boosts
0
Views
10k
Activity
May ’24
How to deliver a USBDriverKit driver in an SDK or Framework for sale to third parties?
I have a product that currently communicates to a piece of proprietary Medical hardware via USB. We have a driver created with USBDriverKit that is a hard requirement for this product to function. Currently, we are delivering an iPadOS application that utilizes the driver. Our next step is to create an SDK that includes all of the Frameworks and the driver utilized by the application. Since the driver is a system extension that lives in the application, how do we bundle it with our SDK and make it available for use by third-parties?
Replies
4
Boosts
0
Views
40
Activity
10m
Xcode copilot agent
Has anyone managed to get Copilot working using the new ACP integration in Xcode 26.6 and Xcode 27 beta? I have tried setting it up using the path to the copilot binary as instructed and the flags --acp --stdio but Xcode just displays a "Your request couldn't be completed" error: JSON-RPC global stream failed: The operation couldn’t be completed. (IDEIntelligenceProtocol.JSONRPCElement.Error error 1.) I am running the latest version of copilot cli and it works in many other IDEs.
Replies
7
Boosts
3
Views
121
Activity
3h
Xcode 27 Agent is impossible to work with.
Working with Agents in Xcode 27 is a nightmare right now. Every conversation opens in a new window, so you don't see the code you and the agent are working on. You have to go back and forward between the code file and the conversation tab to get the names of data types or functions you need to ask the agent to work on, or to see exactly what you need to ask or how to explain it to the agent. We need the conversation and the code to be side by side to be able to work on the code and provide the right instructions, as we do in Xcode 26. The current interface just completely ruins any reasonable workflow, unless you are vibe coding, which I don't recommend. Let me know if there is a way to open the conversation on one side and code files on the other, or PLEASE change it back of what it was before or I will have to keep working on Xcode 26 and miss all the new features. Thanks
Replies
5
Boosts
1
Views
109
Activity
4h
How to get Xcode to automatically build and package a driver
I have a workspace containing a DriverKit USB driver and the containing application that utilizes the driver. These are in separate projects. How do I configure the application project or the workspace so that, when I build the app, the driver is automatically built and copied into the application package as required for delivery? Currently I have to manually select the driver target, build, and then select the app target and build. In order to get the driver into the app, I have included it as a build-phase dependency but I had to hardcode the driver project output path and it doesn't build it automatically. Additionally, because I hard-coded the debug path, when I try and create an Archive to deliver the app, the app includes the debug version of the driver instead of the release version. I'm obviously doing this wrong because it is as clunky as can be.
Replies
3
Boosts
0
Views
35
Activity
4h
Unable to download iOS 27 Universal simulator
How to download iOS 27.0 Universal simulator in Xcode 27.0 Beta 1 ? xcodebuild -downloadPlatform iOS -exportPath ~/Downloads -architectureVariant universal -buildVersion 27.0 Finding content... iOS 27.0 (universal) is not available for download.
Replies
3
Boosts
1
Views
104
Activity
4h
Xcode navigator text size
I find the inspector, file navigator, issue navigator, etc. all hard to read. Is there a way to increase the size of these texts without changing all of the text on my machine?
Replies
2
Boosts
1
Views
40
Activity
15h
Clarification on the planned removal of UIDesignRequiresCompatibility
Dear Apple Developer Support, I am developing and maintaining an iOS application. In iOS 26, we understand that setting UIDesignRequiresCompatibility to true in the Info.plist file allows an app to opt out of the Liquid Glass design. However, we also understand that during WWDC25 Platforms State of the Union, Apple stated: "We intend this option to be removed in the next major release." We would appreciate clarification on the following points. Questions Should the phrase "next major release" be interpreted as iOS 27? Is it currently Apple's plan to make UIDesignRequiresCompatibility unavailable or remove it in iOS 27? Or is the statement above only an intended direction, with the actual removal schedule still subject to change? If there is any publicly shareable information regarding the future availability or deprecation timeline of UIDesignRequiresCompatibility, could you please provide it? Background We develop and maintain a business application that contains a large number of custom screens and UI components. Adapting the entire application to the Liquid Glass design system will require significant design review, implementation effort, and testing. As a result, the future availability of UIDesignRequiresCompatibility is a critical factor in our development planning and resource allocation. For this reason, we would greatly appreciate any guidance you can provide regarding Apple's current plans for this compatibility option. Thank you for your time and assistance. Best regards, Toshiyuki
Replies
4
Boosts
0
Views
77
Activity
17h
Codex Requests Failing in Xcode 26.5 and Xcode 27 Beta
Hi everyone, Since today, all my Codex requests have been failing in both Xcode 26.5 and Xcode 27 beta. The Codex integration appears to be connected and authenticated correctly, but every request fails immediately with the error shown in the attached screenshot. Error message: The data couldn’t be read because it isn’t in the correct format.
Replies
5
Boosts
2
Views
139
Activity
18h
Best practices for avoiding target and cache conflicts in Xcode when working with Git worktrees?
How do you prevent Xcode global resource conflicts when utilizing git worktree? I am adopting git worktree to manage multiple concurrent branches of our iOS project simultaneously. While Git handles the isolated source files perfectly, Xcode struggles because it relies heavily on global, centralized states behind the scenes. When opening multiple worktrees concurrently in Xcode, I run into several breaking issues with globally shared resources: DerivedData Collision: By default, Xcode hashes the project path/name to generate a folder in ~/Library/Developer/Xcode/DerivedData. Because the project files have identical names (just different root directory paths), Xcode occasionally maps them to overlapping cache locations, causing incremental build corruption. Swift Package Manager (SPM) Fetching: The global SPM cache (~/Library/Developer/Xcode/DerivedData/../SourcePackages) seems to choke or trigger duplicate index/fetch cycles when two worktrees try to resolve dependencies at the same time. Simulator/Previews Overwriting: Running an app from Worktree_A installs it on the simulator. Running it from Worktree_B overwrites the exact same App Sandbox container, destroying test data. My Question: What are the best practices, custom build configurations, or tooling scripts to safely isolate Xcode instances when working across multiple active Git worktrees? How can we force Xcode to treat each worktree as a completely independent environment?
Replies
0
Boosts
0
Views
18
Activity
20h
Best practices for speeding up watchOS physical device debugging loops in Xcode?
What are the best practices for a painless physical watchOS debugging loop in Xcode? Debugging a standalone or companion watchOS app on a physical Apple Watch is arguably the slowest feedback loop in Apple development. Every minor code change often results in Xcode getting stuck on "Installing to Apple Watch" for minutes, or throwing a "Failed to attach" LLDB error after a long timeout. The biggest bottlenecks seem to be: The initial Symbol Copying / dyld shared cache sync: This takes forever whenever watchOS gets updated. Can these symbols be pre-cached or manually downloaded on the Mac via an internet connection rather than pulling them byte-by-byte from the watch? Slow Installation over Bluetooth: The watch often defaults to a sluggish Bluetooth link with the iPhone instead of leveraging local Wi-Fi or the direct Mac-to-Watch network tunnel. Debugger Connection Timeouts: Xcode routinely loses track of the target process before the app finishes launching on the watch. My Question: What are your recommended workflows, hidden Xcode flags, build settings, or networking setups to make physical watchOS debugging as close to the simulator experience as possible? Specifically, how do we handle symbol caching and force faster deployment pipelines?
Replies
0
Boosts
0
Views
29
Activity
20h
How do I find all references and usages of a let or var in Xcode?
How to trace/find all usages of a variable or constant in Xcode? I know that I can use Find > Show Callers (Ctrl + Cmd + Shift + H) in Xcode to instantly find every place a function or method is executed. However, this feature frequently returns "No Callers" or fails completely when I try to use it on a global or instance variable (var or let). Using a standard global text search (Cmd + Shift + F) works, but it returns a lot of noise, including comments, unrelated strings, and matching text in completely different scopes. My Question: What is the best, most reliable way in Xcode to find only the actual structural references (reads and writes) of a specific Swift variable across a project? Is there a built-in static analysis tool or shortcut designed specifically for data tracking rather than function execution?
Replies
0
Boosts
1
Views
20
Activity
20h
Xcode 26.6 and 27 Gemini Authentication with Configuration Files
I’m attempting to set up Gemini agentic support in Xcode 26.6 RC (and I'm assuming the process is the same in 27), but since I need to use Gemini with a corporate account, I have a Google Cloud Project ID, not an API key, so it seems like the configuration file route is the right path? After consulting Gemini and filling out the .env file and settings.json files, Xcode is complaining about needing to be authenticated, and I can’t seem to see how to trigger the auth, like one might do in Gemini CLI. I'd appreciate any suggestions or advice at this point. Thanks in advance!
Replies
1
Boosts
0
Views
37
Activity
21h
Debugging multi-window AppKit apps: Identifying the window associated with a breakpoint
When working on a multi-window AppKit app, how do you identify which window instance is associated with the current breakpoint? The same question applies when using LLDB. If execution stops inside an object that can exist in more than one window, such as a shared NSViewController subclass, how do you know which window’s object you are currently inspecting? Does Xcode provide a mechanism for showing the NSWindow associated with the current view, view controller or responder while debugging? My current approach is to print object identities and compare them manually. For example, if several identical windows are open, I might print the current object and its window: print(self, #function) Then I interact with one window, make a note of the printed memory addresses in the console, switch to another window and compare the output. This works, but it feels manual. I am not dealing with different window subclasses. The windows may be instances of the same class and may contain instances of the same view controller classes. I simply want an easier way to distinguish which window instance I am debugging. Is there a recommended Xcode, LLDB or AppKit workflow for this?
Replies
0
Boosts
0
Views
13
Activity
22h
Create with Xcode 27 → submit with Xcode 26?
I'd like to use Xcode 27 Beta, for its Coding Intelligence features, on existing iOS 17 thru 26 production code. As long as I don't allow iOS 27 as a target, will I be able to use Xcode 26 to submit the Xcode 27 project files now to the App Store for distribution? I can imagine situations where Xcode 27 makes use of a new backward-compatible API feature that Xcode 26 balks at. Perhaps I'll have to watch out for that, unless there's a way to tell Xcode 27 to avoid it automatically?
Replies
0
Boosts
1
Views
34
Activity
22h
Xcode 26.4: IBOutlets/IBActions gutter circles missing — cannot connect storyboard to code (works in 26.3)
I’m seeing a regression in Xcode 26.4 where Interface Builder will not allow connecting IBOutlets or IBActions. Symptoms: The usual gutter circle/dot does not appear next to IBOutlet / IBAction in the code editor Because of this, I cannot: drag from storyboard → code drag from code → storyboard The class is valid and already connected to the storyboard (existing outlets work) Assistant Editor opens the correct view controller file Important: The exact same project, unchanged, works perfectly in Xcode 26.3. I can create and connect outlets/actions normally there. ⸻ Environment Xcode: 26.4 macOS: 26.4 Mac Mini M4 Pro 64G Ram Project: Objective-C UIKit app using Storyboards This is a long-running, ObjC, project (not newly created) ⸻ What I’ve already tried To rule out the usual suspects: Verified View Controller Custom Class is correctly set in Identity Inspector Verified files are in the correct Target Membership Verified outlets are declared correctly in the .h file: @property (weak, nonatomic) IBOutlet UILabel *exampleLabel; Opened correct file manually (not relying on Automatic Assistant) Tried both: storyboard → code drag code → storyboard drag Tried using Connections Inspector Clean Build Folder Deleted entire DerivedData Restarted Xcode Updated macOS to 26.4 Ran: sudo xcodebuild -runFirstLaunch Confirmed required platform components installed Reopened project fresh ⸻ Observations In Xcode 26.4 the outlet “connection circles” are completely missing In Xcode 26.3 they appear immediately for the same code Existing connections still function at runtime — this is purely an Interface Builder issue ⸻ Question The gutter circles appearance has always been flaky in Xcode over the 13+ years I've been using it but now with 26.4 they have completely disappeared. Has anyone else seen this in Xcode 26.4, or found a workaround? At this point it looks like a regression in Interface Builder, but I haven’t found any mention of it yet.
Replies
29
Boosts
12
Views
3k
Activity
1d
What languages does the new agentic localization support
I'm really excited about the new localization features in the 27 OSes. What languages does Xcode 27 support via agentic localization?
Replies
1
Boosts
0
Views
41
Activity
1d
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
20
Boosts
14
Views
2.4k
Activity
1d
Orphaned 9GB Simulator Runtime in /System/Library/AssetsV2 - Cannot Delete (SIP protected)
I have an orphaned asset folder taking up 9.13GB located at: /System/Library/AssetsV2/com_apple_MobileAsset_iOSSimulatorRuntime/c0d3fd05106683ba0b3680d4d1afec65f098d700.asset It contains SimulatorRuntimeAsset version 18.5 (Build 22F77). Active Version: My current Xcode setup is using version 26.2 (Build 23C54). I checked the plist files in the directory and found what seems to be the cause of the issue: The "Never Collected" Flag: The Info.plist inside the orphaned asset folder explicitly sets the garbage collection behavior to "NeverCollected": <key>__AssetDefaultGarbageCollectionBehavior</key> <string>NeverCollected</string> The Catalog Mismatch: The master catalog file (com_apple_MobileAsset_iOSSimulatorRuntime.xml) in the parent directory only lists the new version (26.2). Because the old version (18.5) is missing from this XML, Xcode and mobileassetd seem to have lost track of it entirely. What I Have Tried (All Failed) Xcode Components: The version 18.5 does not appear in Settings -> Components, so I cannot delete it via the GUI. Simctl: xcrun simctl list runtimes does not list this version. Running xcrun simctl runtime delete 22F77 fails with: "No runtime disk images or bundles found matching '22F77'." Manual Deletion: sudo rm -rf [path] fails with "Operation not permitted", presumably because /System/Library/AssetsV2 is SIP-protected. Third-party Tools: Apps like DevCleaner do not detect this runtime (likely because they only scan ~/Library or /Library, not /System/Library). Has anyone found a way to force the system (perhaps via mobileassetd or a specific xcrun flag) to re-evaluate this folder and respect a deletion request? I am trying to avoid booting into Recovery Mode just to delete a cache file. Any insights on how AssetsV2 handles these "orphaned" files would be appreciated.
Replies
22
Boosts
9
Views
2.6k
Activity
1d
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
0
Boosts
0
Views
23
Activity
1d
@State changes in Xcode 27 are causing variable definitions spanning multiple lines to produce unexpected compiler errors.
On Xcode 27, the compiler incorrectly errors when a @State variable definition is placed on multiple lines. The code compiles without any issues on Xcode 26 and is valid Swift. The issue is fixed if the var definition is placed on a single line. The following code produces issues: @State internal var bodyText = "Hi" However, the code below works: @State internal var bodyText = "Hi" The issue is reproducible in any new project with a simple view: import SwiftUI import Playgrounds @main struct MyApp: App { var body: some Scene { WindowGroup { ContentView() } } } struct ContentView: View { @State internal var bodyText = "Hi" var body: some View { Text(bodyText) .padding() } } #Preview { ContentView() } The expected behavior is for valid Swift code to not trigger compiler error. Filed FB23044343
Replies
1
Boosts
0
Views
82
Activity
1d