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

Add visionOS support #452

Merged
merged 4 commits into from
May 7, 2024
Merged

Add visionOS support #452

merged 4 commits into from
May 7, 2024

Conversation

bamx23
Copy link
Collaborator

@bamx23 bamx23 commented Nov 12, 2023

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.

@@ -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))
Copy link
Collaborator

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?

Copy link
Collaborator Author

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, *))
Copy link
Collaborator Author

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.

@bamx23 bamx23 changed the base branch from master to release-2.0 May 6, 2024 13:36
@bamx23 bamx23 force-pushed the visionos branch 8 times, most recently from 28f11a4 to 0d3128c Compare May 6, 2024 14:49
@GLinnik21 GLinnik21 linked an issue May 6, 2024 that may be closed by this pull request
@bamx23 bamx23 merged commit cc4eff4 into release-2.0 May 7, 2024
14 checks passed
@bamx23 bamx23 deleted the visionos branch May 9, 2024 21:04
@GLinnik21 GLinnik21 removed a link to an issue May 24, 2024
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

Successfully merging this pull request may close these issues.

2 participants