Search results for

“Xcode”

93,868 results found

Post

Replies

Boosts

Views

Activity

Sporadic crash in xzm_main_malloc_zone_init_range_groups when spawning large binaries (macOS 26.3.1)
We're seeing a sporadic crash (~2-3% of spawns) when launching a large Mach-O binary via posix_spawn(). The crash happens inside libsystem_malloc.dylib during __malloc_init, before any application code runs. The process never reaches main(). Environment: macOS 26.3.1 (25D2128), Apple Silicon (ARM64) Crash signature BUG IN LIBMALLOC: pointer range initial reservation failed, Abort Cause 3 #0 libsystem_malloc.dylib: xzm_main_malloc_zone_init_range_groups.cold.1 #1 libsystem_malloc.dylib: xzm_main_malloc_zone_init_range_groups #2 libsystem_malloc.dylib: xzm_main_malloc_zone_create #3 libsystem_malloc.dylib: __malloc_init #4 libSystem.B.dylib: libSystem_initializer #5 dyld: dyld4::Loader::findAndRunAllInitializers The binary It's a Chromium component-build test binary (browser_tests): ~1.5 GiB on disk, 5.54 GiB total VA footprint (__TEXT 517 MiB, __LINKEDIT 1.04 GiB, __PAGEZERO 4 GiB) Links 527 dylibs via @rpath All images span ~16.4 GiB of VA when loaded A simple loop that spawns this binary 200 times v
2
0
69
1d
Reply to Xcode 26.4 is missing the documentation for Foundation
FB22362166 Thanks! AFAICT this is Just A Bug™. I’m seeing a similar issue with my Xcode 26.4 install (a public release of Xcode 26.4 running on a public release of macOS 26.3.1). I suspect it’s due to the recent work to synchronise documentation between Apple > Developer and Swift > Documentation. However, we won’t know for sure until your bug has had more chance to find its way through our systems. ps It’s better to reply as a reply, rather than in the comments; see Quinn’s Top Ten DevForums Tips for this and other titbits. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
1d
Reply to Localization in Swift macOS console Apps.
[quote='882371022, Arebus, /thread/820871?answerId=882371022#882371022, /profile/Arebus'] I thought it would be easier to write a CLI than … [/quote] Yeah, I know what you mean, but recently I’ve moved away from that approach: For low-level stuff, I tend to put the test code into a unit test. This is just as easy to debug as a command-line tool, but it has the advantage that, as you exercise various code paths, you build up a corpus of unit tests that ensure that things continue to work in the future. For GUI stuff, I lean into Xcode’s preview feature. Or just do my experimentation in an target. And there’s Xcode’s UI testing support. I don’t use that a lot but, in my defence, UI stuff isn’t my focus. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Topic: UI Frameworks SubTopic: SwiftUI Tags:
1d
Reply to NEAppProxyUDPFlow.writeDatagrams fails with "The datagram was too large" on macOS 15.x, macOS 26.x
Hi Quinn, Following up on your earlier advice about using NEAppProxyUDPFlowHandling and the async readDatagrams / writeDatagrams API. I’ve updated my DNS proxy as follows: I now implement NEAppProxyUDPFlowHandling and handle DNS over UDP via the async API. For each flow, I store the Network.NWEndpoint that comes from readDatagrams() and then pass that same endpoint back into writeDatagrams. I no longer use NWHostEndpoint / NetworkExtension.NWEndpoint anywhere in this path. Relevant code (stripped down): private func readFirstDatagrams(from udpFlow: NEAppProxyUDPFlow, into flow: Flow, channel: Channel) { Task { let (pairs, error) = await udpFlow.readDatagrams() if let error = error { // handle error... return } guard let pairs = pairs, !pairs.isEmpty else { // retry... return } let (firstData, firstEndpoint) = pairs[0] let size = firstData.count MainLogger.shared.log(message: UDP recv (pairs.count) datagrams, first size=(size) from=(firstEndpoint) type=(type(of: firstEndpoint)) ) // Force a hostPort e
1d
Reply to How to debug a Launch Daemon that requires an App Group provisioning profile for XPC communication
[quote='821027021, Pavel, /thread/821027, /profile/Pavel'] For debugging purposes, I am trying to run the daemon's executable directly from the terminal [/quote] This won’t work. For your launchd daemon to work correctly, it must be started by launchd. I explain why that’s the case in XPC and App-to-App Communication. My general advice for debugging a launchd daemon is: Structure your code so that you can do most of your debugging in unit tests, rather than in your daemon. That’ll make your life much easier. To unit test your XPC code, use the technique in TN3113 Testing and debugging XPC code with an anonymous listener. To debug integration issues: Using LLDB’s --wait-for option to attach to the daemon shortly after it starts. There’s a similar option in Xcode, under Debug > Attach to Process by PID or Name. Or if you absolutely need to debug from the first instruction, add the WaitForDebugger property to your launchd property list. See the launchd.plist man page for details. [quote='821027021, P
1d
‌Xcode26-built apps cannot run on iPhone 6 or earlier devices‌
‌Using Xcode 26, the built package encounters device compatibility issues — while it installs successfully on supported iPhone devices, but it crashes immediately upon launch and cannot run normally.‌‌In previous versions of Xcode, the same minimum deployment setting in the project did not cause such compatibility issues.‌ The app built with Xcode 26 shows the following behavior when installed and tested on various devices:‌ iPhone6p iOS12.5.8 fails to run 2.iPhone6 iOS11 fails to run 3.Iphone6 iOS12.5.7 fails to run 4.iPhone7 iOS12.1.3 ok 5.iPhoneX iOS 12.2 ok 6.iphone6s plus iOS10.3.1 ok 7.iphoneXS. iOS 12.1.4 ok 8.iPhone11 iOS 13.6.1 ok 9.iPhone7. iOS 13.7 ok We have tested and found that an iPhone 6s Plus running iOS 10.3.1 can normally run the app. We would like to know whether apps built with Xcode 26 are inherently incompatible with iPhone 6 and older devices. Has Xcode 26’s underlying build environment removed full support for the A8 chip, resulting in bina
7
0
429
1d
Reply to Need MetricKit Implementation details for MacOS background Application, mainly for
Also one more point, when i integrated metric Kit and used Xcode to simulate MetricKit payloads, i was getting the callback i.e func didReceive(_ payloads: [MXMetricPayload]) Main issue was that when i launched my app with changes and waited for more than 24 hours, but i did not get any callback, so wanted to know if it works on background apps or not? Also does it work on MacOS or not? Could u pls help to answer it
1d
Reply to Background Assets - Apple Hosted - iOS26
Hello, @andy_nash, @StonedStudio, @tom_krikorian, @Dokug, and @zepsec! I’m happy to report that this issue is now resolved in the OS 26.5 beta 1 simulators that we released today with Xcode 26.5 beta 1. If you still see crashes or errors that mention a “team ID” after updating to the OS 26.5 beta 1 simulators, then please file a new feedback report and reply to this thread with the feedback ID. Note that there’s still a separate known issue that prevents the URL override from working in simulator environments. I’ll post again in this thread when that separate issue is fixed. Thanks!
1d
Background Assets: Second and subsequent download cancellations fail (iOS 26.0–26.3 RC)
Summary I'm using Background Assets to download Apple-hosted Asset Packs(downloadPolicy = onDemand). The first download cancellation succeeds, but on the second and subsequent downloads, progress.cancel() fails to work and the download completes to the end. Environment iOS 26.0 – 26.3 RC (all produce the same result) Xcode Version 26.2 (17C52) Using Apple-hosted Asset Packs Steps to Reproduce Start downloading an Asset Pack Call progress.cancel() during download → Succeeds Start downloading the same Asset Pack again Call progress.cancel() during download → Fails (download completes to the end) Observed Error Logs After 1st cancellation: A download with the ID X-XXXXXXXX-XXX failed: Error Domain=NSURLErrorDomain Code=-999 cancelled ↑ This is expected (cancellation succeeded) The fact that version 0 of the asset pack with the ID X-XXXXXX-XXX finished being downloaded couldn't be reported: Error Domain=NSCocoaErrorDomain Code=3851 Property list invalid for format: 200
2
0
128
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
18
0
1.8k
1d
Sporadic crash in xzm_main_malloc_zone_init_range_groups when spawning large binaries (macOS 26.3.1)
We're seeing a sporadic crash (~2-3% of spawns) when launching a large Mach-O binary via posix_spawn(). The crash happens inside libsystem_malloc.dylib during __malloc_init, before any application code runs. The process never reaches main(). Environment: macOS 26.3.1 (25D2128), Apple Silicon (ARM64) Crash signature BUG IN LIBMALLOC: pointer range initial reservation failed, Abort Cause 3 #0 libsystem_malloc.dylib: xzm_main_malloc_zone_init_range_groups.cold.1 #1 libsystem_malloc.dylib: xzm_main_malloc_zone_init_range_groups #2 libsystem_malloc.dylib: xzm_main_malloc_zone_create #3 libsystem_malloc.dylib: __malloc_init #4 libSystem.B.dylib: libSystem_initializer #5 dyld: dyld4::Loader::findAndRunAllInitializers The binary It's a Chromium component-build test binary (browser_tests): ~1.5 GiB on disk, 5.54 GiB total VA footprint (__TEXT 517 MiB, __LINKEDIT 1.04 GiB, __PAGEZERO 4 GiB) Links 527 dylibs via @rpath All images span ~16.4 GiB of VA when loaded A simple loop that spawns this binary 200 times v
Replies
2
Boosts
0
Views
69
Activity
1d
Reply to Xcode 26.4: IBOutlets/IBActions gutter circles missing — cannot connect storyboard to code (works in 26.3)
I have the same issue, Xcode 26.4, Objective-C project.
Replies
Boosts
Views
Activity
1d
Reply to Previews for SwiftUI views in Packages don't work in Xcode 26.4
Xcode 26.5 Beta 1 was just released which the team believes should address the issues y'all were seeing here. Would you be able to give it a go and let us know what you see?
Replies
Boosts
Views
Activity
1d
Reply to Can’t paste into Simulator after updating to Xcode 26.4
yeah i have the same bug with the new xcode 26.4 for me an short time solution is to downgrade xcode to the old version there it works like it have always been
Replies
Boosts
Views
Activity
1d
Reply to Xcode 26.4 is missing the documentation for Foundation
FB22362166 Thanks! AFAICT this is Just A Bug™. I’m seeing a similar issue with my Xcode 26.4 install (a public release of Xcode 26.4 running on a public release of macOS 26.3.1). I suspect it’s due to the recent work to synchronise documentation between Apple > Developer and Swift > Documentation. However, we won’t know for sure until your bug has had more chance to find its way through our systems. ps It’s better to reply as a reply, rather than in the comments; see Quinn’s Top Ten DevForums Tips for this and other titbits. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Replies
Boosts
Views
Activity
1d
Reply to Localization in Swift macOS console Apps.
[quote='882371022, Arebus, /thread/820871?answerId=882371022#882371022, /profile/Arebus'] I thought it would be easier to write a CLI than … [/quote] Yeah, I know what you mean, but recently I’ve moved away from that approach: For low-level stuff, I tend to put the test code into a unit test. This is just as easy to debug as a command-line tool, but it has the advantage that, as you exercise various code paths, you build up a corpus of unit tests that ensure that things continue to work in the future. For GUI stuff, I lean into Xcode’s preview feature. Or just do my experimentation in an target. And there’s Xcode’s UI testing support. I don’t use that a lot but, in my defence, UI stuff isn’t my focus. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
1d
Reply to NEAppProxyUDPFlow.writeDatagrams fails with "The datagram was too large" on macOS 15.x, macOS 26.x
Hi Quinn, Following up on your earlier advice about using NEAppProxyUDPFlowHandling and the async readDatagrams / writeDatagrams API. I’ve updated my DNS proxy as follows: I now implement NEAppProxyUDPFlowHandling and handle DNS over UDP via the async API. For each flow, I store the Network.NWEndpoint that comes from readDatagrams() and then pass that same endpoint back into writeDatagrams. I no longer use NWHostEndpoint / NetworkExtension.NWEndpoint anywhere in this path. Relevant code (stripped down): private func readFirstDatagrams(from udpFlow: NEAppProxyUDPFlow, into flow: Flow, channel: Channel) { Task { let (pairs, error) = await udpFlow.readDatagrams() if let error = error { // handle error... return } guard let pairs = pairs, !pairs.isEmpty else { // retry... return } let (firstData, firstEndpoint) = pairs[0] let size = firstData.count MainLogger.shared.log(message: UDP recv (pairs.count) datagrams, first size=(size) from=(firstEndpoint) type=(type(of: firstEndpoint)) ) // Force a hostPort e
Replies
Boosts
Views
Activity
1d
Reply to How to debug a Launch Daemon that requires an App Group provisioning profile for XPC communication
[quote='821027021, Pavel, /thread/821027, /profile/Pavel'] For debugging purposes, I am trying to run the daemon's executable directly from the terminal [/quote] This won’t work. For your launchd daemon to work correctly, it must be started by launchd. I explain why that’s the case in XPC and App-to-App Communication. My general advice for debugging a launchd daemon is: Structure your code so that you can do most of your debugging in unit tests, rather than in your daemon. That’ll make your life much easier. To unit test your XPC code, use the technique in TN3113 Testing and debugging XPC code with an anonymous listener. To debug integration issues: Using LLDB’s --wait-for option to attach to the daemon shortly after it starts. There’s a similar option in Xcode, under Debug > Attach to Process by PID or Name. Or if you absolutely need to debug from the first instruction, add the WaitForDebugger property to your launchd property list. See the launchd.plist man page for details. [quote='821027021, P
Replies
Boosts
Views
Activity
1d
‌Xcode26-built apps cannot run on iPhone 6 or earlier devices‌
‌Using Xcode 26, the built package encounters device compatibility issues — while it installs successfully on supported iPhone devices, but it crashes immediately upon launch and cannot run normally.‌‌In previous versions of Xcode, the same minimum deployment setting in the project did not cause such compatibility issues.‌ The app built with Xcode 26 shows the following behavior when installed and tested on various devices:‌ iPhone6p iOS12.5.8 fails to run 2.iPhone6 iOS11 fails to run 3.Iphone6 iOS12.5.7 fails to run 4.iPhone7 iOS12.1.3 ok 5.iPhoneX iOS 12.2 ok 6.iphone6s plus iOS10.3.1 ok 7.iphoneXS. iOS 12.1.4 ok 8.iPhone11 iOS 13.6.1 ok 9.iPhone7. iOS 13.7 ok We have tested and found that an iPhone 6s Plus running iOS 10.3.1 can normally run the app. We would like to know whether apps built with Xcode 26 are inherently incompatible with iPhone 6 and older devices. Has Xcode 26’s underlying build environment removed full support for the A8 chip, resulting in bina
Replies
7
Boosts
0
Views
429
Activity
1d
Reply to ‌Xcode26-built apps cannot run on iPhone 6 or earlier devices‌
Not just Xcode 26 — re-releasing with an older version of Xcode has the same issue. For users on iOS 12 and below, the app can no longer launch.
Replies
Boosts
Views
Activity
1d
Reply to Apps cannot launch on iOS 9-12 devices after recent build - "The process failed to exec"
The same codebase previously ran fine when uploaded to TestFlight, but after re-uploading it now fails to launch on iOS 12, even though neither the code nor the Xcode version has changed. I suspect a recent change in the App Store Connect backend processing pipeline is the cause.
Replies
Boosts
Views
Activity
1d
Reply to Need MetricKit Implementation details for MacOS background Application, mainly for
Also one more point, when i integrated metric Kit and used Xcode to simulate MetricKit payloads, i was getting the callback i.e func didReceive(_ payloads: [MXMetricPayload]) Main issue was that when i launched my app with changes and waited for more than 24 hours, but i did not get any callback, so wanted to know if it works on background apps or not? Also does it work on MacOS or not? Could u pls help to answer it
Replies
Boosts
Views
Activity
1d
Reply to Background Assets - Apple Hosted - iOS26
Hello, @andy_nash, @StonedStudio, @tom_krikorian, @Dokug, and @zepsec! I’m happy to report that this issue is now resolved in the OS 26.5 beta 1 simulators that we released today with Xcode 26.5 beta 1. If you still see crashes or errors that mention a “team ID” after updating to the OS 26.5 beta 1 simulators, then please file a new feedback report and reply to this thread with the feedback ID. Note that there’s still a separate known issue that prevents the URL override from working in simulator environments. I’ll post again in this thread when that separate issue is fixed. Thanks!
Replies
Boosts
Views
Activity
1d
Background Assets: Second and subsequent download cancellations fail (iOS 26.0–26.3 RC)
Summary I'm using Background Assets to download Apple-hosted Asset Packs(downloadPolicy = onDemand). The first download cancellation succeeds, but on the second and subsequent downloads, progress.cancel() fails to work and the download completes to the end. Environment iOS 26.0 – 26.3 RC (all produce the same result) Xcode Version 26.2 (17C52) Using Apple-hosted Asset Packs Steps to Reproduce Start downloading an Asset Pack Call progress.cancel() during download → Succeeds Start downloading the same Asset Pack again Call progress.cancel() during download → Fails (download completes to the end) Observed Error Logs After 1st cancellation: A download with the ID X-XXXXXXXX-XXX failed: Error Domain=NSURLErrorDomain Code=-999 cancelled ↑ This is expected (cancellation succeeded) The fact that version 0 of the asset pack with the ID X-XXXXXX-XXX finished being downloaded couldn't be reported: Error Domain=NSCocoaErrorDomain Code=3851 Property list invalid for format: 200
Replies
2
Boosts
0
Views
128
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
Replies
18
Boosts
0
Views
1.8k
Activity
1d