Hi,
I am trying to establish XPC connection on iOS in order to be able to share MTLSharedTextureHandle between two apps.
I understand that I would need to use anonynous service with XPC listener, and I am able to get its NSXPCConnectionEndpoint.
The question is how do I send the endpoint object to the other side? While NSXPCConnectionEndpoint seems to implement NSSecureCoding, it seems it would only accept NSXPCCoder and would NOT accept another type of coder like NSKeyedArchiver (e.g. to share the endpoint over persistent storage).
It seems to be the chicken and the egg problem, where I would need an existing XPC connection to pass NSXPCConnectionEndpoint object to the other side. But the only way to establish XPC connection is to use NSXPCConnectionEndpoint.
Any ideas who to make this work on iOS?
Thank you,
Leo
I am trying to establish XPC connection on iOS in order to be able to share MTLSharedTextureHandle between two apps.
I understand that I would need to use anonynous service with XPC listener, and I am able to get its NSXPCConnectionEndpoint.
The question is how do I send the endpoint object to the other side? While NSXPCConnectionEndpoint seems to implement NSSecureCoding, it seems it would only accept NSXPCCoder and would NOT accept another type of coder like NSKeyedArchiver (e.g. to share the endpoint over persistent storage).
It seems to be the chicken and the egg problem, where I would need an existing XPC connection to pass NSXPCConnectionEndpoint object to the other side. But the only way to establish XPC connection is to use NSXPCConnectionEndpoint.
Any ideas who to make this work on iOS?
Thank you,
Leo