trilemma-dev/SecureXPC

[help] How can I use FileHandle as argument of withMessageType

Closed this issue · 3 comments

I searched the code repository, and didn't find any code to handle this situation. Is there a Codable FileHandle example?

Thanks!

This is not currently supported. SecureXPC only supports types which can be (de)serialized, which is what Codable represents. File handles are inherently live references and therefore can't be serialized.

Note the underlying XPC framework does support sending file handles, but it's not supported by SecureXPC.

The 0.5.2 release now supports this via the new XPCFileDescriptorContainer.

Bravo! It works. Thank you!