-
Notifications
You must be signed in to change notification settings - Fork 712
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
Add visionOS support #452
Add visionOS support #452
Conversation
@@ -38,7 +38,8 @@ | |||
#define KSCRASH_HOST_IOS (KSCRASH_HOST_APPLE && TARGET_OS_IOS) | |||
#define KSCRASH_HOST_TV (KSCRASH_HOST_APPLE && TARGET_OS_TV) | |||
#define KSCRASH_HOST_WATCH (KSCRASH_HOST_APPLE && TARGET_OS_WATCH) | |||
#define KSCRASH_HOST_MAC (KSCRASH_HOST_APPLE && TARGET_OS_MAC && !(TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_WATCH)) | |||
#define KSCRASH_HOST_VISION (KSCRASH_HOST_APPLE && TARGET_OS_VISION) | |||
#define KSCRASH_HOST_MAC (KSCRASH_HOST_APPLE && TARGET_OS_MAC && !(TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_WATCH || TARGET_OS_VISION)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about TARGET_OS_MACCATALYST
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question, but not related to this PR. Feel free to investigate
const NXArchInfo* archInfo = NXGetLocalArchInfo(); | ||
return archInfo == NULL ? NULL : archInfo->name; | ||
#if !KSCRASH_HOST_VISION | ||
if(__builtin_available(iOS 16.0, macOS 13.0, tvOS 16.0, watchOS 8.0, *)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
visionOS seems to not being supported in @available
and __builtin_available
. So for it I just use new API without any checks.
28f11a4
to
0d3128c
Compare
This is a quick itteration on visionOS support.
I've briefly checked that some of the crash types and looks like it works just fine.
So far CocoaPods doesn't fully support visionOS (e.g. CocoaPods/CocoaPods#12118), so keeping this as a PR.