Network connections send and receive data using transport and security protocols.

Posts under Network tag

201 Posts

Post

Replies

Boosts

Views

Activity

Networking Resources
General: Forums subtopic: App & System Services > Networking TN3151 Choosing the right networking API Networking Overview document — Despite the fact that this is in the archive, this is still really useful. TLS for App Developers forums post Choosing a Network Debugging Tool documentation WWDC 2019 Session 712 Advances in Networking, Part 1 — This explains the concept of constrained networking, which is Apple’s preferred solution to questions like How do I check whether I’m on Wi-Fi? TN3135 Low-level networking on watchOS TN3179 Understanding local network privacy Adapt to changing network conditions tech talk TCP and UDP ports used by Apple software products support article Understanding Also-Ran Connections forums post Extra-ordinary Networking forums post Foundation networking: Forums tags: Foundation, CFNetwork URL Loading System documentation — NSURLSession, or URLSession in Swift, is the recommended API for HTTP[S] on Apple platforms. Moving to Fewer, Larger Transfers forums post Testing Background Session Code forums post Network framework: Forums tag: Network Network framework documentation — Network framework is the recommended API for TCP, UDP, and QUIC on Apple platforms. WWDC 2025 Session 250 Use structured concurrency with Network framework — This is a great introduction to the new Network framework API introduced in appleOS 2026. Building a custom peer-to-peer protocol sample code (aka TicTacToe) Implementing netcat with Network Framework sample code (aka nwcat) Configuring a Wi-Fi accessory to join a network sample code Moving from Multipeer Connectivity to Network Framework forums post NWEndpoint History and Advice forums post Wi-Fi (general): How to modernize your captive network developer news post Wi-Fi Fundamentals forums post Filing a Wi-Fi Bug Report forums post Working with a Wi-Fi Accessory forums post — This is part of the Extra-ordinary Networking series. Wi-Fi (iOS): TN3111 iOS Wi-Fi API overview technote Wi-Fi Aware framework documentation Building peer-to-peer apps sample code WirelessInsights framework documentation iOS Network Signal Strength forums post Network Extension Resources Wi-Fi on macOS: Forums tag: Core WLAN Core WLAN framework documentation Secure networking: Forums tags: Security Apple Platform Security support document Preventing Insecure Network Connections documentation — This is all about App Transport Security (ATS). WWDC 2017 Session 701 Your Apps and Evolving Network Security Standards [1] — This is generally interesting, but the section starting at 17:40 is, AFAIK, the best information from Apple about how certificate revocation works on modern systems. WWDC 2025 Session 314 Get ahead with quantum-secure cryptography Available trusted root certificates for Apple operating systems support article Requirements for trusted certificates in iOS 13 and macOS 10.15 support article About upcoming limits on trusted certificates support article Apple’s Certificate Transparency policy support article What’s new for enterprise in iOS 18 support article — This discusses new key usage requirements. Prepare your network environment for stricter security requirements support article — This is primarily of interest to folks developing management software, for example, an MDM server. Technote 2232 HTTPS Server Trust Evaluation Technote 2326 Creating Certificates for TLS Testing QA1948 HTTPS and Test Servers Miscellaneous: More network-related forums tags: 5G, QUIC, Bonjour On FTP forums post Using the Multicast Networking Additional Capability forums post Investigating Network Latency Problems forums post Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = "eskimo" + "1" + "@" + "apple.com" [1] This video is no longer available from Apple, but the URL should help you locate other sources of this info.
0
0
6.9k
Sep ’26
macOS: supported absolute deadline at final network egress, including queued bytes?
Hi, I’m assessing feasibility before implementing a small macOS HTTPS snapshot client. The requirement is strict: every request-bearing byte must cross the final controlled network-egress boundary before an absolute deadline. A byte crossing at or after the deadline fails. For context, the intended deadline is 07:41:00 Europe/London on a specified date, converted to UTC. This concerns request transmission, not response completion. An application precheck or a deadline to begin sending would not satisfy it. Is there a supported macOS API or mechanism with a documented guarantee covering this requirement? Specifically: Where is the enforcement boundary? Does expiry cover request bytes already queued in TLS/TCP, kernel, driver or NIC buffers, partially transmitted requests, and retransmitted request payload? Does enforcement remain fail-closed if the client or enforcement process is suspended, hangs or crashes, or the Mac sleeps and wakes? Can queued bytes resume transmission after expiry? What clock and deadline semantics apply, including equality, uncertainty, clock steps/regression and unavailable or unreliable time? Can connection reuse or buffering bypass expiry? Application retries, redirects and additional requests would be prohibited. How could an implementation observe and qualify the actual controlled egress boundary, rather than an earlier callback or queue? I have reviewed documentation for: NWConnection.ContentContext.expirationMilliseconds, which describes expiry for beginning transmission; NWConnection.SendCompletion.contentProcessed; Network Extension packet filtering, delayed-packet verdicts and provider lifecycle; TN3134 and TN3165. I have not found a documented end-to-end guarantee covering the cases above. I am not assuming that filters, cancellation, timers or socket timeouts provide it. Could an Apple engineer point to the applicable supported contract and platform restrictions, or clarify that this strict guarantee is not provided? If a mechanism is applicable, please identify supported macOS versions, required entitlements and any relevant interface or hardware limitations. This is a documentation/feasibility question only. No external service, account, credentials or capture is involved. An authoritative reference—or an explicit statement of unsupported cases—would be helpful. Many thanks in advance.
0
0
7
1h
APNs delivery when the device has both cellular and Wi-Fi: which connection gets a pending push?
We're investigating alert pushes (priority 10, mutable-content, short expiration) that occasionally arrive 2-4 minutes late, usually around a cellular -> Wi-Fi handover. The provider gets HTTP 200 immediately. What we've observed with the APNs logging profile: apsd logs mention "dual channel is enabled" and "Connected on N interfaces", and per-interface states for WWAN and NonCellular. When we silently break the device's push connection (no RST), the device notices via a keep-alive timeout, reconnects (falling back to 443 when 5223 is blocked), and pending pushes arrive within ~0.3s of the new connection. In the field, a push sent later can arrive first: push 1 is held ~2-3 minutes while push 2, sent ~60s after it, arrives over Wi-Fi in ~2s. Questions: Can a device hold APNs connections over cellular and Wi-Fi at the same time, and if so, how does APNs choose which one to deliver a push on? If a push was sent on one connection and isn't acknowledged, does APNs keep retrying on that same connection until it times out, or does it move the push to another live connection for the same device? What is the retry/backoff behaviour for an unacknowledged push (intervals, any jitter, the timeout before it's re-queued), and does that schedule reset when the device opens a new connection? On the device side, how does apsd back off between reconnect attempts after consecutive failures, and can anything (for example network changes) cut that wait short? Anything a provider can do to reduce this (for example apns-expiration choices), or is this expected best-effort behaviour? Separate from the questions: I've been genuinely impressed by how resilient the push connection is. Even when I silently killed the connection, the device noticed, fell back to another port, and APNs delivered the pending pushes within a fraction of a second of reconnecting. It's an amazing piece of engineering and I wish I got to see behind the curtain.
1
0
62
3d
Client identity selection and chain presentation when an intermediate CA in the identity’s chain is revoked
We deploy client-authentication identities (certificate + private key) to iOS/iPadOS devices for mutual TLS and Wi-Fi EAP-TLS. The identities are installed via MDM configuration profiles and used from Safari, from our app via URLSession client certificate challenges, and by the system for EAP-TLS. The intermediate CA certificate in these identities’ chain (issued by a publicly trusted root) will be revoked. A replacement intermediate certificate with the same subject and public key, but a different serial number, is valid, and the end-entity certificates will not be reissued. The private keys are not exportable. If the revoked intermediate is known to the device through Apple’s distributed revocation data, or only through the root CA’s CRL, does iOS/iPadOS evaluate this when offering the identity for selection in Safari, when handling a URLSession client certificate challenge, or when using it for EAP-TLS? Could the identity be hidden, flagged, or fail to be presented? If we install the replacement intermediate on the device (e.g. via a certificate payload in a configuration profile) and remove the original, will the system build and present the chain through the replacement certificate? For URLSession, if our app supplies the chain explicitly in URLCredential(identity:certificates:persistence:), is any revocation evaluation performed on that chain on the client side? The revocation is scheduled for 2026-11-20T09:00:00Z. Our users rely on this system for patient care in medical institutions, so any guidance before then would be greatly appreciated.
2
5
492
3d
Cellular data unavailable while an underwater-depth WKExtendedRuntimeSession is running (Wi-Fi unaffected)
Our freediving app for Apple Watch Ultra declares WKBackgroundModes "underwater-depth" and "workout-processing". During a session it runs an HKWorkoutSession, enables Water Lock and starts a WKExtendedRuntimeSession. While the diver is at the surface it sends small URLSession uploads: a live position share for the people watching from shore. On an Apple Watch Ultra with its own cellular plan and the paired iPhone switched off, every URLSession request fails while the underwater-depth runtime session is running. We tested each piece on its own, checking connectivity every 10 seconds and logging URLSessionTaskTransactionMetrics.isCellular and NWPathMonitor. Cellular only: with nothing running, 26 of 27 requests succeeded over cellular. Within seconds of the underwater-depth runtime session starting, requests time out (-1001) and NWPathMonitor reports no available interface. With the HKWorkoutSession and Water Lock running but the runtime session ended, 8 of 8 succeeded over cellular. Cellular returns within about 5 seconds of the runtime session ending. Wi-Fi only (iPhone switched off, known Wi-Fi): 34 of 34 requests succeeded over the watch's own Wi-Fi in every stage, including while the underwater-depth runtime session was running. Another shipping dive app loses cellular the same way when its dive session starts, so it does not appear to be specific to our app. Steps to reproduce: on an Apple Watch Ultra with an active cellular plan, switch the paired iPhone off and move away from any known Wi-Fi network. In an app with the underwater-depth background mode, start a WKExtendedRuntimeSession, then make a URLSession request. It times out while the session runs, and succeeds again within seconds of the session ending. Our questions: Q1. Is cellular data intentionally unavailable to apps while an underwater-depth session runs, while Wi-Fi remains available? Q2. Is there a supported way to send a small amount of data over cellular during an underwater-depth session (for example while the diver is at the surface) without ending the session? Q3. If neither, we have filed FB25362581 asking for cellular to be allowed at the surface, as Wi-Fi already is. We have a focused test project (about 140 lines) that reproduces it and can share it with DTS. watchOS 27.0.1, Apple Watch Ultra 2, Xcode 27.1.
1
0
106
5d
App Review device never reaches our domain (NSURLErrorDomain -1001, no requests in server or Cloudflare logs)
Hello, Our iOS app has been rejected four times under Guideline 2.1(a) because sign-in fails on the review iPad. The latest rejection showed NSURLErrorDomain error -1001 (the request timed out) on an iPad Air 11-inch (M3) with iPadOS 27.0, on November 5, 2026, at about 11:54 UTC. The same happened on October 16, 2026. Setup: API: https://wp.pavilion.az, HTTPS on port 443, fixed DNS name DNS and proxy on Cloudflare (IPv4 and IPv6), publicly trusted certificate The app uses URLSession, with no custom certificate checks and no proxy settings What we checked: Neither our origin server nor Cloudflare logged any request from the review device on either day. Other clients were served normally during the same minutes. The domain resolves normally from many public DNS resolvers in the United States and Europe, over IPv4 and IPv6. The app signs in in under one second on an iPad simulator in a data center in Los Angeles, and on our own devices through TestFlight. This looks similar to https://developer.apple.com/forums/thread/773444, where a Cloudflare-hosted domain resolved to a wrong address inside Apple's network. Could someone from Apple check how wp.pavilion.az resolves, and whether it is reachable, from the App Review network? We have resubmitted a build that adds a short network check to the error message (the DNS result and which connection step fails), but each review cycle takes many days. Thank you.
5
0
341
5d
macos 27 - unexpected/new errno from BSD socket connect() when pending connections exceed backlog
Please consider the trivial C program attached to this thread. The code creates a socket() and listen()s for connections, but (intentionally) doesn't accept() the connections. The listen() is done using a small backlog (of 1). This test then does several connect() attempts and expects that the connect() attempts will accumulate in the pending queue and once the queue exceeds the backlog limit, then as specified in man listen: The backlog parameter defines the maximum length for the queue of pending connections. If a connection request arrives with the queue full, the client may receive an error with an indication of ECONNREFUSED. then the connect() attempt will receive a ECONNREFUSED. However, in macos 27, such a connect() attempt leads to ECONNRESET (Connection reset by peer) instead of ECONNREFUSED. Is this expected? Experiments show that prior versions of macos were returning a ETIMEDOUT for such connect() attempts. If this new error is expected from connect() when the backlog limit has exceeded, should it be specified in the man listen documentation? Rename the attached main.c.txt to main.c. Compiling the attached program on macos 27, using clang main.c and then running ./a.out results in: ----------------------- MacOS version: 27.0.1 Kernel version: Darwin Kernel Version 27.0.0: Tue Aug 11 21:02:16 PDT 2026; root:xnu-13432.1.9~1/RELEASE_ARM64_T8112 ----------------------- started server at at 127.0.0.1:52753 with a backlog of 1 connect() attempt 1 - connected connect() attempt 2 - connected connect() attempt 3 - connected connect() attempt 4 - connected connect() attempt 5 - failed to connect() - Connection reset by peer <-- FAILURE: Unexpected error code, expected either ETIMEDOUT or ECONNREFUSED but got 54 connect() attempt 6 - connected connect() attempt 7 - connected connect() attempt 8 - connected connect() attempt 9 - failed to connect() - Connection reset by peer <-- FAILURE: Unexpected error code, expected either ETIMEDOUT or ECONNREFUSED but got 54 connect() attempt 10 - failed to connect() - Connection reset by peer <-- FAILURE: Unexpected error code, expected either ETIMEDOUT or ECONNREFUSED but got 54 connect() attempt 11 - failed to connect() - Connection reset by peer <-- FAILURE: Unexpected error code, expected either ETIMEDOUT or ECONNREFUSED but got 54 On a related note, it's unclear why several of the connect() attempts succeeded instead of just 1 of them succeeding. On prior versions of macos, the output of the same program is: ----------------------- MacOS version: 26.7.1 Kernel version: Darwin Kernel Version 25.6.0: Tue Aug 18 17:49:13 PDT 2026; root:xnu-12377.161.15.700.19~2/RELEASE_ARM64_T6000 ----------------------- started server at at 127.0.0.1:52451 with a backlog of 1 connect() attempt 1 - connected connect() attempt 2 - failed to connect() - Operation timed out connect() attempt 3 - failed to connect() - Operation timed out connect() attempt 4 - failed to connect() - Operation timed out connect() attempt 5 - failed to connect() - Operation timed out connect() attempt 6 - failed to connect() - Operation timed out connect() attempt 7 - failed to connect() - Operation timed out connect() attempt 8 - failed to connect() - Operation timed out connect() attempt 9 - failed to connect() - Operation timed out connect() attempt 10 - failed to connect() - Operation timed out connect() attempt 11 - failed to connect() - Operation timed out and this output is much more understandable and deterministic. main.c.txt
3
0
380
6d
Choosing a TLS server identity by client address with NWListener
I run an HTTPS server on NWListener (iOS and macOS) that serves several identities from one listener on port 443, picked per handshake in sec_protocol_options_set_challenge_block, as suggested in this thread. That works well for every handshake that carries a server name. The trouble is handshakes without one. Clients on the LAN connect by IP address, so they send no SNI (RFC 6066 keeps IP literals out of it), and they trust a self-signed certificate through a configuration profile. Internet clients and scanners that reach the public address through the router's port forward also often arrive without SNI. The two groups should get different certificates, and the only thing that tells them apart is the client's address. The listener knows it in newConnectionHandler, but the challenge block never sees it. What I tried: sec_protocol_metadata_t has accessors for the server name, ALPN, version, cipher suite and so on, but I can't find one for the connection's endpoints. Setting a challenge block on the accepted connection's own TLS options before start(): listener.newConnectionHandler = { connection in let remote = connection.endpoint if let tls = connection.parameters.defaultProtocolStack.applicationProtocols .compactMap({ $0 as? NWProtocolTLS.Options }).first { sec_protocol_options_set_challenge_block(tls.securityProtocolOptions, { _, complete in complete(identity(for: remote)) }, queue) } connection.start(queue: queue) }This block never runs. The listener's own block answers every handshake (tested on macOS 27.2). My questions: Is there a supported way to choose the server identity per connection based on its endpoints, short of terminating TLS myself? Is the challenge block supported under TLS 1.3 by now? I also see it run twice for every handshake; is that expected? When a server-side handshake fails, connection.metadata(definition: NWProtocolTLS.definition) returns nil. Is there any way to learn which server name a failed handshake asked for, so it can be logged? I filed FB25541009 with a small sample project that shows all three.
2
0
90
1w
A logging NWProtocolFramerImplementation-conforming type
This is an extension of https://developer.apple.com/forums/thread/854016 I was wondering if there's a way to print out the bytes passed-through so I can check that framer's implementation. Is there an existing type for this? Or would I need to introduce one? One issue is as a base diagnosing type, I can only check this new framer for correctness through inspection. Another is if using String conversion functionality takes too much resources for a type that may be called alot. My current idea is making an inline-array of 1024 bytes, write the UTF-8 representation directly, wrapping it with a no-allocation NSString, then passing that to the logging infrastructure.
1
0
74
1w
MAC Studio Clustering
Hello , We are planning to deploy an 8-node Mac Studio M5 Ultra cluster for distributed AI computing and would appreciate technical guidance on the recommended architecture, Thunderbolt 5 connectivity, and software configuration. I have reviewed Apple's WWDC26 demonstration of distributed inference and training using MLX, which features four Mac Studios. We would like to understand how best to extend this architecture to eight nodes. We would appreciate guidance on the following: Cluster Architecture and Thunderbolt 5 Connectivity Is it possible to configure all eight Mac Studios as a single distributed AI compute cluster using MLX? What Thunderbolt 5 topology is recommended for eight nodes: ring, partial mesh, or another configuration? Our proposed design includes 14 Thunderbolt 5 cables. Can all 14 be effectively utilized, or would a different cabling arrangement be more appropriate? Is there a recommended port-to-port cabling diagram or reference architecture for an eight-node configuration? Can multiple Thunderbolt 5 links between neighboring Macs be utilized to improve communication performance? Are there example configuration files, commands, or implementation guides for establishing and validating an eight-node cluster? Networking and Storage Is it appropriate to use Thunderbolt 5 for inter-node communication while using a separate 10GbE network and shared NAS for model and dataset storage? Are there any configuration considerations when using both network types simultaneously? My primary concern is establishing the correct Thunderbolt 5 topology and software architecture before implementation, particularly whether the proposed 14-cable arrangement is appropriate for eight nodes. Any guidance, reference architecture, cabling examples, or links to relevant technical documentation would be greatly appreciated. Thank you.
1
0
172
1w
NEAppPushProvider times out connecting to a server on a routed subnet, while the containing app connects fine
We use Local Push Connectivity (NEAppPushProvider, matchSSIDs set) to receive notifications from an on-premise MQTT broker over WebSocket (wss://host:port/mqtt). iPhone on Wi-Fi, VLAN A (SSID matches matchSSIDs) Server on wired VLAN B, routing and firewall rules allow VLAN A → VLAN B on that port Result: the containing app, in the foreground, connects successfully to wss://<VLAN B IP>:<port>/mqtt. At the same moment, the app push provider (URLSessionWebSocketTask to the exact same URL) fails with "The request timed out". The provider starts normally (start() is called). When the server has an address on the Wi-Fi subnet (VLAN A), the provider connects without any issue. Is the app push provider restricted to servers on the local subnet of the matched Wi-Fi network? If so, is this documented anywhere? If not, what could prevent the provider from reaching a routed address that the app itself can reach? iOS version: 27.0.1 device : iPhone 13
1
0
103
1w
iPhone Duo: NFCISO7816Tag reads fail with error 102 while connected to Wi-Fi
tl;dr: On iPhone Duo with connected WiFi it is not possible to fully verify/scan a NFC ePassport. On iPhone Duo (iPhone19,4, iOS 27.2), reading ePassports via NFCTagReaderSession / NFCISO7816Tag fails reproducibly while the device is connected to Wi-Fi. Access control (PACE) succeeds. During the following file reads (EF.SOD, DG2), one sendCommand call gets no response for about 2 seconds and then fails with NFCReaderError code 102 ("Tag response error / no response"). The failing command varies from run to run. After disconnecting from Wi-Fi in Control Center, the same passport reads immediately. Disconnecting is enough; Wi-Fi does not need to be turned off. The device lies still on the document in all attempts. ReadID Me, Regula Document Reader and our own app (KINEGRAM Digital Seal) all fail the same way. Filed as FB25502333 with sysdiagnose and video. This looks similar to the 2024 issue on iPhone 15 Pro / 16 Pro, where turning off Wi-Fi also helped: https://developer.apple.com/forums/thread/765855 If you see this on an iPhone Duo too, please file a Feedback and reference FB25502333.
1
0
124
1w
Editing protocol options
I see types like TCP or TLS include methods to change an option. These methods return Self. I want something similar for my protocol framer. Like the types above, the user-level object is a value type. The inards to work with Apple's code is a Framer<MyImplementation> property. I don't know from looking at the method descriptions if the returned Self is a copy/reference of the receiver, with the particular option mutated, or a clone with an independent option value. I tried the clone approach. I would copy the external value type, but the new values would contain a mutated clone of the internal reference type. But NWProtocolFramer.Options doesn't seem to have a clone initializer, and it doesn't conform to NSObjectProtocol, so I have to go with the copy/reference approach. So, I would return self, but mutate the internal Framer instance's Options dictionary first? Are there any subtlies to mutating the internal Options' property dictionary?
4
0
425
2w
Is a `flowClosed` report guaranteed when the owning process exits or crashes?
Our macOS NEFilterDataProvider sets shouldReport = true on flow verdicts and receives NEFilterReport.Event.flowClosed in handle(_:). In testing, we have observed close reports after the owning process exits or crashes, sometimes with a short delay. Is a flowClosed report guaranteed for every TCP and UDP flow in these cases? Does the behavior differ by protocol, and is there a documented upper bound on delivery time? We also set statisticsReportFrequency = .low. Does that setting affect only periodic .statistics reports, with no effect on flowClosed delivery?
2
0
134
2w
File Provider extension can't reach local network hosts on macOS 27, containing app can
On macOS 27 the File Provider extension of our app (Secure ShellFish, an SSH client) can't connect to any host on the local network, while the containing app connects to the same host on the same Mac without problems. Local Network is enabled for the app in System Settings, but every connection from the extension fails with "Local network prohibited". It did not happen on macOS 26 and still happens on macOS 27.2 (26B123). This is hitting end users of Secure ShellFish, not just my test setup, and it has been my number one support issue since macOS 27 was released. I filed this as FB24999927 with a sysdiagnose. I'm posting here to find out whether others with File Provider (or other) extensions see the same, and whether there is anything on our side that should make it work. Steps Install the app on a clean macOS 27 system and launch it. Choose Allow at the Local Network prompt. Add an SSH server on the local network (another Mac in my test) and open a terminal to it. This works. Open the same server in Finder (the File Provider domain under ~/Library/CloudStorage). The directory listing fails. What happens TN3179 says "In general, app extensions share the Local Network privilege state of their container app", so I expected the listing to load. Instead every connection from the extension to the LAN host is blocked, and the error depends on the networking API: CFStream: ENETDOWN (50) "Network is down" BSD socket connect(): EHOSTUNREACH (65) "No route to host" Network.framework (NWConnection, multipath TCP): waits with path unsatisfied (Local network prohibited) until our connect timeout, ETIMEDOUT (60) No Local Network prompt appears. Toggling the permission, rebooting, killing the extension process and reinstalling the app don't help. What I ruled out A stale extension process: freshly launched extension processes are blocked on their very first connection. A missing UUID cache: after installing a new build, nehelper populates the cache for the app with 14 UUIDs, including both slices of the extension's executable. The extension was blocked 23 seconds later. Shared executable UUIDs: the app and the extension have distinct Mach-O UUIDs. The sandbox: the extension has com.apple.security.network.client. A missing usage string: adding NSLocalNetworkUsageDescription to the extension's Info.plist changed nothing, with no prompt and no separate entry in System Settings. Networking in general: the extension reaches internet hosts and the Mac itself by its local name. Only other hosts on the local network are blocked. Log The blocked notification arrives with bundle_id: (null). UserEventAgent then maps the extension to the app by its UUID, nehelper answers that local network is allowed by preference, and the handler is called with the newly allowed state. Later connections from the same process are still blocked, so that state never takes effect for the extension. 09:19:37.575 UserEventAgent Got local network blocked notification: pid: 4297, uuid: 183484C2-8052-36AD-A81E-B02F15F875B3, bundle_id: (null) 09:19:37.575 UserEventAgent LocalNetwork: found bundle id com.appliedphasor.secure-shellfish.mac-provider by PID 09:19:37.575 ShellFish-Finder [C1.1.1 IPv6#dace0833.22 failed path (unsatisfied (Local network prohibited), interface: en0[802.11], ipv4, ipv6, uses wifi)] 09:19:37.576 UserEventAgent LocalNetwork: found bundle id com.appliedphasor.secure-shellfish by UUID 183484C2-8052-36AD-A81E-B02F15F875B3 09:19:37.597 nehelper UUID cache hit for com.appliedphasor.secure-shellfish 09:19:37.597 nehelper Local network allowed by preference for ShellFish (com.appliedphasor.secure-shellfish) 09:19:37.597 UserEventAgent App got response: 1 09:19:37.597 UserEventAgent Calling handler with newly allowed state: 1 09:19:44.795 fileproviderd populate-directory error: FP -1004 "Unable to list p5.local: Unable To Connect To P5.Local: Network Is Down."Questions Is this a known change in macOS 27? FB24035385 (helper and child processes no longer inherit Local Network access on macOS 27) sounds related, and other File Provider apps report the same, for example nextcloud/desktop#10885: https://github.com/nextcloud/desktop/issues/10885 Does an extension need anything on macOS 27 to share its container's Local Network privilege, such as an entitlement, an Info.plist key, or something the app must do first? If not, is there a supported workaround? The only one we see is to relay the extension's traffic through the main app over loopback, which only works while the app is running. For these users Finder integration is completely broken, because servers on the local network (Raspberry Pi, NAS, home servers) are the most common setup among them. Any pointers are much appreciated.
2
8
407
2w
tvOS 14.6 fails trying to bind UDP/1900 (succeeds on tvOS Simulator)
I'm working on a tvOS app/library which uses SSDP. The code binds a UDP socket to port 1900 and joins a multicast group using BSD Socket library. I believe this used to work on a previous tvOS version, but specifically as of tvOS 14.6 there is a divergence between the tvOS Simulator and actual devices. Actual devices fail at the call to bind, with an Address Already in Use error. The tvOS simulator binds just fine after throwing up a macOS firewall 'allow incoming connections' dialog. Any ideas what the official situation is here? The com.apple.developer.networking.multicast entitlement seems to be iOS only at this time, is that correct? Also there seems to be no 'local networking' permission dialog in tvOS - is that also correct?
5
0
3.8k
3w
NWConnection/NWListener: .failed, .cancelled, and State Handler Semantics
Hi, I am using Apple's Network.framework APIs, specifically NWConnection and NWListener over UDP, in my project. Both APIs use state-update handlers, and I would like to clarify a few aspects of their lifecycle and callback-delivery semantics. Are .failed and .cancelled delivered only once during the lifecycle? For a given NWConnection or NWListener instance, my understanding is that .failed is a terminal state and the object does not recover from it. Is .failed guaranteed to be delivered at most once during the lifetime of an instance? If the object enters .failed, can I call cancel() on that same instance? If so, will the state-update handler subsequently receive .cancelled? Is .cancelled guaranteed to be delivered at most once per instance, even if cancel() is called multiple times? If the object is in the .waiting state and I call cancel(), causing it to transition to .cancelled, is it guaranteed that .failed will not subsequently be delivered for that instance? Since there is no transition from .cancelled -> .failed? What happens when stateUpdateHandler is replaced while callbacks are pending? Consider the following scenario: I create an NWConnection and assign a stateUpdateHandler (Handler A). The connection's state changes, and a callback for Handler A is enqueued on the connection's associated DispatchQueue. Before that queued callback executes, I replace stateUpdateHandler with Handler B. If the callback for Handler A was already enqueued before the handler was replaced, will Handler A still be invoked? My understanding is Yes, since it was already queued. If the object is in the .waiting state and I call cancel(), causing it to transition to .cancelled, is it guaranteed that .failed will not subsequently be delivered for that instance Can the same state notification be delivered to both Handler A and Handler B, or is it delivered to only one of them i.e., Handler A, since during the state-change Handler A was the one as stateUpdateHandler? Thanks!
3
1
498
3w
Is Data.withUnsafeMutableBytes(_:) safe to rely on long-term for C++ interop?
Hi, in our project we use Network.framework, with NWListener and NWConnection, to send and receive data over UDP. We use the receiveMessage(completion:) API, which delivers the data as a Data object. We assign this Data to a property of one of our classes, which we continue to work with after the completion handler returns. We pass that property's bytes to our C++ code (through Swift–C++ interop) using Data.withUnsafeMutableBytes(_:). The C++ code modifies the bytes in place, and we then continue working with the modified Data in Swift. Since nothing else refers to the Data we received, the bytes are modified in place and no copy is made. However, if another Data value shared the same buffer, just calling withUnsafeMutableBytes(_:) would create a copy, whether or not we actually modified the bytes. Our understanding is that this is because the method is declared mutating, so the call itself is treated as a write and copy-on-write makes the buffer unique before the pointer is handed out. We also understand that ResultType : ~Copyable (along with the typed throws(E)) only relaxes the requirements on the closure's return type and doesn't affect this behaviour. We understand this approach is unsafe and that the pointer "should not be stored and used outside of the lifetime of the call to the closure", so we will take care of that. Since the typed-pointer variants of APIs such as Data.withUnsafeBytes were deprecated in Swift 5, we would also like to confirm that withUnsafeMutableBytes(_:), the variant that takes an UnsafeMutableRawBufferPointer, is the intended long-term API and isn't expected to be deprecated in the same way.
5
1
408
3w
Crash in libquic.dylib | quic_recovery_pto | iOS 26.1
Hello, I am investigating a recurring crash that appears to be originating within the system's network stack. OS Version: iPhone OS 26.1 (23B85) Role: Foreground Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000000 Exception Codes: 0x0000000000000001, 0x0000000000000000 Triggered by Thread: 19 Description: The crash is triggered by Thread 19 and occurs deep within libquic.dylib during a QUIC recovery timer event. Based on the backtrace, the failure happens in quic_recovery_pto. The issue seems to occur when a protocol instance schedules a wakeup, leading to a null pointer dereference in the system library. Crashed Thread Backtrace snippet:Thread 19 Crashed: Thread 19 Crashed: 0 libquic.dylib 0x00000001a00a38cc quic_recovery_pto + 72 (quic_recovery.c:1259) 1 libquic.dylib 0x00000001a00a3390 quic_recovery_timer_fired + 132 (quic_recovery.c:1460) 2 libquic.dylib 0x00000001a00a1f8c quic_timer_run + 248 (quic_timer.c:210) 3 Network 0x000000018ec76cbc __nw_protocol_instance_schedule_wakeup_block_invoke + 76 (protocol_implementation.cpp:5847) 4 Network 0x000000018eba34e0 __nw_context_reset_timer_block_with_time_block_invoke + 268 (context.cpp:2224) 5 libdispatch.dylib 0x00000001c84727ec _dispatch_client_callout + 16 (client_callout.mm:85) 6 libdispatch.dylib 0x00000001c845d664 _dispatch_continuation_pop + 596 (queue.c:349) 7 libdispatch.dylib 0x00000001c8470528 _dispatch_source_latch_and_call + 396 (source.c:601) 8 libdispatch.dylib 0x00000001c846f1fc _dispatch_source_invoke + 844 (source.c:966) 9 libdispatch.dylib 0x00000001c8463288 _dispatch_workloop_invoke + 1612 (queue.c:4761) 10 libdispatch.dylib 0x00000001c846c3ec _dispatch_root_queue_drain_deferred_wlh + 292 (queue.c:7265) 11 libdispatch.dylib 0x00000001c846bce4 _dispatch_workloop_worker_thread + 692 (queue.c:6859) 12 libsystem_pthread.dylib 0x00000001ec0623b8 _pthread_wqthread + 292 (pthread.c:2696) 13 libsystem_pthread.dylib 0x00000001ec0618c0 start_wqthread + 8 (:-1) Can anyone provide insights into what might be causing libquic to access an invalid address in this context? Any help or suggestions for further diagnostics would be greatly appreciated.
3
2
947
3w
Networking Resources
General: Forums subtopic: App & System Services > Networking TN3151 Choosing the right networking API Networking Overview document — Despite the fact that this is in the archive, this is still really useful. TLS for App Developers forums post Choosing a Network Debugging Tool documentation WWDC 2019 Session 712 Advances in Networking, Part 1 — This explains the concept of constrained networking, which is Apple’s preferred solution to questions like How do I check whether I’m on Wi-Fi? TN3135 Low-level networking on watchOS TN3179 Understanding local network privacy Adapt to changing network conditions tech talk TCP and UDP ports used by Apple software products support article Understanding Also-Ran Connections forums post Extra-ordinary Networking forums post Foundation networking: Forums tags: Foundation, CFNetwork URL Loading System documentation — NSURLSession, or URLSession in Swift, is the recommended API for HTTP[S] on Apple platforms. Moving to Fewer, Larger Transfers forums post Testing Background Session Code forums post Network framework: Forums tag: Network Network framework documentation — Network framework is the recommended API for TCP, UDP, and QUIC on Apple platforms. WWDC 2025 Session 250 Use structured concurrency with Network framework — This is a great introduction to the new Network framework API introduced in appleOS 2026. Building a custom peer-to-peer protocol sample code (aka TicTacToe) Implementing netcat with Network Framework sample code (aka nwcat) Configuring a Wi-Fi accessory to join a network sample code Moving from Multipeer Connectivity to Network Framework forums post NWEndpoint History and Advice forums post Wi-Fi (general): How to modernize your captive network developer news post Wi-Fi Fundamentals forums post Filing a Wi-Fi Bug Report forums post Working with a Wi-Fi Accessory forums post — This is part of the Extra-ordinary Networking series. Wi-Fi (iOS): TN3111 iOS Wi-Fi API overview technote Wi-Fi Aware framework documentation Building peer-to-peer apps sample code WirelessInsights framework documentation iOS Network Signal Strength forums post Network Extension Resources Wi-Fi on macOS: Forums tag: Core WLAN Core WLAN framework documentation Secure networking: Forums tags: Security Apple Platform Security support document Preventing Insecure Network Connections documentation — This is all about App Transport Security (ATS). WWDC 2017 Session 701 Your Apps and Evolving Network Security Standards [1] — This is generally interesting, but the section starting at 17:40 is, AFAIK, the best information from Apple about how certificate revocation works on modern systems. WWDC 2025 Session 314 Get ahead with quantum-secure cryptography Available trusted root certificates for Apple operating systems support article Requirements for trusted certificates in iOS 13 and macOS 10.15 support article About upcoming limits on trusted certificates support article Apple’s Certificate Transparency policy support article What’s new for enterprise in iOS 18 support article — This discusses new key usage requirements. Prepare your network environment for stricter security requirements support article — This is primarily of interest to folks developing management software, for example, an MDM server. Technote 2232 HTTPS Server Trust Evaluation Technote 2326 Creating Certificates for TLS Testing QA1948 HTTPS and Test Servers Miscellaneous: More network-related forums tags: 5G, QUIC, Bonjour On FTP forums post Using the Multicast Networking Additional Capability forums post Investigating Network Latency Problems forums post Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = "eskimo" + "1" + "@" + "apple.com" [1] This video is no longer available from Apple, but the URL should help you locate other sources of this info.
Replies
0
Boosts
0
Views
6.9k
Activity
Sep ’26
macOS: supported absolute deadline at final network egress, including queued bytes?
Hi, I’m assessing feasibility before implementing a small macOS HTTPS snapshot client. The requirement is strict: every request-bearing byte must cross the final controlled network-egress boundary before an absolute deadline. A byte crossing at or after the deadline fails. For context, the intended deadline is 07:41:00 Europe/London on a specified date, converted to UTC. This concerns request transmission, not response completion. An application precheck or a deadline to begin sending would not satisfy it. Is there a supported macOS API or mechanism with a documented guarantee covering this requirement? Specifically: Where is the enforcement boundary? Does expiry cover request bytes already queued in TLS/TCP, kernel, driver or NIC buffers, partially transmitted requests, and retransmitted request payload? Does enforcement remain fail-closed if the client or enforcement process is suspended, hangs or crashes, or the Mac sleeps and wakes? Can queued bytes resume transmission after expiry? What clock and deadline semantics apply, including equality, uncertainty, clock steps/regression and unavailable or unreliable time? Can connection reuse or buffering bypass expiry? Application retries, redirects and additional requests would be prohibited. How could an implementation observe and qualify the actual controlled egress boundary, rather than an earlier callback or queue? I have reviewed documentation for: NWConnection.ContentContext.expirationMilliseconds, which describes expiry for beginning transmission; NWConnection.SendCompletion.contentProcessed; Network Extension packet filtering, delayed-packet verdicts and provider lifecycle; TN3134 and TN3165. I have not found a documented end-to-end guarantee covering the cases above. I am not assuming that filters, cancellation, timers or socket timeouts provide it. Could an Apple engineer point to the applicable supported contract and platform restrictions, or clarify that this strict guarantee is not provided? If a mechanism is applicable, please identify supported macOS versions, required entitlements and any relevant interface or hardware limitations. This is a documentation/feasibility question only. No external service, account, credentials or capture is involved. An authoritative reference—or an explicit statement of unsupported cases—would be helpful. Many thanks in advance.
Replies
0
Boosts
0
Views
7
Activity
1h
APNs delivery when the device has both cellular and Wi-Fi: which connection gets a pending push?
We're investigating alert pushes (priority 10, mutable-content, short expiration) that occasionally arrive 2-4 minutes late, usually around a cellular -> Wi-Fi handover. The provider gets HTTP 200 immediately. What we've observed with the APNs logging profile: apsd logs mention "dual channel is enabled" and "Connected on N interfaces", and per-interface states for WWAN and NonCellular. When we silently break the device's push connection (no RST), the device notices via a keep-alive timeout, reconnects (falling back to 443 when 5223 is blocked), and pending pushes arrive within ~0.3s of the new connection. In the field, a push sent later can arrive first: push 1 is held ~2-3 minutes while push 2, sent ~60s after it, arrives over Wi-Fi in ~2s. Questions: Can a device hold APNs connections over cellular and Wi-Fi at the same time, and if so, how does APNs choose which one to deliver a push on? If a push was sent on one connection and isn't acknowledged, does APNs keep retrying on that same connection until it times out, or does it move the push to another live connection for the same device? What is the retry/backoff behaviour for an unacknowledged push (intervals, any jitter, the timeout before it's re-queued), and does that schedule reset when the device opens a new connection? On the device side, how does apsd back off between reconnect attempts after consecutive failures, and can anything (for example network changes) cut that wait short? Anything a provider can do to reduce this (for example apns-expiration choices), or is this expected best-effort behaviour? Separate from the questions: I've been genuinely impressed by how resilient the push connection is. Even when I silently killed the connection, the device noticed, fell back to another port, and APNs delivered the pending pushes within a fraction of a second of reconnecting. It's an amazing piece of engineering and I wish I got to see behind the curtain.
Replies
1
Boosts
0
Views
62
Activity
3d
Client identity selection and chain presentation when an intermediate CA in the identity’s chain is revoked
We deploy client-authentication identities (certificate + private key) to iOS/iPadOS devices for mutual TLS and Wi-Fi EAP-TLS. The identities are installed via MDM configuration profiles and used from Safari, from our app via URLSession client certificate challenges, and by the system for EAP-TLS. The intermediate CA certificate in these identities’ chain (issued by a publicly trusted root) will be revoked. A replacement intermediate certificate with the same subject and public key, but a different serial number, is valid, and the end-entity certificates will not be reissued. The private keys are not exportable. If the revoked intermediate is known to the device through Apple’s distributed revocation data, or only through the root CA’s CRL, does iOS/iPadOS evaluate this when offering the identity for selection in Safari, when handling a URLSession client certificate challenge, or when using it for EAP-TLS? Could the identity be hidden, flagged, or fail to be presented? If we install the replacement intermediate on the device (e.g. via a certificate payload in a configuration profile) and remove the original, will the system build and present the chain through the replacement certificate? For URLSession, if our app supplies the chain explicitly in URLCredential(identity:certificates:persistence:), is any revocation evaluation performed on that chain on the client side? The revocation is scheduled for 2026-11-20T09:00:00Z. Our users rely on this system for patient care in medical institutions, so any guidance before then would be greatly appreciated.
Replies
2
Boosts
5
Views
492
Activity
3d
Cellular data unavailable while an underwater-depth WKExtendedRuntimeSession is running (Wi-Fi unaffected)
Our freediving app for Apple Watch Ultra declares WKBackgroundModes "underwater-depth" and "workout-processing". During a session it runs an HKWorkoutSession, enables Water Lock and starts a WKExtendedRuntimeSession. While the diver is at the surface it sends small URLSession uploads: a live position share for the people watching from shore. On an Apple Watch Ultra with its own cellular plan and the paired iPhone switched off, every URLSession request fails while the underwater-depth runtime session is running. We tested each piece on its own, checking connectivity every 10 seconds and logging URLSessionTaskTransactionMetrics.isCellular and NWPathMonitor. Cellular only: with nothing running, 26 of 27 requests succeeded over cellular. Within seconds of the underwater-depth runtime session starting, requests time out (-1001) and NWPathMonitor reports no available interface. With the HKWorkoutSession and Water Lock running but the runtime session ended, 8 of 8 succeeded over cellular. Cellular returns within about 5 seconds of the runtime session ending. Wi-Fi only (iPhone switched off, known Wi-Fi): 34 of 34 requests succeeded over the watch's own Wi-Fi in every stage, including while the underwater-depth runtime session was running. Another shipping dive app loses cellular the same way when its dive session starts, so it does not appear to be specific to our app. Steps to reproduce: on an Apple Watch Ultra with an active cellular plan, switch the paired iPhone off and move away from any known Wi-Fi network. In an app with the underwater-depth background mode, start a WKExtendedRuntimeSession, then make a URLSession request. It times out while the session runs, and succeeds again within seconds of the session ending. Our questions: Q1. Is cellular data intentionally unavailable to apps while an underwater-depth session runs, while Wi-Fi remains available? Q2. Is there a supported way to send a small amount of data over cellular during an underwater-depth session (for example while the diver is at the surface) without ending the session? Q3. If neither, we have filed FB25362581 asking for cellular to be allowed at the surface, as Wi-Fi already is. We have a focused test project (about 140 lines) that reproduces it and can share it with DTS. watchOS 27.0.1, Apple Watch Ultra 2, Xcode 27.1.
Replies
1
Boosts
0
Views
106
Activity
5d
App Review device never reaches our domain (NSURLErrorDomain -1001, no requests in server or Cloudflare logs)
Hello, Our iOS app has been rejected four times under Guideline 2.1(a) because sign-in fails on the review iPad. The latest rejection showed NSURLErrorDomain error -1001 (the request timed out) on an iPad Air 11-inch (M3) with iPadOS 27.0, on November 5, 2026, at about 11:54 UTC. The same happened on October 16, 2026. Setup: API: https://wp.pavilion.az, HTTPS on port 443, fixed DNS name DNS and proxy on Cloudflare (IPv4 and IPv6), publicly trusted certificate The app uses URLSession, with no custom certificate checks and no proxy settings What we checked: Neither our origin server nor Cloudflare logged any request from the review device on either day. Other clients were served normally during the same minutes. The domain resolves normally from many public DNS resolvers in the United States and Europe, over IPv4 and IPv6. The app signs in in under one second on an iPad simulator in a data center in Los Angeles, and on our own devices through TestFlight. This looks similar to https://developer.apple.com/forums/thread/773444, where a Cloudflare-hosted domain resolved to a wrong address inside Apple's network. Could someone from Apple check how wp.pavilion.az resolves, and whether it is reachable, from the App Review network? We have resubmitted a build that adds a short network check to the error message (the DNS result and which connection step fails), but each review cycle takes many days. Thank you.
Replies
5
Boosts
0
Views
341
Activity
5d
macos 27 - unexpected/new errno from BSD socket connect() when pending connections exceed backlog
Please consider the trivial C program attached to this thread. The code creates a socket() and listen()s for connections, but (intentionally) doesn't accept() the connections. The listen() is done using a small backlog (of 1). This test then does several connect() attempts and expects that the connect() attempts will accumulate in the pending queue and once the queue exceeds the backlog limit, then as specified in man listen: The backlog parameter defines the maximum length for the queue of pending connections. If a connection request arrives with the queue full, the client may receive an error with an indication of ECONNREFUSED. then the connect() attempt will receive a ECONNREFUSED. However, in macos 27, such a connect() attempt leads to ECONNRESET (Connection reset by peer) instead of ECONNREFUSED. Is this expected? Experiments show that prior versions of macos were returning a ETIMEDOUT for such connect() attempts. If this new error is expected from connect() when the backlog limit has exceeded, should it be specified in the man listen documentation? Rename the attached main.c.txt to main.c. Compiling the attached program on macos 27, using clang main.c and then running ./a.out results in: ----------------------- MacOS version: 27.0.1 Kernel version: Darwin Kernel Version 27.0.0: Tue Aug 11 21:02:16 PDT 2026; root:xnu-13432.1.9~1/RELEASE_ARM64_T8112 ----------------------- started server at at 127.0.0.1:52753 with a backlog of 1 connect() attempt 1 - connected connect() attempt 2 - connected connect() attempt 3 - connected connect() attempt 4 - connected connect() attempt 5 - failed to connect() - Connection reset by peer <-- FAILURE: Unexpected error code, expected either ETIMEDOUT or ECONNREFUSED but got 54 connect() attempt 6 - connected connect() attempt 7 - connected connect() attempt 8 - connected connect() attempt 9 - failed to connect() - Connection reset by peer <-- FAILURE: Unexpected error code, expected either ETIMEDOUT or ECONNREFUSED but got 54 connect() attempt 10 - failed to connect() - Connection reset by peer <-- FAILURE: Unexpected error code, expected either ETIMEDOUT or ECONNREFUSED but got 54 connect() attempt 11 - failed to connect() - Connection reset by peer <-- FAILURE: Unexpected error code, expected either ETIMEDOUT or ECONNREFUSED but got 54 On a related note, it's unclear why several of the connect() attempts succeeded instead of just 1 of them succeeding. On prior versions of macos, the output of the same program is: ----------------------- MacOS version: 26.7.1 Kernel version: Darwin Kernel Version 25.6.0: Tue Aug 18 17:49:13 PDT 2026; root:xnu-12377.161.15.700.19~2/RELEASE_ARM64_T6000 ----------------------- started server at at 127.0.0.1:52451 with a backlog of 1 connect() attempt 1 - connected connect() attempt 2 - failed to connect() - Operation timed out connect() attempt 3 - failed to connect() - Operation timed out connect() attempt 4 - failed to connect() - Operation timed out connect() attempt 5 - failed to connect() - Operation timed out connect() attempt 6 - failed to connect() - Operation timed out connect() attempt 7 - failed to connect() - Operation timed out connect() attempt 8 - failed to connect() - Operation timed out connect() attempt 9 - failed to connect() - Operation timed out connect() attempt 10 - failed to connect() - Operation timed out connect() attempt 11 - failed to connect() - Operation timed out and this output is much more understandable and deterministic. main.c.txt
Replies
3
Boosts
0
Views
380
Activity
6d
Choosing a TLS server identity by client address with NWListener
I run an HTTPS server on NWListener (iOS and macOS) that serves several identities from one listener on port 443, picked per handshake in sec_protocol_options_set_challenge_block, as suggested in this thread. That works well for every handshake that carries a server name. The trouble is handshakes without one. Clients on the LAN connect by IP address, so they send no SNI (RFC 6066 keeps IP literals out of it), and they trust a self-signed certificate through a configuration profile. Internet clients and scanners that reach the public address through the router's port forward also often arrive without SNI. The two groups should get different certificates, and the only thing that tells them apart is the client's address. The listener knows it in newConnectionHandler, but the challenge block never sees it. What I tried: sec_protocol_metadata_t has accessors for the server name, ALPN, version, cipher suite and so on, but I can't find one for the connection's endpoints. Setting a challenge block on the accepted connection's own TLS options before start(): listener.newConnectionHandler = { connection in let remote = connection.endpoint if let tls = connection.parameters.defaultProtocolStack.applicationProtocols .compactMap({ $0 as? NWProtocolTLS.Options }).first { sec_protocol_options_set_challenge_block(tls.securityProtocolOptions, { _, complete in complete(identity(for: remote)) }, queue) } connection.start(queue: queue) }This block never runs. The listener's own block answers every handshake (tested on macOS 27.2). My questions: Is there a supported way to choose the server identity per connection based on its endpoints, short of terminating TLS myself? Is the challenge block supported under TLS 1.3 by now? I also see it run twice for every handshake; is that expected? When a server-side handshake fails, connection.metadata(definition: NWProtocolTLS.definition) returns nil. Is there any way to learn which server name a failed handshake asked for, so it can be logged? I filed FB25541009 with a small sample project that shows all three.
Replies
2
Boosts
0
Views
90
Activity
1w
A logging NWProtocolFramerImplementation-conforming type
This is an extension of https://developer.apple.com/forums/thread/854016 I was wondering if there's a way to print out the bytes passed-through so I can check that framer's implementation. Is there an existing type for this? Or would I need to introduce one? One issue is as a base diagnosing type, I can only check this new framer for correctness through inspection. Another is if using String conversion functionality takes too much resources for a type that may be called alot. My current idea is making an inline-array of 1024 bytes, write the UTF-8 representation directly, wrapping it with a no-allocation NSString, then passing that to the logging infrastructure.
Replies
1
Boosts
0
Views
74
Activity
1w
MAC Studio Clustering
Hello , We are planning to deploy an 8-node Mac Studio M5 Ultra cluster for distributed AI computing and would appreciate technical guidance on the recommended architecture, Thunderbolt 5 connectivity, and software configuration. I have reviewed Apple's WWDC26 demonstration of distributed inference and training using MLX, which features four Mac Studios. We would like to understand how best to extend this architecture to eight nodes. We would appreciate guidance on the following: Cluster Architecture and Thunderbolt 5 Connectivity Is it possible to configure all eight Mac Studios as a single distributed AI compute cluster using MLX? What Thunderbolt 5 topology is recommended for eight nodes: ring, partial mesh, or another configuration? Our proposed design includes 14 Thunderbolt 5 cables. Can all 14 be effectively utilized, or would a different cabling arrangement be more appropriate? Is there a recommended port-to-port cabling diagram or reference architecture for an eight-node configuration? Can multiple Thunderbolt 5 links between neighboring Macs be utilized to improve communication performance? Are there example configuration files, commands, or implementation guides for establishing and validating an eight-node cluster? Networking and Storage Is it appropriate to use Thunderbolt 5 for inter-node communication while using a separate 10GbE network and shared NAS for model and dataset storage? Are there any configuration considerations when using both network types simultaneously? My primary concern is establishing the correct Thunderbolt 5 topology and software architecture before implementation, particularly whether the proposed 14-cable arrangement is appropriate for eight nodes. Any guidance, reference architecture, cabling examples, or links to relevant technical documentation would be greatly appreciated. Thank you.
Replies
1
Boosts
0
Views
172
Activity
1w
NEAppPushProvider times out connecting to a server on a routed subnet, while the containing app connects fine
We use Local Push Connectivity (NEAppPushProvider, matchSSIDs set) to receive notifications from an on-premise MQTT broker over WebSocket (wss://host:port/mqtt). iPhone on Wi-Fi, VLAN A (SSID matches matchSSIDs) Server on wired VLAN B, routing and firewall rules allow VLAN A → VLAN B on that port Result: the containing app, in the foreground, connects successfully to wss://<VLAN B IP>:<port>/mqtt. At the same moment, the app push provider (URLSessionWebSocketTask to the exact same URL) fails with "The request timed out". The provider starts normally (start() is called). When the server has an address on the Wi-Fi subnet (VLAN A), the provider connects without any issue. Is the app push provider restricted to servers on the local subnet of the matched Wi-Fi network? If so, is this documented anywhere? If not, what could prevent the provider from reaching a routed address that the app itself can reach? iOS version: 27.0.1 device : iPhone 13
Replies
1
Boosts
0
Views
103
Activity
1w
iPhone Duo: NFCISO7816Tag reads fail with error 102 while connected to Wi-Fi
tl;dr: On iPhone Duo with connected WiFi it is not possible to fully verify/scan a NFC ePassport. On iPhone Duo (iPhone19,4, iOS 27.2), reading ePassports via NFCTagReaderSession / NFCISO7816Tag fails reproducibly while the device is connected to Wi-Fi. Access control (PACE) succeeds. During the following file reads (EF.SOD, DG2), one sendCommand call gets no response for about 2 seconds and then fails with NFCReaderError code 102 ("Tag response error / no response"). The failing command varies from run to run. After disconnecting from Wi-Fi in Control Center, the same passport reads immediately. Disconnecting is enough; Wi-Fi does not need to be turned off. The device lies still on the document in all attempts. ReadID Me, Regula Document Reader and our own app (KINEGRAM Digital Seal) all fail the same way. Filed as FB25502333 with sysdiagnose and video. This looks similar to the 2024 issue on iPhone 15 Pro / 16 Pro, where turning off Wi-Fi also helped: https://developer.apple.com/forums/thread/765855 If you see this on an iPhone Duo too, please file a Feedback and reference FB25502333.
Replies
1
Boosts
0
Views
124
Activity
1w
Editing protocol options
I see types like TCP or TLS include methods to change an option. These methods return Self. I want something similar for my protocol framer. Like the types above, the user-level object is a value type. The inards to work with Apple's code is a Framer<MyImplementation> property. I don't know from looking at the method descriptions if the returned Self is a copy/reference of the receiver, with the particular option mutated, or a clone with an independent option value. I tried the clone approach. I would copy the external value type, but the new values would contain a mutated clone of the internal reference type. But NWProtocolFramer.Options doesn't seem to have a clone initializer, and it doesn't conform to NSObjectProtocol, so I have to go with the copy/reference approach. So, I would return self, but mutate the internal Framer instance's Options dictionary first? Are there any subtlies to mutating the internal Options' property dictionary?
Replies
4
Boosts
0
Views
425
Activity
2w
Is a `flowClosed` report guaranteed when the owning process exits or crashes?
Our macOS NEFilterDataProvider sets shouldReport = true on flow verdicts and receives NEFilterReport.Event.flowClosed in handle(_:). In testing, we have observed close reports after the owning process exits or crashes, sometimes with a short delay. Is a flowClosed report guaranteed for every TCP and UDP flow in these cases? Does the behavior differ by protocol, and is there a documented upper bound on delivery time? We also set statisticsReportFrequency = .low. Does that setting affect only periodic .statistics reports, with no effect on flowClosed delivery?
Replies
2
Boosts
0
Views
134
Activity
2w
File Provider extension can't reach local network hosts on macOS 27, containing app can
On macOS 27 the File Provider extension of our app (Secure ShellFish, an SSH client) can't connect to any host on the local network, while the containing app connects to the same host on the same Mac without problems. Local Network is enabled for the app in System Settings, but every connection from the extension fails with "Local network prohibited". It did not happen on macOS 26 and still happens on macOS 27.2 (26B123). This is hitting end users of Secure ShellFish, not just my test setup, and it has been my number one support issue since macOS 27 was released. I filed this as FB24999927 with a sysdiagnose. I'm posting here to find out whether others with File Provider (or other) extensions see the same, and whether there is anything on our side that should make it work. Steps Install the app on a clean macOS 27 system and launch it. Choose Allow at the Local Network prompt. Add an SSH server on the local network (another Mac in my test) and open a terminal to it. This works. Open the same server in Finder (the File Provider domain under ~/Library/CloudStorage). The directory listing fails. What happens TN3179 says "In general, app extensions share the Local Network privilege state of their container app", so I expected the listing to load. Instead every connection from the extension to the LAN host is blocked, and the error depends on the networking API: CFStream: ENETDOWN (50) "Network is down" BSD socket connect(): EHOSTUNREACH (65) "No route to host" Network.framework (NWConnection, multipath TCP): waits with path unsatisfied (Local network prohibited) until our connect timeout, ETIMEDOUT (60) No Local Network prompt appears. Toggling the permission, rebooting, killing the extension process and reinstalling the app don't help. What I ruled out A stale extension process: freshly launched extension processes are blocked on their very first connection. A missing UUID cache: after installing a new build, nehelper populates the cache for the app with 14 UUIDs, including both slices of the extension's executable. The extension was blocked 23 seconds later. Shared executable UUIDs: the app and the extension have distinct Mach-O UUIDs. The sandbox: the extension has com.apple.security.network.client. A missing usage string: adding NSLocalNetworkUsageDescription to the extension's Info.plist changed nothing, with no prompt and no separate entry in System Settings. Networking in general: the extension reaches internet hosts and the Mac itself by its local name. Only other hosts on the local network are blocked. Log The blocked notification arrives with bundle_id: (null). UserEventAgent then maps the extension to the app by its UUID, nehelper answers that local network is allowed by preference, and the handler is called with the newly allowed state. Later connections from the same process are still blocked, so that state never takes effect for the extension. 09:19:37.575 UserEventAgent Got local network blocked notification: pid: 4297, uuid: 183484C2-8052-36AD-A81E-B02F15F875B3, bundle_id: (null) 09:19:37.575 UserEventAgent LocalNetwork: found bundle id com.appliedphasor.secure-shellfish.mac-provider by PID 09:19:37.575 ShellFish-Finder [C1.1.1 IPv6#dace0833.22 failed path (unsatisfied (Local network prohibited), interface: en0[802.11], ipv4, ipv6, uses wifi)] 09:19:37.576 UserEventAgent LocalNetwork: found bundle id com.appliedphasor.secure-shellfish by UUID 183484C2-8052-36AD-A81E-B02F15F875B3 09:19:37.597 nehelper UUID cache hit for com.appliedphasor.secure-shellfish 09:19:37.597 nehelper Local network allowed by preference for ShellFish (com.appliedphasor.secure-shellfish) 09:19:37.597 UserEventAgent App got response: 1 09:19:37.597 UserEventAgent Calling handler with newly allowed state: 1 09:19:44.795 fileproviderd populate-directory error: FP -1004 "Unable to list p5.local: Unable To Connect To P5.Local: Network Is Down."Questions Is this a known change in macOS 27? FB24035385 (helper and child processes no longer inherit Local Network access on macOS 27) sounds related, and other File Provider apps report the same, for example nextcloud/desktop#10885: https://github.com/nextcloud/desktop/issues/10885 Does an extension need anything on macOS 27 to share its container's Local Network privilege, such as an entitlement, an Info.plist key, or something the app must do first? If not, is there a supported workaround? The only one we see is to relay the extension's traffic through the main app over loopback, which only works while the app is running. For these users Finder integration is completely broken, because servers on the local network (Raspberry Pi, NAS, home servers) are the most common setup among them. Any pointers are much appreciated.
Replies
2
Boosts
8
Views
407
Activity
2w
tvOS 14.6 fails trying to bind UDP/1900 (succeeds on tvOS Simulator)
I'm working on a tvOS app/library which uses SSDP. The code binds a UDP socket to port 1900 and joins a multicast group using BSD Socket library. I believe this used to work on a previous tvOS version, but specifically as of tvOS 14.6 there is a divergence between the tvOS Simulator and actual devices. Actual devices fail at the call to bind, with an Address Already in Use error. The tvOS simulator binds just fine after throwing up a macOS firewall 'allow incoming connections' dialog. Any ideas what the official situation is here? The com.apple.developer.networking.multicast entitlement seems to be iOS only at this time, is that correct? Also there seems to be no 'local networking' permission dialog in tvOS - is that also correct?
Replies
5
Boosts
0
Views
3.8k
Activity
3w
NWConnection/NWListener: .failed, .cancelled, and State Handler Semantics
Hi, I am using Apple's Network.framework APIs, specifically NWConnection and NWListener over UDP, in my project. Both APIs use state-update handlers, and I would like to clarify a few aspects of their lifecycle and callback-delivery semantics. Are .failed and .cancelled delivered only once during the lifecycle? For a given NWConnection or NWListener instance, my understanding is that .failed is a terminal state and the object does not recover from it. Is .failed guaranteed to be delivered at most once during the lifetime of an instance? If the object enters .failed, can I call cancel() on that same instance? If so, will the state-update handler subsequently receive .cancelled? Is .cancelled guaranteed to be delivered at most once per instance, even if cancel() is called multiple times? If the object is in the .waiting state and I call cancel(), causing it to transition to .cancelled, is it guaranteed that .failed will not subsequently be delivered for that instance? Since there is no transition from .cancelled -> .failed? What happens when stateUpdateHandler is replaced while callbacks are pending? Consider the following scenario: I create an NWConnection and assign a stateUpdateHandler (Handler A). The connection's state changes, and a callback for Handler A is enqueued on the connection's associated DispatchQueue. Before that queued callback executes, I replace stateUpdateHandler with Handler B. If the callback for Handler A was already enqueued before the handler was replaced, will Handler A still be invoked? My understanding is Yes, since it was already queued. If the object is in the .waiting state and I call cancel(), causing it to transition to .cancelled, is it guaranteed that .failed will not subsequently be delivered for that instance Can the same state notification be delivered to both Handler A and Handler B, or is it delivered to only one of them i.e., Handler A, since during the state-change Handler A was the one as stateUpdateHandler? Thanks!
Replies
3
Boosts
1
Views
498
Activity
3w
Is Data.withUnsafeMutableBytes(_:) safe to rely on long-term for C++ interop?
Hi, in our project we use Network.framework, with NWListener and NWConnection, to send and receive data over UDP. We use the receiveMessage(completion:) API, which delivers the data as a Data object. We assign this Data to a property of one of our classes, which we continue to work with after the completion handler returns. We pass that property's bytes to our C++ code (through Swift–C++ interop) using Data.withUnsafeMutableBytes(_:). The C++ code modifies the bytes in place, and we then continue working with the modified Data in Swift. Since nothing else refers to the Data we received, the bytes are modified in place and no copy is made. However, if another Data value shared the same buffer, just calling withUnsafeMutableBytes(_:) would create a copy, whether or not we actually modified the bytes. Our understanding is that this is because the method is declared mutating, so the call itself is treated as a write and copy-on-write makes the buffer unique before the pointer is handed out. We also understand that ResultType : ~Copyable (along with the typed throws(E)) only relaxes the requirements on the closure's return type and doesn't affect this behaviour. We understand this approach is unsafe and that the pointer "should not be stored and used outside of the lifetime of the call to the closure", so we will take care of that. Since the typed-pointer variants of APIs such as Data.withUnsafeBytes were deprecated in Swift 5, we would also like to confirm that withUnsafeMutableBytes(_:), the variant that takes an UnsafeMutableRawBufferPointer, is the intended long-term API and isn't expected to be deprecated in the same way.
Replies
5
Boosts
1
Views
408
Activity
3w
Crash in libquic.dylib | quic_recovery_pto | iOS 26.1
Hello, I am investigating a recurring crash that appears to be originating within the system's network stack. OS Version: iPhone OS 26.1 (23B85) Role: Foreground Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000000 Exception Codes: 0x0000000000000001, 0x0000000000000000 Triggered by Thread: 19 Description: The crash is triggered by Thread 19 and occurs deep within libquic.dylib during a QUIC recovery timer event. Based on the backtrace, the failure happens in quic_recovery_pto. The issue seems to occur when a protocol instance schedules a wakeup, leading to a null pointer dereference in the system library. Crashed Thread Backtrace snippet:Thread 19 Crashed: Thread 19 Crashed: 0 libquic.dylib 0x00000001a00a38cc quic_recovery_pto + 72 (quic_recovery.c:1259) 1 libquic.dylib 0x00000001a00a3390 quic_recovery_timer_fired + 132 (quic_recovery.c:1460) 2 libquic.dylib 0x00000001a00a1f8c quic_timer_run + 248 (quic_timer.c:210) 3 Network 0x000000018ec76cbc __nw_protocol_instance_schedule_wakeup_block_invoke + 76 (protocol_implementation.cpp:5847) 4 Network 0x000000018eba34e0 __nw_context_reset_timer_block_with_time_block_invoke + 268 (context.cpp:2224) 5 libdispatch.dylib 0x00000001c84727ec _dispatch_client_callout + 16 (client_callout.mm:85) 6 libdispatch.dylib 0x00000001c845d664 _dispatch_continuation_pop + 596 (queue.c:349) 7 libdispatch.dylib 0x00000001c8470528 _dispatch_source_latch_and_call + 396 (source.c:601) 8 libdispatch.dylib 0x00000001c846f1fc _dispatch_source_invoke + 844 (source.c:966) 9 libdispatch.dylib 0x00000001c8463288 _dispatch_workloop_invoke + 1612 (queue.c:4761) 10 libdispatch.dylib 0x00000001c846c3ec _dispatch_root_queue_drain_deferred_wlh + 292 (queue.c:7265) 11 libdispatch.dylib 0x00000001c846bce4 _dispatch_workloop_worker_thread + 692 (queue.c:6859) 12 libsystem_pthread.dylib 0x00000001ec0623b8 _pthread_wqthread + 292 (pthread.c:2696) 13 libsystem_pthread.dylib 0x00000001ec0618c0 start_wqthread + 8 (:-1) Can anyone provide insights into what might be causing libquic to access an invalid address in this context? Any help or suggestions for further diagnostics would be greatly appreciated.
Replies
3
Boosts
2
Views
947
Activity
3w