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

Xcode Documentation

Posts under Xcode subtopic

Post

Replies

Boosts

Views

Activity

Cannot download iOS 26.x simulators.
I updated Xcode 26.2, but now I cannot download the iOS 26.2 simulator. I updated Xcode to 26.4, but I still cannot download any iOS 26.x simulators. This is blocking my development work. I also updated the system, but the issue persists. Could you please help resolve this? Below is the error message returned during the download: Download is not allowed as mobileassetd was starting up. (Asset download for com.apple.MobileAsset.iOSSimulatorRuntime c6f07ed8ec1586ca140801a2c7c60f478e947602) Domain: DVTDownloadsUtilitiesErrorDomain Code: -1 User Info: { DVTErrorCreationDateKey = "2026-06-10 02:45:19 +0000"; DetailedAssetAttributes = "Failed downloading asset with attributes ({\n Architectures = (\n arm64\n );\n ArchiveDecryptionKey = "FbRCdONFJWiVIFzMOmCDKgb1FCZYjCLgKMAk2/+SvTs=";\n ArchiveID = "fRcpbiW2lPoDn8jTQT3MfKG0DN/SGYVBOvK508mFg6A=";\n AssetFormat = AppleArchive;\n AssetType = "com.apple.MobileAsset.iOSSimulatorRuntime";\n Build = 23D8133;\n Ramp = 0;\n SimulatorVersion = "26.3.1";\n TrainName = LuckDHW;\n "_CompressionAlgorithm" = AppleArchive;\n "_DownloadSize" = 8388608000;\n "_Measurement" = {length = 20, bytes = 0x629c926e81dd5c64b364f36a554f47de42ee9ec1};\n "_Measurement-SHA256" = {length = 32, bytes = 0x86e78341 b58928cb e0320f9c 2b78de17 ... 3a547d62 b4867c98 };\n "_MeasurementAlgorithm" = "SHA-1";\n "_UnarchivedSize" = 8393543680;\n "__AssetDefaultGarbageCollectionBehavior" = NeverCollected;\n "__BaseURL" = "https://updates.cdn-apple.com/MobileAssets2026/mobileassets/094-25902/403F75CC-319D-4BCB-A0A4-3803C77A516A/\";\n "__CanUseLocalCacheServer" = 1;\n "__RelativePath" = "com_apple_MobileAsset_iOSSimulatorRuntime/4FB4F415-F8E7-4321-BD7F-F61049663053.aar";\n})"; } Download is not allowed as mobileassetd was starting up. (Asset download for com.apple.MobileAsset.iOSSimulatorRuntime c6f07ed8ec1586ca140801a2c7c60f478e947602) Domain: DVTDownloadsUtilitiesErrorDomain Code: -1 User Info: { DetailedAssetAttributes = "Failed downloading asset with attributes ({\n Architectures = (\n arm64\n );\n ArchiveDecryptionKey = "FbRCdONFJWiVIFzMOmCDKgb1FCZYjCLgKMAk2/+SvTs=";\n ArchiveID = "fRcpbiW2lPoDn8jTQT3MfKG0DN/SGYVBOvK508mFg6A=";\n AssetFormat = AppleArchive;\n AssetType = "com.apple.MobileAsset.iOSSimulatorRuntime";\n Build = 23D8133;\n Ramp = 0;\n SimulatorVersion = "26.3.1";\n TrainName = LuckDHW;\n "_CompressionAlgorithm" = AppleArchive;\n "_DownloadSize" = 8388608000;\n "_Measurement" = {length = 20, bytes = 0x629c926e81dd5c64b364f36a554f47de42ee9ec1};\n "_Measurement-SHA256" = {length = 32, bytes = 0x86e78341 b58928cb e0320f9c 2b78de17 ... 3a547d62 b4867c98 };\n "_MeasurementAlgorithm" = "SHA-1";\n "_UnarchivedSize" = 8393543680;\n "__AssetDefaultGarbageCollectionBehavior" = NeverCollected;\n "__BaseURL" = "https://updates.cdn-apple.com/MobileAssets2026/mobileassets/094-25902/403F75CC-319D-4BCB-A0A4-3803C77A516A/\";\n "__CanUseLocalCacheServer" = 1;\n "__RelativePath" = "com_apple_MobileAsset_iOSSimulatorRuntime/4FB4F415-F8E7-4321-BD7F-F61049663053.aar";\n})"; } Download is not allowed as mobileassetd was starting up. (Asset download for com.apple.MobileAsset.iOSSimulatorRuntime c6f07ed8ec1586ca140801a2c7c60f478e947602) Domain: com.apple.MobileAssetError.Download Code: 13 User Info: { retryWithBackoff = 1; } System Information macOS Version 26.5.1 (Build 25F80) Xcode 26.2 (24553) (Build 17C52) Timestamp: 2026-06-10T10:45:19+08:00
0
0
51
1w
Unable to use, install, or delete the iOS 27 runtime
I'm unable to use the iOS 27 runtime in Xcode 27 beta 1. It appears uninstalled, but has no Get button, so I can't delete it, nor uninstall it. Using the Get button in the toolbar results in "Fetching download information..." forever. When I click info and copy information, it says "iOS 27.0 beta (24A5355p) SDK + Simulator (Components absent)." It doesn't show up in any of the xcrun simctl commands for listing devices or runtimes. It doesn't show up in the Add Platforms modal. I was unable to debug this issue with an Apple engineer in person, so they suggested I post here! Update: xcodebuild -downloadPlatform doesn't work either, even though it does for watchOS
3
0
122
1w
Xcode 27 for Intel Macs
According to the release notes (https://developer.apple.com/documentation/xcode-release-notes/xcode-27-release-notes), "Xcode 27 beta requires a Mac running macOS Tahoe 26.4 or later." I've tried it on my Intel MacBook running macOS Tahoe 26.5, and it wouldn't run. Looking into it, the binary for the application is an arm64 executable only (which explains why it wouldn't run). Is that a mistake in the release notes, or a mistake with the Xcode 27 beta?
6
2
453
1w
Implementing Your Own Crash Reporter
I often get questions about third-party crash reporting. These usually show up in one of two contexts: Folks are trying to implement their own crash reporter. Folks have implemented their own crash reporter and are trying to debug a problem based on the report it generated. This is a complex issue and this post is my attempt to untangle some of that complexity. IMPORTANT macOS 27 and iOS 27, both currently in beta, introduced support for out-of-process crash reporting using the CrashReportExtension framework. I haven’t yet had time to update this post to cover that technology. However, if you’re planning to implement your own crash reporter on those platforms, you should start there. If you have a follow-up question about anything I've raised here, please put it in a new thread with the Debugging tag. IMPORTANT All of the following is my own direct experience. None of it should be considered official DTS policy. If you have a specific question that needs a direct answer — perhaps you’re trying to convince your boss that implementing your own crash reporter is a very bad idea — start a dedicated thread here on the forums and we can discuss the details there. Use whatever subtopic is appropriate for your issue, but make sure to add the Debugging tag so that I see it go by. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = "eskimo" + "1" + "@" + "apple.com" Scope First, I can only speak to the technical side of this issue. There are other aspects that are beyond my remit: I don’t work for App Review, and only they can give definitive answers about what will or won’t be allowed on the store. Implementing your own crash reporter has significant privacy implications. IMPORTANT If you implement your own crash reporter, discuss the privacy impact with a lawyer. This post assumes that you are implementing your own crash reporter. A lot of folks use a crash reporter from another third party. From my perspective these are the same thing. If you use a custom crash reporter, you are responsible for its behaviour, both good and bad, regardless of where the actual code came from. Note If you use a crash reporter from another third party, run the tests outlined in Preserve the Apple Crash Report to verify that it’s working well. General Advice I strongly advise against implementing your own crash reporter. It’s very easy to create a basic crash reporter that works well enough to debug simple problems. It’s impossible to implement a good crash reporter, one that’s reliable, binary compatible, and sufficient to debug complex problems. The bulk of this post is a low-level explanation of that impossibility. Rather than attempting the impossible, I recommend that you lean in to Apple’s crash reporter. In recent years it’s acquired some really cool new features: If you’re creating an App Store app, the Xcode organiser gives you easy, interactive access to Apple crash reports. If you’re an enterprise developer, consider switching to Custom App Distribution. This yields all the benefits of App Store distribution without your app being generally available on the store. iOS 14 and macOS 12 report crashes in MetricKit. This is a very cool feature, and I’m surprised by how few people use it effectively. If you previously dismissed Apple crash reports as insufficient, I encourage you to reconsider that decision. Why Is This Impossible? Earlier I said “It’s impossible to implement a good crash reporter”, and I want to explain why I’m confident enough in my conclusions to use that specific word. There are two fundamental problems here: On iOS (and the other iOS-based platforms, watchOS and tvOS) your crash reporter must run inside the crashed process. That means it can never be 100% reliable. If the process is crashing then, by definition, it’s in an undefined state. Attempting to do real work in that state is just asking for problems [1]. To get good results your crash reporter must be intimately tied to system implementation details. These can change from release to release, which invalidates the assumptions made by your crash reporter. This isn’t a problem for the Apple crash reporter because it ships with the system. However, a crash reporter that’s built in to your product is always going to be brittle. I’m speaking from hard-won experience here. I worked for DTS during the PowerPC-to-Intel transition, and saw a lot of folks with custom crash reporters struggle through that process. Still, this post exists because lots of folks ignore this reality, so the subsequent sections contain advice about specific technical issues. WARNING Do not interpret any of the following as encouragement to implement your own crash reporter. I strongly advise against that. However, if you ignore my advice then you should at least try to minimise the risk, which is what the rest of this document is about. [1] On macOS it’s possible for your crash reporter to run out of process, just like the Apple crash reporter. However, possible is not the same as easy. In fact, running out of process can make things worse: It prevents you from geting critical state for the crashed process without being tightly bound to OS implementation details. It would be nice if Apple provided APIs for this sort of thing, but that’s currently not the case. Preserve the Apple Crash Report You must ensure that your crash reporter doesn’t disrupt the Apple crash reporter. This is important for three reasons: Some fraction of your crashes will not be caused by your code but by problems in framework code, and accurate Apple crash reports are critical in diagnosing such issues. When dealing with really hard-to-debug problems, you need the more obscure info that’s shown in the Apple crash report. If you’re working with someone from Apple (here on the forums, via a bug report, or a DTS case, or whatever), they’re going to want an accurate Apple crash report. If your crash reporter is disrupting the Apple crash reporter — either preventing it from generating crash reports entirely [1], or distorting those crash reports — that limits how much they can help you. IMPORTANT This is not a theoretical concern. The forums have many threads where I’ve been unable to help folks debug a gnarly problem because their third-party crash reporter didn’t preserve the Apple crash report (see here, here, and here for some examples). To avoid these issues I recommend that you test your crash reporter’s impact on the Apple crash reporter. The basic idea is: Create a program that generates a set of specific crashes. Run through each crash. Verify that your crash reporter produces sensible results. Verify that the Apple crash reporter produces the same results as it does without your crash reporter With regards step 1, your test suite should include: An un-handled language exception thrown by your code An un-handled language exception thrown by the OS (accessing an NSArray out of bounds is an easy way to get this) Various machine exceptions (at a minimum, memory access, illegal instruction, and breakpoint exceptions) Stack overflow Make sure to test all of these cases on both the main thread and a secondary thread. With regards step 4, check that the resulting Apple crash report includes correct values for: The exception info The crashed thread That thread’s state Any application-specific info, and especially the last exception backtrace [1] A particularly pathological behaviour here is to end your crash reporter by calling exit. This completely suppresses the Apple crash report. Some third-party language runtimes ‘helpfully’ include such a crash reporter, which makes it very hard to debug problems that occur within your process but outside of that language. Signals Many third-party crash reporters use UNIX signals to catch the crash. This is a shame because using Mach exception handling, the mechanism used by the Apple crash reporter, is generally a better option. However, there are two reasons to favour UNIX signals over Mach exception handling: On iOS-based platforms your crash reporter must run in-process, and doing in-process Mach exception handling is not feasible. Folks are a lot more familiar with UNIX signals. Mach exception handling, and Mach messaging in general, is pretty darned obscure. If you use UNIX signals for your crash reporter, be aware that this API has some gaping pitfalls. First and foremost, your signal handler can only use async signal safe functions [1]. You can find a list of these functions in sigaction man page [2] [3]. WARNING This list does not include malloc. This means that a crash reporter’s signal handler cannot use Objective-C or Swift, as there’s no way to constrain how those language runtimes allocate memory [4]. That means you’re stuck with C or C++, but even there you have to be careful to comply with this constraint. The Operative: It’s worse than you know. Captain Malcolm Reynolds: It usually is. Many crash reports use functions like backtrace (see its man page) to get a backtrace from their signal handler. There’s two problems with this: backtrace is not an async signal safe function. backtrace uses a naïve algorithm that doesn’t deal well with cross signal handler stack frames [5]. The latter point is particularly worrying, because it hides the identity of the stack frame that triggered the signal. If you’re going to backtrace out of a signal, you must use the crashed thread’s state (accessible via the handlers uap parameter) to start your backtrace. Apropos that, if your crash reporter wants to log the state of the crashed thread, that’s the place to get it. Your signal handler must be prepared to be called by multiple threads. A typical crashing signal (like SIGSEGV) is delivered to the thread that triggered the machine exception. While your signal handler is running on that thread, other threads in your process continue to run. One of these threads could crash, causing it to call your signal handler. It’s a good idea to suspend all threads in your process early in your signal handler. However, there’s no way to completely eliminate this window. Note The need to suspend all the other threads in your process is further evidence that sticking to async signal safe functions is required. An unsafe function might depend on a thread you’ve suspended. A typical crashing signal is delivered on the thread that triggered the machine exception. If the machine exception was caused by a stack overflow, the system won’t have enough stack space to call your signal handler. You can tell the system to switch to an alternative stack (see the discussion of SA_ONSTACK in the sigaction man page) but that isn’t a complete solution (because of the thread issue discussed immediately above). Finally, there’s the question of how to exit from your signal handler. You must not call exit. There’s two problems with doing that: exit is not async signal safe. In fact, exit can run arbitrary code via handlers registered with atexit. If you want to exit the process, call _exit. Exiting the process is a bad idea anyway, because it will prevent the Apple crash reporter from running. This is very poor form. For an explanation as to why, see Preserve the Apple Crash Report (above). A better solution is to unregister your signal handler (set it to SIG_DFL) and then return. This will cause the crashed process to continue execution, crash again, and generate a crash report via the Apple crash reporter. [1] While the common signals caught by a crash reporter are not technically async signals (except SIGABRT), you still have to treat them as async signals because they can occur on any thread at any time. [2] It’s reasonable to extend this list to other routines that are implemented as thin shims on a system call. For example, I have no qualms about calling vm_read (see below) from a signal handler. [3] Be aware, however, that even this list has caveats. See my Async Signal Safe Functions vs Dyld Lazy Binding post for details. [4] I expect that it’ll eventually be possible to write signal handlers in Swift, possibly using some facility that evolves from the the existing, but unsupported, @_noAllocation and @_noLocks attributes. If you’d like to get involved with that effort, I recommend that engage with the Swift Evolution process. [5] Cross signal handler stack frames are pushed on to the stack by the kernel when it runs a signal handler on a thread. As there’s no API to learn about the structure of these frames, there’s no way to backtrace across one of these frames in isolation. I’m happy to go into details but it’s really not relevant to this discussion [6]. If you’re interested, start a new thread with the Debugging tag and we can chat there. [6] (Arg, my footnotes have footnotes!) The exception to this is where your trying to generate a crash report for code running in a signal handler. That’s not easy, and frankly you’re better off avoiding signal handlers in general. Where possible, handle signals via a Dispatch event source. Reading Memory A signal handler must be very careful about the memory it touches, because the contents of that memory might have been corrupted by the crash that triggered the signal. My general rule here is that the signal handler can safely access: Its code Its stack (subject to the constraints discussed earlier) Its arguments Immutable global state In the last point, I’m using immutable to mean immutable after startup. It’s reasonable to set up some global state when the process starts, before installing your signal handler, and then rely on it in your signal handler. Changing any global state after the signal handler is installed is dangerous, and if you need to do that you must be careful to ensure that your signal handler sees consistent state, even though a crash might occur halfway through your change. You can’t protect this global state with a mutex because mutexes are not async signal safe (and even if they were you’d deadlock if the mutex was held by the thread that crashed). You should be able to use atomic operations for this, but atomic operations are notoriously hard to use correctly (if I had a dollar for every time I’ve pointed out to a developer they’re using atomic operations incorrectly, I’d be very badly paid (-: but that’s still a lot of developers!). If your signal handler reads other memory, it must take care to avoid crashing while doing that read. There’s no BSD-level API for this [1], so I recommend that you use vm_read. [1] The traditional UNIX approach for doing this is to install a signal handler to catch any memory access exceptions triggered by the read, but now we’re talking signal handling within a signal handler and that’s just silly. Writing Files If your want to write a crash report from your signal handler, you must use low-level UNIX APIs (open, write, close) because only those low-level APIs are documented to be async signal safe. You must also set up the path in advance because the standard APIs for determining where to write the file (NSFileManager, for example) are not async signal safe. Offline Symbolication Do not attempt to do symbolication from your signal handler. Rather, write enough information to your crash report to support offline symbolication. Specifically: The addresses to symbolicate For each Mach-O image in the process: The image’s path The image’s build UUID [1] The image’s load address You can get most of the Mach-O image information using the APIs in <mach-o/dyld.h> [2]. Be aware, however, that these APIs are not async signal safe. You’ll need to get this information in advance and cache it for your signal handler to record. This is complicated by the fact that the list of Mach-O images can change as you process loads and unloads code. This requires you to share mutable state with your signal handler, which is exactly what I recommend against in Reading Memory. Note You can learn about images loading and unloading using _dyld_register_func_for_add_image and _dyld_register_func_for_remove_image respectively. [1] If you’re unfamiliar with that term, see TN3178 Checking for and resolving build UUID problems and the documents it links to. [2] I believe you’ll need to parse the Mach-O load commands to get the build UUID. What to Include When deciding what to include in a crash report, there’s a three-way balance to be struck: The more information you include, the easier it is to diagnose problems. Some information is hard to obtain, either because there’s no public API to get that information, or because the API is not available to your crash reporter. Some information is so privacy-sensitive that it has no place in a crash report. Apple’s crash reporter strikes its own balance here, and I recommend that you try to include everything that it includes, subject to the limitations described in the second point. Here’s what I’d considered to be a minimal list: Information about the machine exception that triggered the crash For memory access exceptions, the address of the access that triggered the crash Backtraces of all the threads (sometimes the backtrace of a non-crashing thread can yield critical information about the crash) The crashed thread Its thread state A list of Mach-O images, as discussed in the Offline Symbolication section IMPORTANT Make sure you report the thread backtraces in a consistent order. Without that it’s hard to correlate information across crash reports. Revision History 2026-06-09 Added a quick note about CrashReportExtension framework to the preamble. 2025-08-25 Added some links to examples of third-party crash reports not preserving the Apple crash report. Added a link to TN3178. Made other minor editorial changes. 2022-05-16 Fixed a broken link. 2021-09-10 Expanded the General Advice section to include pointers to Apple crash report resources, including MetricKit. Split the second half of that section out in to a new Why Is This Impossible? section. Made minor editoral changes. 2021-02-27 Fixed the formatting. Made minor editoral changes. 2019-05-13 Added a reference to my Async Signal Safe Functions vs Dyld Lazy Binding post. 2019-02-15 Expanded the introduction to the Preserve the Apple Crash Report section. 2019-02-14 Clarified the complexities of an out-of-process crash reporter. Added the What to Include section. Enhanced the Signals section to cover reentrancy and stack overflow. Made minor editoral changes. 2019-02-13 Made minor editoral changes. Added a new footnote to the Signals section. 2019-02-12 First posted.
0
0
20k
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?
3
2
400
1w
Issue with ShazamKit Identifier / Error in Xcode
Hello all, After being palmed off by Apple support on two separate occasions, I've been directed here. I'm hoping that someone might be able to help me. I'm trying to use ShazamKit in an Xcode project and, despite having created an Identified that clearly shows ShazamKit is enabled, when I try and use this in Xcode, I get the following error: /Users/name/Projects/Project/mac-bridge/fp-shazam/Project/Project.xcodeproj Entitlement com.apple.developer.shazamkit not found and could not be included in profile. This likely is not a valid entitlement and should be removed from your entitlements file. No matter what I do or try, it always displays that error and the Bundle ID, etc, absolutely match what is in the Developer portal under "Identifiers". Does anyone know what may be causing this and how to resolve? Many thanks, in advance.
0
0
35
1w
Apple Watch does not appear in Xcode 27 Beta and Developer Mode option is missing despite paired iPhone on iOS 27
Environment: MacBook Air M4 macOS 27 Golden Gate Beta Xcode 27 Beta iPhone running iOS 27 Beta Apple Watch paired to the iPhone Steps to Reproduce: Install macOS 27 Beta and Xcode 27 Beta. Pair an Apple Watch with an iPhone running iOS 27 Beta. Enable Developer Mode on the iPhone. Connect the iPhone to the Mac and launch Xcode. Open Window → Devices and Simulators. Attempt to locate the paired Apple Watch or enable Developer Mode on the watch. Expected Result: The paired Apple Watch appears in Xcode for development purposes. A Developer Mode option is available on the Apple Watch. Xcode is able to recognize and communicate with the watch through the paired iPhone. Actual Result: The Apple Watch does not appear in Xcode. No Developer Mode option is visible on the watch. The iPhone is successfully paired and running iOS 27 Beta, but the watch remains unavailable for development workflows. Additional Notes: The iPhone and Apple Watch are already paired and functioning normally. Developer Mode is enabled on the iPhone. Restarting devices and reconnecting the iPhone did not resolve the issue. Unsure whether this is a limitation of the current beta builds or a regression in Xcode/watchOS development tooling.
0
2
144
1w
Adding Images larger than 640px to an AR Ressources Group crashes XCode 26.5
As soon as I add an image with more than 640px (longest side) to an AR Resource Group as an AR Reference Image, Xcode crashes immediately. I narrowed it down to that value. It does not seem to matter whether jpeg or png and the file size seems to be irrelevant, too. The problem came to my attention when I tried to run a new Unity build of an AR App I created a year ago (for testing) in Xcode. This used to work flawlessly. Now It doesn’t; the build produces an error „Command CompileAssetCatalog failed with a nonzero exit code“ … and when I try to click on the Asset Catalogue inside of Xcode, Xcode crashes also immediately.
1
0
33
1w
Xcode's Vim Mode - further development?
It was fantastic news to hear, last year, that Xcode was getting a Vim mode. Apple's implementation of it was a great first step, but it was missing a bunch of key features. Most importantly the dot command (and by, extension, macros) and creating marks in files, which are functions that I use/rely on on a daily basis. I thought I would finally be able to stop having to self-sign Xcode (which causes problems) in order to use XVim2 plugin, but no such luck. Will these features get added in for Xcode 14 (they don't seem to be in the beta) or are they far out on the roadmap?
12
13
9.4k
1w
Xcode 26.6 icon no-entry, will not launch on M1 MacOS 27.0
After successful Mac upgrade, Xcode 27 works but my Xcode 26.5 and also Xcode 26.6RC show a no entry overlay on the icon and a launch alert saying not supported. I did get it to launch by opening the App Package Contents and opening the Xcode inside the MacOS Folder. So you theoretically can submit to the App Store from MacOS 27.0 The behavior of the icon needs fixing. Yes they were both the Apple Silicon Xcode downloads.
0
2
63
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.
0
0
26
1w
PacketLogger not logging packets on a MacBook.
I am a developer working on macOS Sonoma version 14.5 using a MacBook Pro with an M3 Pro chip. I have been trying to utilize PacketLogger, included with Xcode 15.4 extensions, to monitor Bluetooth traffic between my MacBook and my Sony WH-1000XM4 headphones. Issue Description: Despite my device being correctly paired and connected, PacketLogger does not display any Bluetooth packet data. The expected Bluetooth packets are not shown in the PacketLogger interface, even when no filters are applied, and PacketLogger settings are configured to capture all traffic. Troubleshooting Steps Taken: • I have ensured all PacketLogger filters are deactivated to capture all types of Bluetooth traffic. • I have started the PacketLogger before connecting my Bluetooth devices to capture the initial exchanges. • Reinstallation of PacketLogger and verification of Bluetooth module functionality have been performed, with no resolution to the issue. Request for Assistance: Could you provide guidance or troubleshooting steps that might address this issue? Are there known compatibility issues with PacketLogger on macOS Sonoma or with the MacBook Pro M3 Pro model that might affect its functionality? Any specific settings or configurations that I might be overlooking would also be greatly appreciated. I can provide additional information, including screenshots of my PacketLogger settings and logs, upon request. Your assistance in resolving this issue would be invaluable.
3
6
2.6k
1w
VoiceOver: "Signing & Capabilities" tab not directly accessible — request for keyboard shortcuts and tab-bar focus
Environment: Xcode 26.5, macOS Tahoe 26.5.1 (MacBook Pro, Apple M4 Max). As a blind developer working in Xcode with VoiceOver only, I'd like to report accessibility issues that make it hard to complete properly signed and entitled apps using VoiceOver alone. Issue: The "Signing & Capabilities" tab is not directly accessible. The "Signing & Capabilities" tab in the target editor is central to app configuration (team selection, capabilities, provisioning profiles), but there is no dedicated keyboard shortcut to reach it. The path requires many steps: Cmd+1 to focus the navigator, selecting the project file with the arrow keys, activating it with Return, switching to the central editor area, selecting the target, and finally locating the tab in the top bar. Specific VoiceOver problems: When the project file is activated with VoiceOver, focus often lands inside the inline rename field instead of opening the project editor as expected. The toolbar containing the editor tabs (General, Signing & Capabilities, Resource Tags, Info, Build Settings, Build Phases, Build Rules) cannot reliably be focused with VoiceOver, which prevents direct tab switching from the keyboard. Impact: A routine task such as adding a capability requires a long VoiceOver sequence that must be repeated on every visit, plus the cognitive load of remembering the exact tab order. Suggested improvements: Provide a direct keyboard shortcut for the "Signing & Capabilities" tab, and ideally for each target editor tab (for example Cmd+Option+1 through Cmd+Option+7). Ensure that activating the project file in the navigator opens the project editor by default; renaming should require an explicit second key press (Return on an already selected item, consistent with Finder). Ensure the editor tab bar can be reached and traversed with VoiceOver, for example via Tab or Ctrl+Tab.
0
0
23
1w
Code Coverage Not Accurate in Xcode 26
Description: I’m noticing that the code coverage metrics in Xcode 26 are not accurate compared to earlier versions. In Xcode 15, the same set of unit tests shows around 38% coverage, but in Xcode 26, even though all the tests are running successfully (for example, the SegmentedUI test cases), the code coverage is displayed as 0%. Has anyone else observed this behavior in Xcode 26? Is there any known issue, workaround, or configuration change required to get the correct coverage report? Environment: Xcode 26 iOS 18 SDK Unit tests running under XCTest Any insights or suggestions would be appreciated.
4
6
531
1w
Upgrading Python that ships with Xcode from 3.9.6
Hi. Our IT security team have flagged that on many developer machines they see a deprecated version of Python - 3.9.6. I've done some research on this and the general line is, feel free to upgrade the main version of Python on the Mac, but the version of Python which is internally used by Xcode (3.9.6) must be left unchanged. Our IT security team reached out to Apple and have received conflicting information as to if this Ruby 3.9.6 version can be upgraded. One response for example was "I asked my Solutions Engineer and he has come back with the following: We don’t include Python within macOS anymore, we install 3.9.6 with Xcode to support some of the internal tools - but there’s nothing preventing a customer updating that version: https://mac.install.guide/python/update". Does anyone know if it is possible to upgrade to a supported version? Kind regards, Kai.
3
1
172
1w
Xcode builds hang forever at "Planning"/clang feature-detection on macOS 26.5 — root cause is a pipe-buffer leak
Symptom Every build — both the Xcode IDE and command-line xcodebuild — hangs indefinitely at "Pre-planning"/"Planning N/M", before any compilation starts. The build log freezes for 40+ minutes with no progress and no error. Inspecting the stuck processes: The clang feature-detection probes (clang -v -E -dM -c /dev/null) sit at 0% CPU, blocked in write(). SWBBuildService is idle in swift_task_asyncMainDrainQueue → mach_msg — it never reads the probe output. Root cause: collapsed pipe buffers On this machine, anonymous pipe buffer capacity has dropped to 512 bytes (a healthy macOS pipe starts at 16 KB and expands to 64 KB on demand). SWBBuildService runs the clang feature-detection probe and reads its ~15 KB of output lazily (via Swift concurrency). With only a 512-byte buffer, the pipe fills instantly, clang's write() blocks forever, and the build deadlocks before it begins. swift build (SwiftPM) is unaffected because it drains subprocess pipes continuously in small reads — confirming the problem is the pipe buffer size, not the toolchain or compiler. The key detail — it's progressive, not constant (looks like a kernel pipe-KVA leak) This is the part that points at a kernel bug rather than a fixed config: Right after a reboot, a fresh os.pipe() measures 65536 bytes, and builds succeed normally. After ~50 minutes of normal build activity, the same measurement has monotonically degraded to 512 bytes, and builds hang again. So pipe capacity appears to leak down as pipe kernel-virtual-address (KVA) accounting accumulates during use. Notably, kern.ipc.maxpipekva does not exist as a sysctl OID on 26.5, so there's no tunable to raise the pool. Minimal diagnostic anyone can run import os, fcntl, errno r, w = os.pipe() fcntl.fcntl(w, fcntl.F_SETFL, os.O_NONBLOCK) total = 0 try: while True: total += os.write(w, b"x" * 256) except OSError as e: if e.errno != errno.EAGAIN: raise print("pipe capacity:", total, "bytes") Healthy machine: 16384+ (usually 65536). Affected machine: 512. When it reads 512, every xcodebuild will hang. What did NOT fix it (ruled out) Downgrading Xcode — tested Xcode 26.4.1 (17E202) via DEVELOPER_DIR: hangs identically. The trigger is the OS, not Xcode/Swift. Raising kern.ipc.maxpipekva — the OID doesn't exist on 26.5. Memory pressure (64 GB, 94% free, 0 swap), /etc/sysctl.conf / boot-time overrides, NVRAM boot-args, MDM/configuration profiles (not enrolled), third-party security/AV/DLP software (none installed), the project/packages, derivedData location, user Xcode prefs (clean HOME still hangs), connected devices. File-descriptor exhaustion — only ~87 pipe FDs were open, so it's not a count limit; it's per-pipe capacity. What does help Reboot restores 64 KB pipes — but only buys ~1 build before they degrade again. Temporary. Full in-place reinstall of macOS 26.5 resets pipe capacity (the incremental OTA may have left the system inconsistent), but the leak recurs with use. Staying on / reverting to macOS 26.4 is the only durable fix found, since 26.5 is the trigger. Question for Apple / others seeing this Has anyone else on 26.5 (25F71) confirmed pipe capacity degrading over time with the Python snippet above? This looks like a kernel pipe-KVA accounting leak introduced in 26.5. A separate, smaller issue is that SWBBuildService drains the clang probe pipe lazily, which turns a small pipe buffer into a hard deadlock instead of just slow I/O — a continuous-drain read would make Xcode resilient to it. Environment Mac Studio (Apple Silicon), 64 GB RAM macOS 26.5 (build 25F71) — problem began immediately after an incremental OTA update from 26.2 → 26.5 Xcode 26.5 (also reproduced on Xcode 26.4.1 / 17E202 — see below)
1
1
111
1w
Cannot download iOS 26.x simulators.
I updated Xcode 26.2, but now I cannot download the iOS 26.2 simulator. I updated Xcode to 26.4, but I still cannot download any iOS 26.x simulators. This is blocking my development work. I also updated the system, but the issue persists. Could you please help resolve this? Below is the error message returned during the download: Download is not allowed as mobileassetd was starting up. (Asset download for com.apple.MobileAsset.iOSSimulatorRuntime c6f07ed8ec1586ca140801a2c7c60f478e947602) Domain: DVTDownloadsUtilitiesErrorDomain Code: -1 User Info: { DVTErrorCreationDateKey = "2026-06-10 02:45:19 +0000"; DetailedAssetAttributes = "Failed downloading asset with attributes ({\n Architectures = (\n arm64\n );\n ArchiveDecryptionKey = "FbRCdONFJWiVIFzMOmCDKgb1FCZYjCLgKMAk2/+SvTs=";\n ArchiveID = "fRcpbiW2lPoDn8jTQT3MfKG0DN/SGYVBOvK508mFg6A=";\n AssetFormat = AppleArchive;\n AssetType = "com.apple.MobileAsset.iOSSimulatorRuntime";\n Build = 23D8133;\n Ramp = 0;\n SimulatorVersion = "26.3.1";\n TrainName = LuckDHW;\n "_CompressionAlgorithm" = AppleArchive;\n "_DownloadSize" = 8388608000;\n "_Measurement" = {length = 20, bytes = 0x629c926e81dd5c64b364f36a554f47de42ee9ec1};\n "_Measurement-SHA256" = {length = 32, bytes = 0x86e78341 b58928cb e0320f9c 2b78de17 ... 3a547d62 b4867c98 };\n "_MeasurementAlgorithm" = "SHA-1";\n "_UnarchivedSize" = 8393543680;\n "__AssetDefaultGarbageCollectionBehavior" = NeverCollected;\n "__BaseURL" = "https://updates.cdn-apple.com/MobileAssets2026/mobileassets/094-25902/403F75CC-319D-4BCB-A0A4-3803C77A516A/\";\n "__CanUseLocalCacheServer" = 1;\n "__RelativePath" = "com_apple_MobileAsset_iOSSimulatorRuntime/4FB4F415-F8E7-4321-BD7F-F61049663053.aar";\n})"; } Download is not allowed as mobileassetd was starting up. (Asset download for com.apple.MobileAsset.iOSSimulatorRuntime c6f07ed8ec1586ca140801a2c7c60f478e947602) Domain: DVTDownloadsUtilitiesErrorDomain Code: -1 User Info: { DetailedAssetAttributes = "Failed downloading asset with attributes ({\n Architectures = (\n arm64\n );\n ArchiveDecryptionKey = "FbRCdONFJWiVIFzMOmCDKgb1FCZYjCLgKMAk2/+SvTs=";\n ArchiveID = "fRcpbiW2lPoDn8jTQT3MfKG0DN/SGYVBOvK508mFg6A=";\n AssetFormat = AppleArchive;\n AssetType = "com.apple.MobileAsset.iOSSimulatorRuntime";\n Build = 23D8133;\n Ramp = 0;\n SimulatorVersion = "26.3.1";\n TrainName = LuckDHW;\n "_CompressionAlgorithm" = AppleArchive;\n "_DownloadSize" = 8388608000;\n "_Measurement" = {length = 20, bytes = 0x629c926e81dd5c64b364f36a554f47de42ee9ec1};\n "_Measurement-SHA256" = {length = 32, bytes = 0x86e78341 b58928cb e0320f9c 2b78de17 ... 3a547d62 b4867c98 };\n "_MeasurementAlgorithm" = "SHA-1";\n "_UnarchivedSize" = 8393543680;\n "__AssetDefaultGarbageCollectionBehavior" = NeverCollected;\n "__BaseURL" = "https://updates.cdn-apple.com/MobileAssets2026/mobileassets/094-25902/403F75CC-319D-4BCB-A0A4-3803C77A516A/\";\n "__CanUseLocalCacheServer" = 1;\n "__RelativePath" = "com_apple_MobileAsset_iOSSimulatorRuntime/4FB4F415-F8E7-4321-BD7F-F61049663053.aar";\n})"; } Download is not allowed as mobileassetd was starting up. (Asset download for com.apple.MobileAsset.iOSSimulatorRuntime c6f07ed8ec1586ca140801a2c7c60f478e947602) Domain: com.apple.MobileAssetError.Download Code: 13 User Info: { retryWithBackoff = 1; } System Information macOS Version 26.5.1 (Build 25F80) Xcode 26.2 (24553) (Build 17C52) Timestamp: 2026-06-10T10:45:19+08:00
Replies
0
Boosts
0
Views
51
Activity
1w
Unable to use, install, or delete the iOS 27 runtime
I'm unable to use the iOS 27 runtime in Xcode 27 beta 1. It appears uninstalled, but has no Get button, so I can't delete it, nor uninstall it. Using the Get button in the toolbar results in "Fetching download information..." forever. When I click info and copy information, it says "iOS 27.0 beta (24A5355p) SDK + Simulator (Components absent)." It doesn't show up in any of the xcrun simctl commands for listing devices or runtimes. It doesn't show up in the Add Platforms modal. I was unable to debug this issue with an Apple engineer in person, so they suggested I post here! Update: xcodebuild -downloadPlatform doesn't work either, even though it does for watchOS
Replies
3
Boosts
0
Views
122
Activity
1w
Xcode 27 for Intel Macs
According to the release notes (https://developer.apple.com/documentation/xcode-release-notes/xcode-27-release-notes), "Xcode 27 beta requires a Mac running macOS Tahoe 26.4 or later." I've tried it on my Intel MacBook running macOS Tahoe 26.5, and it wouldn't run. Looking into it, the binary for the application is an arm64 executable only (which explains why it wouldn't run). Is that a mistake in the release notes, or a mistake with the Xcode 27 beta?
Replies
6
Boosts
2
Views
453
Activity
1w
Slow launch of app on iOS Simulator 26.4
Each time I launch a Debug version of the app on iOS Simulator, I see the Launch Screen presented and then about a 30-second delay before the app is responsive and debug output appears in the console panel. Filed FB22345091
Replies
10
Boosts
7
Views
1k
Activity
1w
Implementing Your Own Crash Reporter
I often get questions about third-party crash reporting. These usually show up in one of two contexts: Folks are trying to implement their own crash reporter. Folks have implemented their own crash reporter and are trying to debug a problem based on the report it generated. This is a complex issue and this post is my attempt to untangle some of that complexity. IMPORTANT macOS 27 and iOS 27, both currently in beta, introduced support for out-of-process crash reporting using the CrashReportExtension framework. I haven’t yet had time to update this post to cover that technology. However, if you’re planning to implement your own crash reporter on those platforms, you should start there. If you have a follow-up question about anything I've raised here, please put it in a new thread with the Debugging tag. IMPORTANT All of the following is my own direct experience. None of it should be considered official DTS policy. If you have a specific question that needs a direct answer — perhaps you’re trying to convince your boss that implementing your own crash reporter is a very bad idea — start a dedicated thread here on the forums and we can discuss the details there. Use whatever subtopic is appropriate for your issue, but make sure to add the Debugging tag so that I see it go by. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = "eskimo" + "1" + "@" + "apple.com" Scope First, I can only speak to the technical side of this issue. There are other aspects that are beyond my remit: I don’t work for App Review, and only they can give definitive answers about what will or won’t be allowed on the store. Implementing your own crash reporter has significant privacy implications. IMPORTANT If you implement your own crash reporter, discuss the privacy impact with a lawyer. This post assumes that you are implementing your own crash reporter. A lot of folks use a crash reporter from another third party. From my perspective these are the same thing. If you use a custom crash reporter, you are responsible for its behaviour, both good and bad, regardless of where the actual code came from. Note If you use a crash reporter from another third party, run the tests outlined in Preserve the Apple Crash Report to verify that it’s working well. General Advice I strongly advise against implementing your own crash reporter. It’s very easy to create a basic crash reporter that works well enough to debug simple problems. It’s impossible to implement a good crash reporter, one that’s reliable, binary compatible, and sufficient to debug complex problems. The bulk of this post is a low-level explanation of that impossibility. Rather than attempting the impossible, I recommend that you lean in to Apple’s crash reporter. In recent years it’s acquired some really cool new features: If you’re creating an App Store app, the Xcode organiser gives you easy, interactive access to Apple crash reports. If you’re an enterprise developer, consider switching to Custom App Distribution. This yields all the benefits of App Store distribution without your app being generally available on the store. iOS 14 and macOS 12 report crashes in MetricKit. This is a very cool feature, and I’m surprised by how few people use it effectively. If you previously dismissed Apple crash reports as insufficient, I encourage you to reconsider that decision. Why Is This Impossible? Earlier I said “It’s impossible to implement a good crash reporter”, and I want to explain why I’m confident enough in my conclusions to use that specific word. There are two fundamental problems here: On iOS (and the other iOS-based platforms, watchOS and tvOS) your crash reporter must run inside the crashed process. That means it can never be 100% reliable. If the process is crashing then, by definition, it’s in an undefined state. Attempting to do real work in that state is just asking for problems [1]. To get good results your crash reporter must be intimately tied to system implementation details. These can change from release to release, which invalidates the assumptions made by your crash reporter. This isn’t a problem for the Apple crash reporter because it ships with the system. However, a crash reporter that’s built in to your product is always going to be brittle. I’m speaking from hard-won experience here. I worked for DTS during the PowerPC-to-Intel transition, and saw a lot of folks with custom crash reporters struggle through that process. Still, this post exists because lots of folks ignore this reality, so the subsequent sections contain advice about specific technical issues. WARNING Do not interpret any of the following as encouragement to implement your own crash reporter. I strongly advise against that. However, if you ignore my advice then you should at least try to minimise the risk, which is what the rest of this document is about. [1] On macOS it’s possible for your crash reporter to run out of process, just like the Apple crash reporter. However, possible is not the same as easy. In fact, running out of process can make things worse: It prevents you from geting critical state for the crashed process without being tightly bound to OS implementation details. It would be nice if Apple provided APIs for this sort of thing, but that’s currently not the case. Preserve the Apple Crash Report You must ensure that your crash reporter doesn’t disrupt the Apple crash reporter. This is important for three reasons: Some fraction of your crashes will not be caused by your code but by problems in framework code, and accurate Apple crash reports are critical in diagnosing such issues. When dealing with really hard-to-debug problems, you need the more obscure info that’s shown in the Apple crash report. If you’re working with someone from Apple (here on the forums, via a bug report, or a DTS case, or whatever), they’re going to want an accurate Apple crash report. If your crash reporter is disrupting the Apple crash reporter — either preventing it from generating crash reports entirely [1], or distorting those crash reports — that limits how much they can help you. IMPORTANT This is not a theoretical concern. The forums have many threads where I’ve been unable to help folks debug a gnarly problem because their third-party crash reporter didn’t preserve the Apple crash report (see here, here, and here for some examples). To avoid these issues I recommend that you test your crash reporter’s impact on the Apple crash reporter. The basic idea is: Create a program that generates a set of specific crashes. Run through each crash. Verify that your crash reporter produces sensible results. Verify that the Apple crash reporter produces the same results as it does without your crash reporter With regards step 1, your test suite should include: An un-handled language exception thrown by your code An un-handled language exception thrown by the OS (accessing an NSArray out of bounds is an easy way to get this) Various machine exceptions (at a minimum, memory access, illegal instruction, and breakpoint exceptions) Stack overflow Make sure to test all of these cases on both the main thread and a secondary thread. With regards step 4, check that the resulting Apple crash report includes correct values for: The exception info The crashed thread That thread’s state Any application-specific info, and especially the last exception backtrace [1] A particularly pathological behaviour here is to end your crash reporter by calling exit. This completely suppresses the Apple crash report. Some third-party language runtimes ‘helpfully’ include such a crash reporter, which makes it very hard to debug problems that occur within your process but outside of that language. Signals Many third-party crash reporters use UNIX signals to catch the crash. This is a shame because using Mach exception handling, the mechanism used by the Apple crash reporter, is generally a better option. However, there are two reasons to favour UNIX signals over Mach exception handling: On iOS-based platforms your crash reporter must run in-process, and doing in-process Mach exception handling is not feasible. Folks are a lot more familiar with UNIX signals. Mach exception handling, and Mach messaging in general, is pretty darned obscure. If you use UNIX signals for your crash reporter, be aware that this API has some gaping pitfalls. First and foremost, your signal handler can only use async signal safe functions [1]. You can find a list of these functions in sigaction man page [2] [3]. WARNING This list does not include malloc. This means that a crash reporter’s signal handler cannot use Objective-C or Swift, as there’s no way to constrain how those language runtimes allocate memory [4]. That means you’re stuck with C or C++, but even there you have to be careful to comply with this constraint. The Operative: It’s worse than you know. Captain Malcolm Reynolds: It usually is. Many crash reports use functions like backtrace (see its man page) to get a backtrace from their signal handler. There’s two problems with this: backtrace is not an async signal safe function. backtrace uses a naïve algorithm that doesn’t deal well with cross signal handler stack frames [5]. The latter point is particularly worrying, because it hides the identity of the stack frame that triggered the signal. If you’re going to backtrace out of a signal, you must use the crashed thread’s state (accessible via the handlers uap parameter) to start your backtrace. Apropos that, if your crash reporter wants to log the state of the crashed thread, that’s the place to get it. Your signal handler must be prepared to be called by multiple threads. A typical crashing signal (like SIGSEGV) is delivered to the thread that triggered the machine exception. While your signal handler is running on that thread, other threads in your process continue to run. One of these threads could crash, causing it to call your signal handler. It’s a good idea to suspend all threads in your process early in your signal handler. However, there’s no way to completely eliminate this window. Note The need to suspend all the other threads in your process is further evidence that sticking to async signal safe functions is required. An unsafe function might depend on a thread you’ve suspended. A typical crashing signal is delivered on the thread that triggered the machine exception. If the machine exception was caused by a stack overflow, the system won’t have enough stack space to call your signal handler. You can tell the system to switch to an alternative stack (see the discussion of SA_ONSTACK in the sigaction man page) but that isn’t a complete solution (because of the thread issue discussed immediately above). Finally, there’s the question of how to exit from your signal handler. You must not call exit. There’s two problems with doing that: exit is not async signal safe. In fact, exit can run arbitrary code via handlers registered with atexit. If you want to exit the process, call _exit. Exiting the process is a bad idea anyway, because it will prevent the Apple crash reporter from running. This is very poor form. For an explanation as to why, see Preserve the Apple Crash Report (above). A better solution is to unregister your signal handler (set it to SIG_DFL) and then return. This will cause the crashed process to continue execution, crash again, and generate a crash report via the Apple crash reporter. [1] While the common signals caught by a crash reporter are not technically async signals (except SIGABRT), you still have to treat them as async signals because they can occur on any thread at any time. [2] It’s reasonable to extend this list to other routines that are implemented as thin shims on a system call. For example, I have no qualms about calling vm_read (see below) from a signal handler. [3] Be aware, however, that even this list has caveats. See my Async Signal Safe Functions vs Dyld Lazy Binding post for details. [4] I expect that it’ll eventually be possible to write signal handlers in Swift, possibly using some facility that evolves from the the existing, but unsupported, @_noAllocation and @_noLocks attributes. If you’d like to get involved with that effort, I recommend that engage with the Swift Evolution process. [5] Cross signal handler stack frames are pushed on to the stack by the kernel when it runs a signal handler on a thread. As there’s no API to learn about the structure of these frames, there’s no way to backtrace across one of these frames in isolation. I’m happy to go into details but it’s really not relevant to this discussion [6]. If you’re interested, start a new thread with the Debugging tag and we can chat there. [6] (Arg, my footnotes have footnotes!) The exception to this is where your trying to generate a crash report for code running in a signal handler. That’s not easy, and frankly you’re better off avoiding signal handlers in general. Where possible, handle signals via a Dispatch event source. Reading Memory A signal handler must be very careful about the memory it touches, because the contents of that memory might have been corrupted by the crash that triggered the signal. My general rule here is that the signal handler can safely access: Its code Its stack (subject to the constraints discussed earlier) Its arguments Immutable global state In the last point, I’m using immutable to mean immutable after startup. It’s reasonable to set up some global state when the process starts, before installing your signal handler, and then rely on it in your signal handler. Changing any global state after the signal handler is installed is dangerous, and if you need to do that you must be careful to ensure that your signal handler sees consistent state, even though a crash might occur halfway through your change. You can’t protect this global state with a mutex because mutexes are not async signal safe (and even if they were you’d deadlock if the mutex was held by the thread that crashed). You should be able to use atomic operations for this, but atomic operations are notoriously hard to use correctly (if I had a dollar for every time I’ve pointed out to a developer they’re using atomic operations incorrectly, I’d be very badly paid (-: but that’s still a lot of developers!). If your signal handler reads other memory, it must take care to avoid crashing while doing that read. There’s no BSD-level API for this [1], so I recommend that you use vm_read. [1] The traditional UNIX approach for doing this is to install a signal handler to catch any memory access exceptions triggered by the read, but now we’re talking signal handling within a signal handler and that’s just silly. Writing Files If your want to write a crash report from your signal handler, you must use low-level UNIX APIs (open, write, close) because only those low-level APIs are documented to be async signal safe. You must also set up the path in advance because the standard APIs for determining where to write the file (NSFileManager, for example) are not async signal safe. Offline Symbolication Do not attempt to do symbolication from your signal handler. Rather, write enough information to your crash report to support offline symbolication. Specifically: The addresses to symbolicate For each Mach-O image in the process: The image’s path The image’s build UUID [1] The image’s load address You can get most of the Mach-O image information using the APIs in <mach-o/dyld.h> [2]. Be aware, however, that these APIs are not async signal safe. You’ll need to get this information in advance and cache it for your signal handler to record. This is complicated by the fact that the list of Mach-O images can change as you process loads and unloads code. This requires you to share mutable state with your signal handler, which is exactly what I recommend against in Reading Memory. Note You can learn about images loading and unloading using _dyld_register_func_for_add_image and _dyld_register_func_for_remove_image respectively. [1] If you’re unfamiliar with that term, see TN3178 Checking for and resolving build UUID problems and the documents it links to. [2] I believe you’ll need to parse the Mach-O load commands to get the build UUID. What to Include When deciding what to include in a crash report, there’s a three-way balance to be struck: The more information you include, the easier it is to diagnose problems. Some information is hard to obtain, either because there’s no public API to get that information, or because the API is not available to your crash reporter. Some information is so privacy-sensitive that it has no place in a crash report. Apple’s crash reporter strikes its own balance here, and I recommend that you try to include everything that it includes, subject to the limitations described in the second point. Here’s what I’d considered to be a minimal list: Information about the machine exception that triggered the crash For memory access exceptions, the address of the access that triggered the crash Backtraces of all the threads (sometimes the backtrace of a non-crashing thread can yield critical information about the crash) The crashed thread Its thread state A list of Mach-O images, as discussed in the Offline Symbolication section IMPORTANT Make sure you report the thread backtraces in a consistent order. Without that it’s hard to correlate information across crash reports. Revision History 2026-06-09 Added a quick note about CrashReportExtension framework to the preamble. 2025-08-25 Added some links to examples of third-party crash reports not preserving the Apple crash report. Added a link to TN3178. Made other minor editorial changes. 2022-05-16 Fixed a broken link. 2021-09-10 Expanded the General Advice section to include pointers to Apple crash report resources, including MetricKit. Split the second half of that section out in to a new Why Is This Impossible? section. Made minor editoral changes. 2021-02-27 Fixed the formatting. Made minor editoral changes. 2019-05-13 Added a reference to my Async Signal Safe Functions vs Dyld Lazy Binding post. 2019-02-15 Expanded the introduction to the Preserve the Apple Crash Report section. 2019-02-14 Clarified the complexities of an out-of-process crash reporter. Added the What to Include section. Enhanced the Signals section to cover reentrancy and stack overflow. Made minor editoral changes. 2019-02-13 Made minor editoral changes. Added a new footnote to the Signals section. 2019-02-12 First posted.
Replies
0
Boosts
0
Views
20k
Activity
1w
Xcode 27: Can build any project with WatchOS target and SPM packages
I get this error for every APM package that targets WatchOS, but the package did not set any versions: The watchOS Simulator deployment target 'WATCHOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 27.0.x.
Replies
0
Boosts
1
Views
63
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
3
Boosts
2
Views
400
Activity
1w
Issue with ShazamKit Identifier / Error in Xcode
Hello all, After being palmed off by Apple support on two separate occasions, I've been directed here. I'm hoping that someone might be able to help me. I'm trying to use ShazamKit in an Xcode project and, despite having created an Identified that clearly shows ShazamKit is enabled, when I try and use this in Xcode, I get the following error: /Users/name/Projects/Project/mac-bridge/fp-shazam/Project/Project.xcodeproj Entitlement com.apple.developer.shazamkit not found and could not be included in profile. This likely is not a valid entitlement and should be removed from your entitlements file. No matter what I do or try, it always displays that error and the Bundle ID, etc, absolutely match what is in the Developer portal under "Identifiers". Does anyone know what may be causing this and how to resolve? Many thanks, in advance.
Replies
0
Boosts
0
Views
35
Activity
1w
Apple Watch does not appear in Xcode 27 Beta and Developer Mode option is missing despite paired iPhone on iOS 27
Environment: MacBook Air M4 macOS 27 Golden Gate Beta Xcode 27 Beta iPhone running iOS 27 Beta Apple Watch paired to the iPhone Steps to Reproduce: Install macOS 27 Beta and Xcode 27 Beta. Pair an Apple Watch with an iPhone running iOS 27 Beta. Enable Developer Mode on the iPhone. Connect the iPhone to the Mac and launch Xcode. Open Window → Devices and Simulators. Attempt to locate the paired Apple Watch or enable Developer Mode on the watch. Expected Result: The paired Apple Watch appears in Xcode for development purposes. A Developer Mode option is available on the Apple Watch. Xcode is able to recognize and communicate with the watch through the paired iPhone. Actual Result: The Apple Watch does not appear in Xcode. No Developer Mode option is visible on the watch. The iPhone is successfully paired and running iOS 27 Beta, but the watch remains unavailable for development workflows. Additional Notes: The iPhone and Apple Watch are already paired and functioning normally. Developer Mode is enabled on the iPhone. Restarting devices and reconnecting the iPhone did not resolve the issue. Unsure whether this is a limitation of the current beta builds or a regression in Xcode/watchOS development tooling.
Replies
0
Boosts
2
Views
144
Activity
1w
Adding Images larger than 640px to an AR Ressources Group crashes XCode 26.5
As soon as I add an image with more than 640px (longest side) to an AR Resource Group as an AR Reference Image, Xcode crashes immediately. I narrowed it down to that value. It does not seem to matter whether jpeg or png and the file size seems to be irrelevant, too. The problem came to my attention when I tried to run a new Unity build of an AR App I created a year ago (for testing) in Xcode. This used to work flawlessly. Now It doesn’t; the build produces an error „Command CompileAssetCatalog failed with a nonzero exit code“ … and when I try to click on the Asset Catalogue inside of Xcode, Xcode crashes also immediately.
Replies
1
Boosts
0
Views
33
Activity
1w
Xcode's Vim Mode - further development?
It was fantastic news to hear, last year, that Xcode was getting a Vim mode. Apple's implementation of it was a great first step, but it was missing a bunch of key features. Most importantly the dot command (and by, extension, macros) and creating marks in files, which are functions that I use/rely on on a daily basis. I thought I would finally be able to stop having to self-sign Xcode (which causes problems) in order to use XVim2 plugin, but no such luck. Will these features get added in for Xcode 14 (they don't seem to be in the beta) or are they far out on the roadmap?
Replies
12
Boosts
13
Views
9.4k
Activity
1w
Xcode 26.6 icon no-entry, will not launch on M1 MacOS 27.0
After successful Mac upgrade, Xcode 27 works but my Xcode 26.5 and also Xcode 26.6RC show a no entry overlay on the icon and a launch alert saying not supported. I did get it to launch by opening the App Package Contents and opening the Xcode inside the MacOS Folder. So you theoretically can submit to the App Store from MacOS 27.0 The behavior of the icon needs fixing. Yes they were both the Apple Silicon Xcode downloads.
Replies
0
Boosts
2
Views
63
Activity
1w
Select the model in Xcode
How do I select between GPT and Claude, and the model, when opening a new task for the coding agent with the ‘New Conversation’ button in the toolbar?
Replies
0
Boosts
1
Views
69
Activity
1w
Xcode 26.6 RC release at WWDC and MainActor bug
Does the Xcode 26.6 RC release fix the Swift compiler MainActor bug in Xcode 26.5?
Replies
1
Boosts
0
Views
60
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
0
Boosts
0
Views
26
Activity
1w
PacketLogger not logging packets on a MacBook.
I am a developer working on macOS Sonoma version 14.5 using a MacBook Pro with an M3 Pro chip. I have been trying to utilize PacketLogger, included with Xcode 15.4 extensions, to monitor Bluetooth traffic between my MacBook and my Sony WH-1000XM4 headphones. Issue Description: Despite my device being correctly paired and connected, PacketLogger does not display any Bluetooth packet data. The expected Bluetooth packets are not shown in the PacketLogger interface, even when no filters are applied, and PacketLogger settings are configured to capture all traffic. Troubleshooting Steps Taken: • I have ensured all PacketLogger filters are deactivated to capture all types of Bluetooth traffic. • I have started the PacketLogger before connecting my Bluetooth devices to capture the initial exchanges. • Reinstallation of PacketLogger and verification of Bluetooth module functionality have been performed, with no resolution to the issue. Request for Assistance: Could you provide guidance or troubleshooting steps that might address this issue? Are there known compatibility issues with PacketLogger on macOS Sonoma or with the MacBook Pro M3 Pro model that might affect its functionality? Any specific settings or configurations that I might be overlooking would also be greatly appreciated. I can provide additional information, including screenshots of my PacketLogger settings and logs, upon request. Your assistance in resolving this issue would be invaluable.
Replies
3
Boosts
6
Views
2.6k
Activity
1w
VoiceOver: "Signing & Capabilities" tab not directly accessible — request for keyboard shortcuts and tab-bar focus
Environment: Xcode 26.5, macOS Tahoe 26.5.1 (MacBook Pro, Apple M4 Max). As a blind developer working in Xcode with VoiceOver only, I'd like to report accessibility issues that make it hard to complete properly signed and entitled apps using VoiceOver alone. Issue: The "Signing & Capabilities" tab is not directly accessible. The "Signing & Capabilities" tab in the target editor is central to app configuration (team selection, capabilities, provisioning profiles), but there is no dedicated keyboard shortcut to reach it. The path requires many steps: Cmd+1 to focus the navigator, selecting the project file with the arrow keys, activating it with Return, switching to the central editor area, selecting the target, and finally locating the tab in the top bar. Specific VoiceOver problems: When the project file is activated with VoiceOver, focus often lands inside the inline rename field instead of opening the project editor as expected. The toolbar containing the editor tabs (General, Signing & Capabilities, Resource Tags, Info, Build Settings, Build Phases, Build Rules) cannot reliably be focused with VoiceOver, which prevents direct tab switching from the keyboard. Impact: A routine task such as adding a capability requires a long VoiceOver sequence that must be repeated on every visit, plus the cognitive load of remembering the exact tab order. Suggested improvements: Provide a direct keyboard shortcut for the "Signing & Capabilities" tab, and ideally for each target editor tab (for example Cmd+Option+1 through Cmd+Option+7). Ensure that activating the project file in the navigator opens the project editor by default; renaming should require an explicit second key press (Return on an already selected item, consistent with Finder). Ensure the editor tab bar can be reached and traversed with VoiceOver, for example via Tab or Ctrl+Tab.
Replies
0
Boosts
0
Views
23
Activity
1w
Code Coverage Not Accurate in Xcode 26
Description: I’m noticing that the code coverage metrics in Xcode 26 are not accurate compared to earlier versions. In Xcode 15, the same set of unit tests shows around 38% coverage, but in Xcode 26, even though all the tests are running successfully (for example, the SegmentedUI test cases), the code coverage is displayed as 0%. Has anyone else observed this behavior in Xcode 26? Is there any known issue, workaround, or configuration change required to get the correct coverage report? Environment: Xcode 26 iOS 18 SDK Unit tests running under XCTest Any insights or suggestions would be appreciated.
Replies
4
Boosts
6
Views
531
Activity
1w
Upgrading Python that ships with Xcode from 3.9.6
Hi. Our IT security team have flagged that on many developer machines they see a deprecated version of Python - 3.9.6. I've done some research on this and the general line is, feel free to upgrade the main version of Python on the Mac, but the version of Python which is internally used by Xcode (3.9.6) must be left unchanged. Our IT security team reached out to Apple and have received conflicting information as to if this Ruby 3.9.6 version can be upgraded. One response for example was "I asked my Solutions Engineer and he has come back with the following: We don’t include Python within macOS anymore, we install 3.9.6 with Xcode to support some of the internal tools - but there’s nothing preventing a customer updating that version: https://mac.install.guide/python/update". Does anyone know if it is possible to upgrade to a supported version? Kind regards, Kai.
Replies
3
Boosts
1
Views
172
Activity
1w
Xcode builds hang forever at "Planning"/clang feature-detection on macOS 26.5 — root cause is a pipe-buffer leak
Symptom Every build — both the Xcode IDE and command-line xcodebuild — hangs indefinitely at "Pre-planning"/"Planning N/M", before any compilation starts. The build log freezes for 40+ minutes with no progress and no error. Inspecting the stuck processes: The clang feature-detection probes (clang -v -E -dM -c /dev/null) sit at 0% CPU, blocked in write(). SWBBuildService is idle in swift_task_asyncMainDrainQueue → mach_msg — it never reads the probe output. Root cause: collapsed pipe buffers On this machine, anonymous pipe buffer capacity has dropped to 512 bytes (a healthy macOS pipe starts at 16 KB and expands to 64 KB on demand). SWBBuildService runs the clang feature-detection probe and reads its ~15 KB of output lazily (via Swift concurrency). With only a 512-byte buffer, the pipe fills instantly, clang's write() blocks forever, and the build deadlocks before it begins. swift build (SwiftPM) is unaffected because it drains subprocess pipes continuously in small reads — confirming the problem is the pipe buffer size, not the toolchain or compiler. The key detail — it's progressive, not constant (looks like a kernel pipe-KVA leak) This is the part that points at a kernel bug rather than a fixed config: Right after a reboot, a fresh os.pipe() measures 65536 bytes, and builds succeed normally. After ~50 minutes of normal build activity, the same measurement has monotonically degraded to 512 bytes, and builds hang again. So pipe capacity appears to leak down as pipe kernel-virtual-address (KVA) accounting accumulates during use. Notably, kern.ipc.maxpipekva does not exist as a sysctl OID on 26.5, so there's no tunable to raise the pool. Minimal diagnostic anyone can run import os, fcntl, errno r, w = os.pipe() fcntl.fcntl(w, fcntl.F_SETFL, os.O_NONBLOCK) total = 0 try: while True: total += os.write(w, b"x" * 256) except OSError as e: if e.errno != errno.EAGAIN: raise print("pipe capacity:", total, "bytes") Healthy machine: 16384+ (usually 65536). Affected machine: 512. When it reads 512, every xcodebuild will hang. What did NOT fix it (ruled out) Downgrading Xcode — tested Xcode 26.4.1 (17E202) via DEVELOPER_DIR: hangs identically. The trigger is the OS, not Xcode/Swift. Raising kern.ipc.maxpipekva — the OID doesn't exist on 26.5. Memory pressure (64 GB, 94% free, 0 swap), /etc/sysctl.conf / boot-time overrides, NVRAM boot-args, MDM/configuration profiles (not enrolled), third-party security/AV/DLP software (none installed), the project/packages, derivedData location, user Xcode prefs (clean HOME still hangs), connected devices. File-descriptor exhaustion — only ~87 pipe FDs were open, so it's not a count limit; it's per-pipe capacity. What does help Reboot restores 64 KB pipes — but only buys ~1 build before they degrade again. Temporary. Full in-place reinstall of macOS 26.5 resets pipe capacity (the incremental OTA may have left the system inconsistent), but the leak recurs with use. Staying on / reverting to macOS 26.4 is the only durable fix found, since 26.5 is the trigger. Question for Apple / others seeing this Has anyone else on 26.5 (25F71) confirmed pipe capacity degrading over time with the Python snippet above? This looks like a kernel pipe-KVA accounting leak introduced in 26.5. A separate, smaller issue is that SWBBuildService drains the clang probe pipe lazily, which turns a small pipe buffer into a hard deadlock instead of just slow I/O — a continuous-drain read would make Xcode resilient to it. Environment Mac Studio (Apple Silicon), 64 GB RAM macOS 26.5 (build 25F71) — problem began immediately after an incremental OTA update from 26.2 → 26.5 Xcode 26.5 (also reproduced on Xcode 26.4.1 / 17E202 — see below)
Replies
1
Boosts
1
Views
111
Activity
1w