I have several processes built using the Objective-C/Swift XPC API (NSXPCConnection, et. al.). I have file descriptors that I need to share between these process. I can't find any high-level XPC methods for exchanging file descriptors.
The XPC C API has a several purpose-built functions for duplicating a file descriptor and exchanging them, but I can't seen to find any way of either (a) using the Obj-C API to exchange file descriptor or (b) using the high-level API to pass a low-level xpc_object_t.
I have several processes built using the Objective-C/Swift XPC API (NSXPCConnection, et. al.).
Yay!
I have file descriptors that I need to share between these process.
I believe you can do this via NSFileHandle. Notably, it conforms to NSSecureCoding.
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"