Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS compatibility (17.4+) #9

Open
SystemKeeper opened this issue May 25, 2024 · 4 comments
Open

iOS compatibility (17.4+) #9

SystemKeeper opened this issue May 25, 2024 · 4 comments

Comments

@SystemKeeper
Copy link

It seems that XPC is available starting with iOS 17.4, according to https://developer.apple.com/documentation/xpc.
Would be nice if the library could be used with iOS as well.

@CharlesJS
Copy link
Owner

While the XPC framework itself is available to iOS in some capacity, large swaths of it are marked unavailable.

Can you give an example of a use case on iOS where you'd want to use XPC? Most of the examples I can think of wouldn't be allowed on iOS.

@SystemKeeper
Copy link
Author

Can you give an example of a use case on iOS where you'd want to use XPC? Most of the examples I can think of wouldn't be allowed on iOS.

I was thinking of using it to communicate between the main app and a BroadcastUploadExtension (to send the captured frames to the main app).
I haven’t looked into this in too much detail, but that was the first thing that came to my mind when I saw XPC support in 17.4.

@CharlesJS
Copy link
Owner

CharlesJS commented May 26, 2024

I just spent some time digging through the XPC headers to see if this had changed since the last time I looked at it, but it looks like of all the function and methods in service.h, connection.h, listener.h, and NSXPCConnection.h to actually create a listener connection, everything is still marked unavailable on iOS except for the APIs that create anonymous listeners. Anonymous listeners can be used to create an endpoint, and then a connection on the other side can be made from that endpoint, but since the only way I know of to send an endpoint is over an XPC connection, you have a chicken-and-egg problem. So unless Apple's extension API gives you some way to get at an XPC connection, I don't think there's actually a way to set it up (at least officially; I'm sure that all the mechanisms are still there, but being private API you probably wouldn't make it past App Store review if you used it).

If I'm missing something (and I'd love to be wrong on this), please let me know what you find and I'll take a look at it.

@SystemKeeper
Copy link
Author

Thank you for looking into this!
I also played around with the APIs and it seems that you're right here :-(. Looks like I got a bit too excited when I saw that iOS 17.4 added compatibility, but this seems rather useless at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants