General:
DevForums 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 DevForums 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
Extra-ordinary Networking DevForums post
Foundation networking:
DevForums tags: Foundation, CFNetwork
URL Loading System documentation — NSURLSession, or URLSession in Swift, is the recommended API for HTTP[S] on Apple platforms.
Network framework:
DevForums tag: Network
Network framework documentation — Network framework is the recommended API for TCP, UDP, and QUIC on Apple platforms.
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 DevForums post
Network Extension (including Wi-Fi on iOS):
See Network Extension Resources
Wi-Fi Fundamentals
TN3111 iOS Wi-Fi API overview
Wi-Fi Aware framework documentation
Wi-Fi on macOS:
DevForums tag: Core WLAN
Core WLAN framework documentation
Wi-Fi Fundamentals
Secure networking:
DevForums tags: Security
Apple Platform Security support document
Preventing Insecure Network Connections documentation — This is all about App Transport Security (ATS).
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.
Technote 2232 HTTPS Server Trust Evaluation
Technote 2326 Creating Certificates for TLS Testing
QA1948 HTTPS and Test Servers
Miscellaneous:
More network-related DevForums tags: 5G, QUIC, Bonjour
On FTP DevForums post
Using the Multicast Networking Additional Capability DevForums post
Investigating Network Latency Problems DevForums post
WirelessInsights framework documentation
iOS Network Signal Strength
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
Networking
RSS for tagExplore the networking protocols and technologies used by the device to connect to Wi-Fi networks, Bluetooth devices, and cellular data services.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
The Wi‑Fi Alliance’s Wi‑Fi Aware data communication uses IPv6.
However, in Chapter 53 “Wi‑Fi Aware” of the Accessory Design Guidelines for Apple Devices, Release R26, it is stated that “The Neighbor Discovery Protocol (NDP) for IPv6 address resolution is not supported.”
This has caused confusion among developers: Does Apple’s Wi‑Fi Aware data communication actually use IPv6?
What is the impact of “The Neighbor Discovery Protocol (NDP) for IPv6 address resolution is not supported” in Apple’s implementation?
I have a question. I work for a mobile operator, and when you insert the SIM, the default APN is automatically configured. However, afterward, using the internal Device Manager platform, we send the corresponding APN of an MVNO to that MSISDN. However, the iPhone device (any model, recent iOS versions) receives the notification of the APN change, but it doesn't reflect the change in the APN settings menu. Do you know how we could make the iPhone device reflect the APN change?
We currently supporting proxy app with Tunnel.appEx and PacketTunnelProvider.
Some users report about constant error "The VPN session failed because an internal error occurred." on VPN start (which fails rapidly).
This error occur mostly after user updated app with active VPN.
Rebooting device solves the problem and it doesnt come again, but it is still very frustrating.
I can provide any required info about app setup to solve this issue if you need. Thanks
Hello everyone,
Last year I built an application for tvOS and iPadOS that enables device-to-device communication. I based it on Apple’s sample code, available here:
https://developer.apple.com/documentation/Network/building-a-custom-peer-to-peer-protocol
At that time, everything worked flawlessly. However, this year I had to revisit the project to add new features, and now it no longer works as expected. The first time the app runs it connects fine, but if we relaunch it (on either the iPad, the Apple TV, or both), the connection fails.
Most importantly, this is not an issue with my own code — I tested it directly with the original Apple sample code, and the exact same problem occurs there too.
Here’s what I see in the logs:
nw_endpoint_flow_setup_channel [C1 TicTacToe,65E91B02-890E-4D30-88B8-CE2AB9677BF9 in_progress channel-flow (satisfied (Path is satisfied), viable, interface: utun0, scoped, ipv6)] nexus assignment error Connection refused
nw_endpoint_flow_failed_with_error [C1 TicTacToe,65E91B02-890E-4D30-88B8-CE2AB9677BF9 in_progress channel-flow (satisfied (Path is satisfied), viable, interface: utun0, scoped, ipv6)] already failing, returning
code-block
This happens right after I select the iPad from the device list and try to connect.
What’s strange is that the interface being used is utun0. I don’t have a VPN or iCloud Private Relay enabled. I also tried running the app through the iPad’s personal hotspot, but I get the same error. The only workaround I’ve found so far is to restart the Apple TV.
Has anyone else run into this problem? Is there any known solution or workaround?
Tested on tvOS 18.6 and iPadOS 18.3.2 / 18.6.
In Low Power Mode or after the iPhone has been idle, On-Demand rules fire and StartTunnel runs. Subsequent calls to createTCPConnectionThroughTunnel intermittently fail with an error. Is NetworkExtension known to behave differently under Low Power Mode that might cause this?
But the NMI and NDI of Samsung's Wi Fi Aware are not the same MAC address. May I ask Apple engineers why they are different from Samsung?
我的完整报错信息:
Task <0568A3A0-A40C-42A8-9491-2FC52D71EFFF>.<4> finished with error [-1009] Error Domain=NSURLErrorDomain Code=-1009 "似乎已断开与互联网的连接。" UserInfo={_kCFStreamErrorCodeKey=50, NSUnderlyingError=0x107db5590 {Error Domain=kCFErrorDomainCFNetwork Code=-1009 "(null)" UserInfo={_kCFStreamErrorDomainKey=1, _kCFStreamErrorCodeKey=50, _NSURLErrorNWResolutionReportKey=Resolved 0 endpoints in 1ms using unknown from cache, _NSURLErrorNWPathKey=unsatisfied (Denied over Wi-Fi interface), interface: en0[802.11], ipv4, dns, uses wifi}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <0568A3A0-A40C-42A8-9491-2FC52D71EFFF>.<4>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalDataTask <0568A3A0-A40C-42A8-9491-2FC52D71EFFF>.<4>"
), NSLocalizedDescription=似乎已断开与互联网的连接。, NSErrorFailingURLStringKey=https://sharkserver.dypc.top/shark_user/login, NSErrorFailingURLKey=https://sharkserver.dypc.top/shark_user/login, _kCFStreamErrorDomainKey=1}
请求失败:似乎已断开与互联网的连接。
以下是问题的具体描述
我的A手机(15pro max 版本18,6,1) 使用xcode直接在A手机上运行我的程序 尝试发起post请求的时候得到了该报错。
我做了以下尝试
1.检查了A手机网络,一切正常,浏览器和其他app均可正常访问网络
2.检查了A手机上我的app权限,确认我因为为我的程序打开了无线网络和蜂窝流量
3.重启A手机,还原A手机网络设置,还原A手机所有设置,重启mac电脑
以上做法均无效,依旧报上面的错误
4.然后我尝试使用B手机(iPhone13 版本18.5)安装该程序 ,B手机可以正常运行并成功发起post请求,证明我的代码没有问题
5.我将代码上传至testfight 然后使用A手机下载testfight里的该程序 ,程序可以成功发起post请求没有任何错误,我再次使用xcode运行该程序到真机,又得到了Code=-1009错误 无法发起post请求
Our goal is to establish a Wi‑Fi Aware data path (NDP) between Apple and Android devices.
Apple will act as the Publisher, and Android will act as the Subscriber.
Apple-to-Android pairing has already been completed.
The Android device can be normally displayed on the Apple official Wi-Fi Aware Sample. However, the indicator is not green.
During pairing, the Apple log shows: state: authenticated, and the Android side triggers the callback onPairingSetupSucceeded.
During pairing verification, the Apple log shows: state: authenticated, and the Android side triggers the callback onPairingVerificationSucceed.
The Android side sends an NDP request to Apple (as shown in the figure 1), but Apple does not reply.
Note: Qualcomm’s NDI and NMI are different.
In addition, after Apple-to-Apple pairing is completed, the paired device will be recorded in “Settings → Privacy & Security → Paired Devices”.
However, after Android-to-Apple pairing is completed, the device is not saved to this list.
My iPhone model: iPhone 13, iOS 26.0 (23A5287g).
After Apple-to-Apple pairing is completed, the paired device will be recorded in “Settings → Privacy & Security → Paired Devices”.
However, after Android-to-Apple pairing is completed, the device is not saved to this list.
Android device can be normally displayed on the Apple official Wi-Fi Aware Sample. However, the indicator is not green.
During pairing, the Apple log shows: state: authenticated, and the Android side triggers the callback onPairingSetupSucceeded.
During pairing verification, the Apple log shows: state: authenticated, and the Android side triggers the callback onPairingVerificationSucceed.
My iPhone is iPhone 13, iOS 26.0 (23A5287g)
I cannot find in the documentation and samples how exactly the Bloom filter is generated.
Is there any code sample for that?
Apple is encouraging VPN apps on macOS to transition to Network Extension APIs, if they haven't done so yet, see:
TN3165: Packet Filter is not API
WWDC25: Filter and tunnel network traffic with NetworkExtension
Using Network Extension is fine for VPN apps that are distributed via the Mac App Store. Users get one pop-up requesting permission to add VPN configurations and that's it.
However, VPN apps that are distributed outside of the App Store (using Developer ID) cannot use Network Extension in the same way, such apps need to install a System Extension first (see TN3134: Network Extension provider deployment).
Installing a System Extension is a very poor user experience. There is a pop-up informing about a system extension, which the user has to manually enable. The main button is "OK", which only dismisses the pop-up and in such case there is little chance that the user will be able to find the correct place to enable the extension. The other button in that pop-up navigates to the correct screen in System Settings, where the user has to enable a toggle. Then there is a password prompt. Then the user has to close the System Settings and return to the app.
This whole dance is not necessary for VPN apps on the Mac App Store, because they work with "app extensions" rather than "system extensions".
As a developer of a VPN app that is distributed outside of the App Store, my options are:
Implement VPN functionality in an alternative way, without Network Extension. This is discouraged by Apple.
Use a System Extension with Network Extension. This is going to discourage my users.
I have submitted feedback to Apple: FB19631390.
But I wonder, why did Apple create this difference in the first place? Is there a chance that they will either improve the System Extension installation process or even allow "app extensions" outside of the Mac App Store?
Topic:
App & System Services
SubTopic:
Networking
Tags:
Extensions
Network Extension
System Extensions
Developer ID
I filed FB19631435 about this just now. Basically: starting with 15.6, we've had reports (internally and outternally) that after some period of time, networking fails so badly that it can't even acquire a DHCP lease, and the system needs to be rebooted to fix this. The systems in question all have at least 2 VPN applications installed; ours is a transparent proxy provider, and the affected system also had Crowdstrike's Falcon installed. A customer system reported seemingly identical failures on their systems; they don't have Crowdstrike, but they do have Cyberhaven's.
Has anyone else seen somethng like this? Since it seems to involve three different networking extensions, I'm assuming it's due to an interaction between them, not a bug in any individual one. But what do I know? 😄
This is a major issue. After my iPhone 12 Pro was upgraded to iOS 26 beta 6, Apple's official Wi-Fi Aware Sample APP crashed immediately and couldn't be opened. It just force closes.
Has any developer encountered this problem?
Hello there, I am trying to add Nearby Interaction into my project, but it is not appear into +capabilities.
I have already go to my account into developer account platform to try to add it from Identifiers:
Then I search into my project to activated, but Nearby Interaction was not show:
So, there is anything else that i have miss?
please help :c
Hello, I am new to App development, so I am looking for some advice.
I want to develop an app for iPhone, which downloads files (pdf, jpg)from a server to the local storage. I also want to get data from the server to be used in my app. This could be a database access or just simple xml files. I
want a secure access based on userid and password.
Since in a later version, my app should also run on Android Phones, I am reluctant to use iCloud.
I was thinking sftp, but that does not seem to be supported for iOS.
We have an application which is written in Swift, which activates Transparent Proxy network extension.
Our Transparent Proxy module is a system extension, which is exposing an app proxy provider interface (We are using NETransparentProxyProvider class and in extension’s Info.plist we use com.apple.networkextension.app-proxy key.)
We are using JAMF MDM profile for installing our transparent proxy in customer environment. We are using VPN payload(https://developer.apple.com/documentation/devicemanagement/vpn) for this network system extension.
This payload does not have any field for order.
As per https://developer.apple.com/documentation/devicemanagement/vpn/transparentproxy-data.dictionary documentation there is another payload for TransparentProxy and we could create a Transparent Proxy profile using iMazingProfile Editor.
Noticed that, if we add the Order attribute to the VPN/TransparentProxy payload, while installing the extension, the save to preferences fails with "Error in saving TP configuration in updateOnDemandRule permission denied" error.
Can we use this Order field to ordering the installed Transparent Proxy extension in a machine?
Customer devices will likely have other Transparent Proxy network extensions as well. We want to allow the Customer to control the order in which each Transparent Proxy network extension receives the network traffic.
How can we set the order of the Transparent proxy extension that can be deployed using MDM profile with VPN/TransparentProxy payload?
Attached the TransparentProxy payload profile for the reference.
DGWebProxy_TransparentProxy_iMazing
Topic:
App & System Services
SubTopic:
Networking
Tags:
Network Extension
System Extensions
Device Management
Hello,
I am currently investigating if we can disable usage of QUIC on application level.
I know we can set enable_quic from /Library/Preferences/com.apple.networkd.plist to false but it will have a global impact since this is a system file, all the applications on machine will stop using QUIC. I don't want that. What i am looking for is to disable QUIC only for my application.
Is there any way i can modify URLSession object in my application and disable QUIC? or modify URLSessionConfiguration so system will not use QUIC?
I'm trying to distribute a sandboxed macOS app with a PacketTunnelProvider (system extension) via direct distribution (outside of AppStore).
The app and the extension both use the same app group, using the new group.com.XXXX.YYYY format detailed here for 10.15+
https://developer.apple.com/forums/thread/721701
I've also followed the instructions below to get around the quirk of not being able to directly process it via XCode:
https://developer.apple.com/forums/thread/737894
I've re-signed with Developer ID certificate, all that is smooth and successfully notarized.
However upon running the app I get:
"My.app" would like to access data from other apps.
Checking
~/Library/Containers
~/Library/Group Containers
I see the correct files folders have been created before I select Don't Allow and Allow.
My app does not access any files or folders outside of the sandboxed directories.
How can I prevent this from happening?
In order to diagnose further, how to diagnose exactly which files/folder the app is trying to access that is causing this problem?
Topic:
App & System Services
SubTopic:
Networking
Tags:
Network Extension
System Extensions
App Sandbox
Developer ID
Hello,
We're exploring the new URL Filter capability and we managed change the SimpleURLFilter so that it could work on macOS.
However, on macOS it won't work as even when signed for debugging it tries to use Apple's OHTTP Relay.
Failed to fetch Token Issuer Directory. <NSHTTPURLResponse: 0xca10ca580> { URL: https://gateway.icloud.com/pat-issuer-directory?issuer=localhost } { Status Code: 503
So I have two questions:
Will it be possible to debug URL Filter locally on macOS?
Even more important: how can I send a capability request so that our OHTTP Gateway could be used? I checked everywhere, but it seems there's simply no way to request this capability at this moment.