File tree 1 file changed +7
-3
lines changed 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -87,10 +87,14 @@ + (BOOL)setupOAuthHandler:(UIApplication *)application
87
87
88
88
[authPlatform setURLOpener: ^void (NSURL *URL, DCTAuthPlatformCompletion completion) {
89
89
// [sharedManager setPendingAuthentication:YES];
90
+ // We have to use this forked library until this is fixed.
91
+ // https://github.com/fullstackreact/react-native-oauth/pull/150/files
90
92
if ([SFSafariViewController class ] != nil ) {
91
- safariViewController = [[SFSafariViewController alloc ] initWithURL: URL];
92
- UIViewController *viewController = application.keyWindow .rootViewController ;
93
- [viewController presentViewController: safariViewController animated: YES completion: nil ];
93
+ dispatch_async (dispatch_get_main_queue (), ^{
94
+ safariViewController = [[SFSafariViewController alloc ] initWithURL: URL];
95
+ UIViewController *viewController = application.keyWindow .rootViewController ;
96
+ [viewController presentViewController: safariViewController animated: YES completion: nil ];
97
+ });
94
98
} else {
95
99
[application openURL: URL];
96
100
}
You can’t perform that action at this time.
0 commit comments