-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[macOS] Enable Process support on MacCatalyst #61504
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Tagging subscribers to 'os-ios': @steveisok, @akoeplinger Issue DetailsSince the private Apple APIs are not available on iOS/tvOS (e.g. see #61265 (comment)), they are going to be excluded on those platforms but still may work on MacCatalyst.
|
Do we only want to throw PlatformNotSupportedException for private Apple APIs when App Sandbox is enabled? Does using the APIs when the sandbox isn't enabled throw errors? Is it clear yet what all the private APIs/system resources we would want to throw PlatformNotSupportedException when Sandbox is enabled? (are these the only ones? _proc_listallpids, _proc_pid_rusage, _proc_pidinfo, _proc_pidpath) |
If I'm not mistaken, that's mostly about Mac Catalyst so if one wants to publish catalyst app to App Store then they have to enable sandbox and must not use those private API. In this case we will throw PNSE.
Perhaps, this list is not full atm. Having done app sandbox detection, we can handle all such APIs one by one. |
Yes, this is correct. Some customers will use MacCatalyst as a desktop application and never publish to the AppStore. It would make sense for that group to not have the sandbox enabled and use the api's that would otherwise be restricted. |
Because it sounds like Sandbox contains damage, then should there be warnings if Sandbox is disabled and some private Apple APIs and system resources are accessed to let the customers know that it might affect their system? Is that something that should be from our end? |
I think it may depend on how we want to surface the PNSE. @rolfbjarne do you know if turning the sandbox on and off is a project setting? |
It's an entitlement that's configured per project, so yes, it's effectively a project setting. I have a few thoughts:
|
This is good to know because it makes one worry I had less important: if we detect sandbox at runtime then the private APIs will still be in the binary unless we teach linker to strip them out via some project setting (which is doable, but more work and has edge cases e.g. if the user wants to disable linker but still publish to App Store). |
@rolfbjarne I tested spawning processes from sandboxed apps this week and it seems to work just fine (e.g., I'm able to run |
If I understand the docs correctly, you should be able to run world readable binaries (+ anything that is bundled with the app) and it will run in the context of the app's sandbox with the same limitations: access to the network might be limited, it might be able to touch only certain external files, etc. |
IIRC @akoeplinger was the one who tested this some time ago |
TIL that to detect app sandbox at runtime you can just check if the |
For these API's, they should work near equivalent as they do on OSX. There may be small behavior differences when App Sandbox is enabled. We should determine where the spots are and account for them.
PNSE for Process on iOS / tvOS, but enabled for MacCatalyst.
@akoeplinger @steveisok
The text was updated successfully, but these errors were encountered: