这可能是因为你的项目中添加了Firebase框架,但是模拟器上不支持Firebase的一些特性。解决这个问题的方法是:在你的Firebase控制台中,同步你的模拟器UDID并重新构建你的应用程序,并确保在模拟器上安装了最新版的Firebase框架。
代码示例:
[FIRApp configure];
#if TARGET_IPHONE_SIMULATOR
if ([[FIRApp defaultApp] options].APIKey.length == 0) {
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"GoogleService-Info" ofType:@"plist"];
FIROptions *options = [[FIROptions alloc] initWithContentsOfFile:filePath];
[FIRApp configureWithOptions:options];
}
#endif
pod update Firebase
上一篇:安装Firebase后,NativeScript模拟器只显示白屏。
下一篇:安装firebase库后出现“Undefined symbol: __isPlatformVersionAtLeast错误”的问题。