Hi! Is there currently any public API for product engineers to query for Guest User mode?^1 Is there an API product engineers can query at runtime to determine if their app is running as a Guest User on visionOS?
I am not able to find any API that directly returns this information. But it does look some APIs can indirectly return this. HealthKit can condition some of its response values on Guest User mode.^2
It is possible that querying through HealthKit might be a workaround. But it would require asking for health data even in Vision Apps that do not really need health data. I would still be looking for something like a direct Guest User API if that was available. Thanks!
It took me a while — proving a negative is hard! — but I’ve confirmed that there’s no specific API to determine if you’re running as a guest user.
As you’ve found, there might be ways you can do this implicitly, but I’m not a fan of such techniques because such correlations can break down as the system evolves.
If this is something that your app would benefit from, I encourage you to file an enhancement request for such an API, making sure to describe why you need it, with a focus on the user-level benefit.
Please post your bug number, just for the record.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"