我应该从Digits迁移到Firebase。在迁移过程中,我在实施过程中受到了打击。
来自以下地区的样本: https://github.com/firebase/FirebaseUI-iOS
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[FIRApp configure]; // This is causing the window and navigationController nil.
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.navigationController = [[UINavigationController alloc] initWithRootViewController:[[SplashScreen alloc] init]];
self.window.rootViewController = self.navigationController;
[self.navigationController.navigationBar setTranslucent:NO];
[self.window makeKeyAndVisible];
if(userLoggedIn()) {
self.root = [[RootViewController alloc] initWithNibName:nil bundle:nil];
self.navigationController = [[UINavigationController alloc] initWithRootViewController:self.root];
self.window.rootViewController = self.navigationController;
}
}
我在这里使用rootViewController是UIViewController,我有一个左菜单。
如果[FIRApp configure]
该应用不稳定。显示视图控制器后,在某种意义上不稳定,
(((AppDelegate *)UIApplication.sharedApplication.delegate).window)
值为零。如果我没有使用[FIRApp配置];那么价值就是一个。
任何人都可以提供解决方案的正确途径。由于它是FirebaseCore.framework,我无法继续前进。
任何人都可以就此提出您的建议。此外,我在验证电话号码时收到以下错误。
Error Domain=FIRAuthErrorDomain Code=17054 "If app delegate swizzling is disabled, remote notifications received by UIApplicationDelegate need to be forwarded to FIRAuth's canHandleNotificaton: method." UserInfo={NSLocalizedDescription=If app delegate swizzling is disabled, remote notifications received by UIApplicationDelegate need to be forwarded to FIRAuth's canHandleNotificaton: method., error_name=ERROR_NOTIFICATION_NOT_FORWARDED}