Post

Replies

Boosts

Views

Activity

Installing Network Extension drops ongoing connections
Hey all! I have a System Extension that, while doing some other things, starts up my custom Network Extension via [NEProvider startSystemExtensionMode]. This Network Extension contains a class (let's call it MyDataProvider) that overrides the NEFilterDataProvider interface and implements handleNewFlow. MyDataProvider thus acts as a network content filter. The problem is that installing my System Extension on a Ventura 13.4 (or older) system and starting up the Network Extension seemingly drops any ongoing connection I have. For example, my ssh connection will hang. This makes it quite annoying attempting to install the System Extension remotely. I do not see this behavior for my other class that inherits the NEFilterPacketProvider interface. Is this behavior expected of the NEFilterDataProvider? It seems like a bug since I do not see any documentation stating this behavior.
0
0
768
May ’23
Allowing dynamic name registration in xpc_connection_create_mach_service
In the "Mach Services" section of the xpc_connection_create(3) man page, we have the following: Important: New service names may NOT be dynamically registered using xpc_connection_create_mach_service(). Only launchd jobs may listen on certain service names, and any service name that the job wishes to listen on must be declared in its launchd.plist(5). XPC may make allowances for dynamic name registration in debug scenarios, but these allowances abso- lutely will NOT be made in the production scenario. In a debugging scenario, how can I allow a dynamic name resolution for listeners? While the man page references this, it doesn't detail how to, and I can't find any information online about this. I can't tell if this text implies that it's currently possible, or may be allowed sometime in the future.
5
0
1.7k
Oct ’22
What is a Mach Service?
I've seen the term "Mach Service" used in many places. One such place being the man page for launchd.plist, another being xpc_connection_create_mach_service, yet I cannot find any documentation online explicitly defining what a Mach Service is. Closest thing I've found is the Mach Overview documentation, but that seems to be unrelated to "Mach Services" and closer to a more abstract umbrella term for a list of kernel primitives. So what is a Mach Service and what is the Mach bootstrap namespace? What functionality is it capable of? What is its purpose within an Application Bundle?
2
0
3.5k
Sep ’22
How do I utilize an older SDK on Xcode 13?
Whether through official or unofficial methods, what way can I build projects using an older SDK, say version 10.12, on Xcode 13? On Xcode 12, I was able to paste an older SDK into /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ However, that appears to have no affect on Xcode 13.
5
0
5.4k
Apr ’22
How do I get source code debugging in LLDB for System Extensions?
Following the instructions found here as well as around the Developer Forums, I've successfully managed to begin debugging my system extension on a virtual machine. Unfortunately, after archiving my system extension and copying over the .app file to my virtual machine, my .app loses access to the source code (on my host machine) and hitting any beak points via lldb yields me hard-to-read assembly code. How do I also get source code when attaching lldb to a system extension?
4
0
2k
Mar ’22
Installing Network Extension drops ongoing connections
Hey all! I have a System Extension that, while doing some other things, starts up my custom Network Extension via [NEProvider startSystemExtensionMode]. This Network Extension contains a class (let's call it MyDataProvider) that overrides the NEFilterDataProvider interface and implements handleNewFlow. MyDataProvider thus acts as a network content filter. The problem is that installing my System Extension on a Ventura 13.4 (or older) system and starting up the Network Extension seemingly drops any ongoing connection I have. For example, my ssh connection will hang. This makes it quite annoying attempting to install the System Extension remotely. I do not see this behavior for my other class that inherits the NEFilterPacketProvider interface. Is this behavior expected of the NEFilterDataProvider? It seems like a bug since I do not see any documentation stating this behavior.
Replies
0
Boosts
0
Views
768
Activity
May ’23
Allowing dynamic name registration in xpc_connection_create_mach_service
In the "Mach Services" section of the xpc_connection_create(3) man page, we have the following: Important: New service names may NOT be dynamically registered using xpc_connection_create_mach_service(). Only launchd jobs may listen on certain service names, and any service name that the job wishes to listen on must be declared in its launchd.plist(5). XPC may make allowances for dynamic name registration in debug scenarios, but these allowances abso- lutely will NOT be made in the production scenario. In a debugging scenario, how can I allow a dynamic name resolution for listeners? While the man page references this, it doesn't detail how to, and I can't find any information online about this. I can't tell if this text implies that it's currently possible, or may be allowed sometime in the future.
Replies
5
Boosts
0
Views
1.7k
Activity
Oct ’22
What is a Mach Service?
I've seen the term "Mach Service" used in many places. One such place being the man page for launchd.plist, another being xpc_connection_create_mach_service, yet I cannot find any documentation online explicitly defining what a Mach Service is. Closest thing I've found is the Mach Overview documentation, but that seems to be unrelated to "Mach Services" and closer to a more abstract umbrella term for a list of kernel primitives. So what is a Mach Service and what is the Mach bootstrap namespace? What functionality is it capable of? What is its purpose within an Application Bundle?
Replies
2
Boosts
0
Views
3.5k
Activity
Sep ’22
How do I utilize an older SDK on Xcode 13?
Whether through official or unofficial methods, what way can I build projects using an older SDK, say version 10.12, on Xcode 13? On Xcode 12, I was able to paste an older SDK into /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ However, that appears to have no affect on Xcode 13.
Replies
5
Boosts
0
Views
5.4k
Activity
Apr ’22
How do I get source code debugging in LLDB for System Extensions?
Following the instructions found here as well as around the Developer Forums, I've successfully managed to begin debugging my system extension on a virtual machine. Unfortunately, after archiving my system extension and copying over the .app file to my virtual machine, my .app loses access to the source code (on my host machine) and hitting any beak points via lldb yields me hard-to-read assembly code. How do I also get source code when attaching lldb to a system extension?
Replies
4
Boosts
0
Views
2k
Activity
Mar ’22