在Facebook或Google上登录后,在iOS中,当应用返回到前台时,整个屏幕为空白,并且仅显示一个小吃栏。
我正在使用react-native-fbsdk和react-native-googlesignin我的appDelegate.m看起来完全像fbsdk库中建议的那样,因此我怀疑这是一个问题。
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
NSURL *jsCodeLocation;
[GMSServices provideAPIKey:@"xxxxxxxxxxxxxxxx"];
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
self.window.backgroundColor = [UIColor whiteColor];
[[RCCManager sharedInstance] initBridgeWithBundleURL:jsCodeLocation launchOptions:launchOptions];
[[FBSDKApplicationDelegate sharedInstance] application:application
didFinishLaunchingWithOptions:launchOptions];
return YES;
}
- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
BOOL handled = [[FBSDKApplicationDelegate sharedInstance] application:application
openURL:url
sourceApplication:options[UIApplicationOpenURLOptionsSourceApplicationKey]
annotation:options[UIApplicationOpenURLOptionsAnnotationKey]
];
// Add any custom logic here.
return handled;
}
- (void)applicationDidBecomeActive:(UIApplication *)application {
[FBSDKAppEvents activateApp];
}
Navigation.startSingleScreenApp({
screen: {
screen: 'akun.Cover',
navigatorStyle: {
navBarHidden: true
}
},
drawer: {
right: {
screen: 'akun.Drawer',
passProps: {},
disableOpenGesture: false,
fixedWidth: 700
},
style: {
drawerShadow: false,
contentOverlayColor: 'rgba(0,0,0,0.25)',
leftDrawerWidth: 75,
rightDrawerWidth: 50
},
type: 'TheSideBar',
animationType: 'facebook',
disableOpenGesture: false
},
passProps: {},
animationType: 'fade'
})
return (error, result) => {
Snackbar.show({
title: t(this.props.language, 'completeSignUp'),
duration: Snackbar.LENGTH_SHORT
})
this.props.navigateTo({
screen: 'akun.Registro',
backButtonHidden: true,
animated: true,
passProps: {
provider,
user_id: this.state.user_id
},
animationType: 'slide-horizontal'
})
}