trilemma-dev / SecureXPC

A simple and secure XPC framework for Swift
MIT License
72 stars 15 forks source link

Transfer MTLSharedTextureHandle #127

Open OskarGroth opened 1 year ago

OskarGroth commented 1 year ago

This library looks great, but I want to use it for sharing a MTLSharedTextureHandle. Unfortunately, this only seems possible to encode using a NSXPCCoder:

https://stackoverflow.com/questions/53286138/how-do-you-use-mtlsharedtexturehandle-or-mtlsharedeventhandle-with-the-c-xpc-int

This seems like a huge limitation. Is this library a no-go in this case?

jakaplan commented 1 year ago

Unfortunately you're correct that because this package is based on the C API it's a no-go.

If Apple in the future compatibility with the C API then I'll happily update this package. Overall I'm disappointed in the way they've split their capabilities especially because the C API is friendlier to use from Swift than the Objective-C one.