Hi! When starting my app which is loading a Content Filter Network Extension I am getting the following error :
sysextd: <bundle_id> : extension failed category property check: extensions belonging to the com.apple.system_extension.endpoint_security category require a later version of operating system to launch
...
OSSystemExtensionRequest didFailWithError for <bundle_id> : The operation couldn’t be completed. (OSSystemExtensionErrorDomain error 9.)
This is happening on a VM running Sonoma 14.7.8. I upgraded the VM to the latest available OS and the system extension is loading just fine.
My question is : reading the documentation, I understand that the Network Extensions are supported starting with macOS 10.10+. Why is this not working on my Sonoma 14.7.8 VM?
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
Hi Team,
I have a Network Extension application and UI frontend for it.
The UI frontend talks to the Network Extension using XPC, as provided by NEMachServiceName.
On M2 machine,
The application and XPC connection works fine on clean installation.
But, when the application is upgraded, the XPC connection keeps failing.
Upgrade steps:
PreInstall script kills the running processes, both UI and Network Extension
Let installation continue
PostInstall script to launch the application after installation complete.
Following code is successful to the point of resume from UI application
NSXPCInterface *exportedInterface = [NSXPCInterface interfaceWithProtocol:@protocol(IPCUIObject)];
newConnection.exportedInterface = exportedInterface;
newConnection.exportedObject = delegate;
NSXPCInterface *remoteObjectInterface = [NSXPCInterface interfaceWithProtocol:@protocol(IPCExtObject)];
newConnection.remoteObjectInterface = remoteObjectInterface;
self.currentConnection = newConnection;
[newConnection resume];
But it fails to get the object
id<IPCExtObject> providerProxy = [self.currentConnection remoteObjectProxyWithErrorHandler:^(NSError *registerError) {
}];
Please note, this only fails for M2. For M1, this exact code is running fine.
Additionally, if I uninstall the application by dropping it in Trash and then installing the newer version, then too, the application works fine.
I am trying to activate an application which sends my serial number to a server. The send is being blocked. The app is signed but not sandboxed.
I am running Sequoia on a recent iMac. My network firewall is off and I do not have any third party virus software. I have selected Allow Applications from App Store & Known Developers.
My local network is wifi using the eero product. There is no firewall or virus scanning installed with this product.
Under what circumstances will Mac OS block outgoing internet connections from a non-sandboxed app? How else could the outgoing connection be blocked?
Topic:
App & System Services
SubTopic:
Networking
I’m working on an iOS parental-control app that needs to block specific network traffic (e.g. certain domains or URLs). We’ve already obtained the Family Controls entitlement (since our app is explicitly a parental-control solution), but we do not use MDM to supervise devices. In testing, our NEFilterDataProvider extension only activates when the device is enrolled under a managed Family Controls profile. I am aware that we can use a PacketTunnel to achieve this but i was wondering if there is any simpler solution to this?
Thanks for you time!
I have currently created an app which contains an upload button which when clicked upload health data using HealthKit to an AWS S3 bucket.
Now I want to implement an automatic file upload mechanism which would mean that the app is installed and opened just once - and then the upload must happen on a schedule (once daily) from the background without ever having to open the app again.
I've tried frameworks like NSURLSession and BackgroundTasks but nothing seems to work. Is this use case even possible to implement? Does iOS allow this?
The file is just a few KBs in size.
For reference, here is the Background Tasks code:
import UIKit
import BackgroundTasks
import HealthKit
class AppDelegate: NSObject, UIApplicationDelegate {
let backgroundTaskIdentifier = "com.yourapp.healthdata.upload"
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Register the background task
BGTaskScheduler.shared.register(forTaskWithIdentifier: backgroundTaskIdentifier, using: nil) { task in
self.handleHealthDataUpload(task: task as! BGAppRefreshTask)
}
// Schedule the first upload task
scheduleDailyUpload()
return true
}
// Schedule the background task for daily execution
func scheduleDailyUpload() {
print("[AppDelegate] Scheduling daily background task.")
let request = BGAppRefreshTaskRequest(identifier: backgroundTaskIdentifier)
request.earliestBeginDate = Date(timeIntervalSinceNow: 24*60*60)
do {
try BGTaskScheduler.shared.submit(request)
print("[AppDelegate] Daily background task scheduled.")
} catch {
print("[AppDelegate] Could not schedule daily background task: \(error.localizedDescription)")
}
}
// Handle the background task when it's triggered by the system
func handleHealthDataUpload(task: BGAppRefreshTask) {
print("[AppDelegate] Background task triggered.")
// Call your upload function with completion handler
HealthStoreManager.shared.fetchAndUploadHealthData { success in
if success {
print("[AppDelegate] Upload completed successfully.")
task.setTaskCompleted(success: true)
// Schedule the next day's upload after a successful upload
self.scheduleDailyUpload()
} else {
print("[AppDelegate] Upload failed.")
task.setTaskCompleted(success: false)
}
}
// Handle task expiration (e.g., if upload takes too long)
task.expirationHandler = {
print("[AppDelegate] Background task expired.")
task.setTaskCompleted(success: false)
}
}
}
Hi All,
I am currently working on a Network Extension App for MacOS using 3 types of extensions provided by Apple's Network Extension Framework.
Content Filter, App Proxy (Want to get/capture/log all HTTP/HTTPS traffic), DNS Proxy (Want to get/capture/log all DNS records).
Later parse into human readable format.
Is my selection of network extension types correct for the intended logs I need?
I am able to run with one extension:
Main App(Xcode Target1) <-> Content Filter Extension. Here there is a singleton class IPCConnection between App(ViewController.swift) which is working fine with NEMachServiceName from Info.plist of ContentFilter Extension(Xcode Target2)
However, when I add an App Proxy extension as a new Xcode Target3, I think the App and extension's communication getting messed up and App not getting started/Crashing. Here, In the same Main App, I am adding new separate IPCConnection for this extension.
Here is the project organization/folder structure.
MyNetworkExtension
├──MyNetworkExtension(Xcode Target1)
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── Info.plist
│ ├── MyNetworkExtension.entitlement
│ | ── Main
│ |-----ViewController.swift
│ └── Base.lproj
│ └── Main.storyboard
├── ContentFilterExtension(Xcode Target2)
│ ├── ContentFilterExtension.entitlement
│ │ ├── FilterDataProvider.swift
│ │ ├── Info.plist
│ │ ├── IPCConnection.swift
│ │ └── main.swift
├── AppProxyProviderExtension(Xcode Target3)
│ ├── AppProxyProviderExtension.entitlement
│ │ ├── AppProxyIPCConnection.swift
│ │ ├── AppProxyProvider.swift
│ │ ├── Info.plist
│ │ └── main.swift
└── Frameworks
├── libbsm.tbd
└── NetworkExtension.framework
Is my Approach for creating a single Network Extension App with Multiple extensions correct or is there any better approach of project organization that will make future modifications/working easier and makes the maintenance better?
I want to keep the logic for each extension separate while having the same, single Main App that manages everything(installing, activating, managing identifiers, extensions, etc).
What's the best approach to establish a Communication from MainApp to each extension separately, without affecting one another? Is it good idea to establish 3 separate IPC Connections(each is a singleton class) for each extension?
Are there any suggestions you can provide that relates to my use case of capturing all the network traffic logs(including HTTP/HTTPS, DNS Records, etc), especially on App to Extension Communication, where my app unable to keep multiple IPC Connections and maintain them separately?
I've been working on it for a while, and still unable to make the Network Extension App work with multiple extensions(each as a new Xcode target).
Main App with single extension is working fine, but if I add new extension, App getting crashed. I suspect it's due to XPC/IPC connection things!
I really appreciate any support on this either directly or by any suggestions/resources that will help me get better understand and make some progress.
Please reach out if in case any clarifications or specific information that's needed to better understand my questions.
Thank you very much
Topic:
App & System Services
SubTopic:
Networking
Tags:
Frameworks
Network Extension
System Extensions
Our company has a VPN client that uses the Packet Tunnel Provider network extension and when 18 came out we noticed that we were no longer seeing DNS requests get sent to the VPNs TUN interface.
Do a packet trace, once the VPN becomes active we see requests to _dns.resolver.arpa and 12-courier.push.apple.com, which both get resolved as expected. Also our main app that controls the VPN service and does authentication has to resolve a hostname to get to an authentication service and we see those requests just fine as well. However, when we try to resolve by going to a webpage in Safari we see no DNS request corresponding to that.
What are we missing? At first I thought it was the RFC9461 stuff but from the packet traces I don't believe that is the case.
I have also tried other networking tools to send the DNS requests and that failed as well.
We've received several reports of a new bug while setting up our products with WAC. The Accessory Setup UI appears with a blank network selected and the message 'This accessory will be set up to join "(null)".' at top. The user can tap "Show Other Networks..." to select another network, but this experience is very confusing. Why does this UI present a choice that is known to be invalid when other valid choices exist?
I've captured a screenshot and sysdiagnose from this case. In most cases this problem happens only intermittently, but I can reproduce it consistently by disconnecting my iPhone from any WiFi network (WiFi remains enabled).
My suggestion for a better user experience is that this UI should select the default network according to these rules:
The network to which iPhone is currently connected.
Any network which is in the known/my list for this iPhone
Any valid network
I believe rule #1 is the existing behavior, but applying rules #2 and #3 as fallbacks would be an improvement.
Is there anything I can change in my iOS code or in my accessory's WAC server to improve this experience?
I'm having a lot of trouble just getting a basic network extension startup, I have a main application that creates the configuration and requests the app extension based network extension to launch.
The network extension implements a NEPacketTunnelProvider and the application doesn't receive an error when starting the tunnel but when I inspect the networkextension system logs, I keep getting errors and the network extension itself doesn't appear to start nor does it log anything.
log stream --predicate 'subsystem == "com.apple.networkextension"'
neagent: (NetworkExtension) [com.apple.networkextension:] Extension request with extension $(BUNDLE_ID) started with identifier (null)
neagent: (NetworkExtension) [com.apple.networkextension:] Failed to start extension $(BUNDLE_ID): Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named $(BUNDLE_ID)" UserInfo={NSDebugDescription=connection to service named $(BUNDLE_ID)}
nesessionmanager: [com.apple.networkextension:] Validation failed - no audit tokens
nesessionmanager: [com.apple.networkextension:] NEVPNTunnelPlugin($(BUNDLE_ID)[inactive]): Validation of the extension failed
The network extension is written in Objective-C as it needs to integrate with another language. It's not entirely clear what kind of executable the network extension is meant to be, is it meant to have a main entrypoint, or is it supposed to be a shared library / bundle?
Hi, after upgrading to MacOS Sequoia, my connection to my local IP address does not work. The issue is with the PF (MacOS advanced firewall), as I confirmed that my local application works disabling it temporarily.
Does anyone know how can I do to solve this problem? As APP developer, this is a big problem for me.
Thanks in advance.
Feedback Ticket: FB13812251
Problem Statement: We are currently facing internet connectivity issue with our VPN application where we try to disconnect the VPN from the Packet Tunnel Network Extension using - (void)cancelTunnelWithError:(nullable NSError *)error. Which API to use to disconnect the VPN from Packet Tunnel as VPN app is not running such that device retains its internet connectivity as soon as VPN disconnects.
Configuration: We have configured PacketTunnelProvider with the following settings:
(NETunnelProviderManager *)tunnelProvider.protocolConfiguration.includeAllNetworks = YES;
(NETunnelProviderManager *)tunnelProvider.protocolConfiguration.excludeLocalNetworks = NO;
(NETunnelProviderManager *)tunnelProvider.protocolConfiguration.enforceRoutes = NO;
These settings are applied from the VPN app and allow us to successfully establish a VPN connection, with all traffic being routed through the tunnel as expected.We are setting above properties to address local net attack.
Issue we are facing:
However, we encounter a problem when we attempt to disconnect the VPN from. When we call the following method from PacketTunnel network extension:
(void)cancelTunnelWithError:(nullable NSError *)error
Upon calling this method, the VPN disconnects as expected, but the device loses all internet connectivity and is unable to access any resources. This is not the desired behavior.
Observation : Interestingly, when we call the following method from the app side. The VPN disconnects and the device retains its internet connectivity.
[enabledConfig.connection stopVPNTunnel];
We would like to achieve the same behavior when disconnecting the VPN from the Network Extension. So we are looking for an API that could be called from NE without causing any internet connectivity issue.
Any guidance on how to resolve this issue would be greatly appreciated.
I am trying to make http3 client with Network.framework on Apple platforms.
Codes that implement NWConnectionGroup.start with NWListener don't always work with warning below.
I assume NWConnectionGroup.newConnectionHandler or NWListener.newConnectionHandler will be called to start connection from the server if it works.
nw_protocol_instance_add_new_flow [C1.1.1:2] No listener registered, cannot accept new flow
quic_stream_add_new_flow [C1.1.1:2] [-fde1594b83caa9b7] failed to create new stream for received stream id 3
so I tried:
create the NWListener -> not work
check whether NWConnectionGroup has a member to register or not NWListener -> not work (it doesn't have).
use NWConnection instead of NWConnectionGroup -> not work
Is my understanding correct?
How should I do to set or associate listener with NWConnection/Group for newConnectionHandler is called and to delete wanings?
What is the best practice in the case?
Sample codes are below.
Thanks in advance.
// http3 needs unidirectional stream by the server and client.
// listener
private let _listener: NWListener
let option: NWProtocolQUIC.Options = .init(alpn:["h3"])
let param: NWParameters = .init(quic: option)
_listener = try! .init(using: param)
_listener.stateUpdateHandler = { state in
print("listener state: \(state)")
}
_listener.newConnectionHandler = { newConnection in
print("new connection added")
}
_listener.serviceRegistrationUpdateHandler = { registrationState in
print("connection registrationstate")
}
// create connection
private let _group: NWConnectionGroup
let options: NWProtocolQUIC.Options = .init(alpn: ["h3"])
options.direction = .unidirectional
options.isDatagram = false
options.maxDatagramFrameSize = 65535
sec_protocol_options_set_verify_block(options.securityProtocolOptions, {(_: sec_protocol_metadata_t, _: sec_trust_t, completion: @escaping sec_protocol_verify_complete_t) in
print("cert completion.")
completion(true)
}, .global())
let params: NWParameters = .init(quic: options)
let group: NWMultiplexGroup = .init(
to: .hostPort(host: NWEndpoint.Host("google.com"),
port: NWEndpoint.Port(String(443))!))
_group = .init(with: group, using: params)
_group.setReceiveHandler {message,content,isComplete in
print("receive: \(message)")
}
_group.newConnectionHandler = {newConnection in
print("newConnectionHandler: \(newConnection.state)")
}
_group.stateUpdateHandler = { state in
print("state: \(state)")
}
_group.start(queue: .global())
_listener.start(queue: .global())
if let conn = _group.extract() {
let data: Data = .init()
let _ = _group.reinsert(connection: conn)
conn.send(content: data, completion: .idempotent)
}
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
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?
send a request and it returns with timeout
Integration Team are Using Fortigate as a firewall and NGINX for some reasons
so we use VPN TO Access , requests always succeed but at once it failed with timeout in randomize request not specific one
we are using URLSession as a network layer
when I retry the same failed request again, it success
the request cannot connect apigee
Sec Team concern {
app session hits the security gateway with lots of SYN step to try to initiate a new session and doesn’t wait for (SYN-ACK / ACK) steps to happen to make sure the connection initiated correctly and gateway consider it flooding attack
}
Topic:
App & System Services
SubTopic:
Networking
Hi all,
We've been exploring the capabilities of the Network.framework for peer-to-peer communication and have run into some behavior that we haven't been able to fully explain with the existing documentation.
In our tests, we’re working with 12 iOS devices, all disconnected from Wi-Fi to force communication over Apple Wireless Direct Link (AWDL). While using the Network.framework to create peer-to-peer connections, we observed that the number of connected peers never exceeded 8, despite all 12 devices being active and configured identically.
Some questions we’re hoping to get clarification or discussion on:
Is there a known upper limit to the number of peer-to-peer connections supported via AWDL?
Are there conditions under which the framework or system limits or throttles visible peers?
Does AWDL behavior vary by hardware model, iOS version, or backgrounding state of the app?
Is there any official documentation or guidance around peer discovery or connection limits when using NWBrowser and NWConnection in a peer-to-peer context?
We’d appreciate any insights from the Apple engineering team or other developers who have worked with larger peer groups using Network.framework in peer-to-peer mode.
I had noticed that my slaac address changed between one beta and the other, but wasn't sure. Now with the RC 15.4 RC (24E247) I made point of preserving the info before updating from the previous beta.
What I noticed is that not only the slaac address changes, but also the my ether address, even though I have it on Fixed in the settings.
Is it expected that the ether, and the slaac, not be rotated after a OS update?
Topic:
App & System Services
SubTopic:
Networking
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.
Hello,
A quick background:
I am developing an App that receives a data stream from a device through its Wi-Fi network. The device itself is not connected to the internet, so the app won't be either.
Now, I am adding a new feature to the App that would require internet connection during the data stream. Consequently, my users would need to use their cellular data.
On later versions of iPhone, the phone would occasionally detect the lack of internet connection and asks the user via a pop-up if they want to use their cellular data. However, this behavior is not consistent.
So my question is- can we programmatically invoke this pop-up so the user can connect to the internet?
Or even better- can we program the App to use cellular data while still being connected to a Wi-Fi network?
Note:
I have seen mixed answers on the internet whether this is doable or not, and I know that users are able do it themselves by manually configuring their IP in their WiFi settings page, but I doubt this operation can be done through the App for security reasons.
Thanks!
In my application, there is a Network Extension with the bundle ID com.xxx.agent.yyy.zzz.ne. There is a user upgraded their system to macOS Sequoia 15.3, they faced an issue where enabling this Network Extension failed. Even after uninstalling the application and the Network Extension, restarting the system, and reinstalling multiple times, the enabling process still failed.
it alert: Failed to enable the Network Extension.
When checking the status via "systemextension list", it always shows "activated waiting for user".
This shows the normal enabling process log:
This shows the log when the enabling fails upon clicking. Strangely enough, there is no activation operation log when it fails. What could be the problem?