-
-
Notifications
You must be signed in to change notification settings - Fork 643
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
feat: add visionOS support #2644
Conversation
|
||
@interface RCT_EXTERN_MODULE (RNIapIosSk2, NSObject) | ||
|
||
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(isAvailable){ | ||
if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"15.0")) { | ||
if (@available(iOS 15.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.
I've refactored this to use @available
the SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO
was returning "1.0" for visionOS and @available
is universal.
Source: https://roadfiresoftware.com/2014/01/the-right-way-to-check-the-ios-version-in-an-app/
a3429bb
to
d83dd79
Compare
d83dd79
to
d8638a4
Compare
Build is failing because CI needs a newer Xcode version |
@hyochan can @okwasniewski get some permissions to help work out the CI issue, so this PR can be made to pass CI? His similar visionOS work has been merged in gesture-handler, reanimated, screens, and numerous other projects. It would be great to get IAP support into a release of our react-native-visionos apps soon without the need for local patches :D |
4cffadb
to
e728c7e
Compare
Hey @hyochan, I've fixed the CI and the PR is now ready for review. Let me know if I can help you in any way to get this merged |
e728c7e
to
57d62f5
Compare
@TheRogue76 was there anything else needed for this to be merged? I'm excited to remove our local patch-package and let other RNV apps start to monetize :) |
I am not a maintainer of RN IAP, simply an open-source contributor who used this repo at one point and had it marked as watched. I just double-checked the PR. I do not have access to the repo to merge or block the PRs. As far as I see, the PR is perfectly fine. |
Could you kindly accept this review when you think this |
Approved on my side. As far as i can see, it looks good to me. Not sure if the comment was towards me or not but i figured a double check would not hurt.🙏 |
Thank you for taking an interest and reviewing this PR. Based on your involvement, I kindly request that you complete the review for this PR! |
This PR adds visionOS support.
I've refactored some parts of the code to take the currently presented scene by wrapping built-in utility
RCTKeyWindow()
to work in async scenarios.Testing
npx @callstack/react-native-visionos init App
Demo
CleanShot.2024-03-05.at.09.53.42.mp4