We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have been doing some work with this repo https://github.com/callstack/react-native-visionos
And wanted to contribute sharing what made it work for me following the instructions in this post
Here is the needed code for it to run appleAuth methods for react-native-visionos
Steps:
RNAppleAuthentication.podspec
s.platforms = { :ios => "9.0", :osx => "10.15", :visionos => "1.0" }
Run bundle install and then bundle exec pod install. Then run build on xcode you'll find some errors
To fix the errors, look for this file RNAppleAuthASAuthorizationDelegates.m Add these imports
RNAppleAuthASAuthorizationDelegates.m
#import <UIKit/UIKit.h> #import <AuthenticationServices/AuthenticationServices.h>
Find this if
#if TARGET_OS_OSX return [[NSApplication sharedApplication] keyWindow]; #else return [[UIApplication sharedApplication] keyWindow]; #endif
And change it for this
#if TARGET_OS_OSX return [[NSApplication sharedApplication] keyWindow]; #else #if TARGET_OS_VISION // visionOS UIWindow *window = nil; NSSet<UIScene *> *connectedScenes = [UIApplication sharedApplication].connectedScenes; for (UIScene *scene in connectedScenes) { if (scene.activationState == UISceneActivationStateForegroundActive && [scene isKindOfClass:[UIWindowScene class]]) { UIWindowScene *windowScene = (UIWindowScene *)scene; window = windowScene.windows.firstObject; break; } } return window; #else return [[UIApplication sharedApplication] keyWindow]; #endif #endif
The text was updated successfully, but these errors were encountered:
Happy to take a PR here if you want to make one? Seems very reasonable
Sorry, something went wrong.
Done in #352, thanks!
Successfully merging a pull request may close this issue.
I have been doing some work with this repo https://github.com/callstack/react-native-visionos
And wanted to contribute sharing what made it work for me following the instructions in this post
Here is the needed code for it to run appleAuth methods for react-native-visionos
Steps:
RNAppleAuthentication.podspec
Add visionos supports.platforms = { :ios => "9.0", :osx => "10.15", :visionos => "1.0" }
Run bundle install and then bundle exec pod install. Then run build on xcode you'll find some errors
To fix the errors, look for this file
RNAppleAuthASAuthorizationDelegates.m
Add these imports
Find this if
And change it for this
The text was updated successfully, but these errors were encountered: