【发布时间】:2019-01-08 22:29:40
【问题描述】:
我有一个 nativescript ios 应用程序在几天前运行良好...然后我将 xcode 版本升级到 10.1 并且应用程序停止运行...
现在我在 FIRApp 文件中的以下行 (322) 中获得 EXC_BAD_ACCESS
if ([firAnalyticsClass respondsToSelector:startWithConfigurationSelector])
我的应用中有 Firebase,之前它运行良好。
在我的 App_resoures/iOS 文件夹中,我有从 firebase 网站下载的 GoogleService-Info.plist。
在 app.components.ts 的 ngOnInit 函数中,我有以下代码:
firebase.init({
// Optionally pass in properties for database, authentication and cloud messaging,
// see their respective docs.
iOSEmulatorFlush: true // I found this as a solution but it's not working...
}).then(
() => {
console.log("firebase.init done");
},
(error) => {
console.log(`firebase.init error: ${error}`);
}
);
在 android 应用程序中,它就像一个魅力。
如果我从 Visual Studio Code 运行应用程序,我可以看到初始屏幕,然后应用程序在终端/控制台中关闭且没有任何错误。从 xCode 我得到我提到的错误,在控制台中我得到以下信息:
2019-01-08 19:22:26.600969-0300 gdp[53568:11407743] - <AppMeasurement>[I-ACS036002] Analytics screen reporting is enabled. Call +[FIRAnalytics setScreenName:setScreenClass:] to set the screen name or override the default screen class name. To disable screen reporting, set the flag FirebaseScreenReportingEnabled to NO (boolean) in the Info.plist
2019-01-08 19:22:27.141461-0300 gdp[53568:11406950] libMobileGestalt MobileGestalt.c:890: MGIsDeviceOneOfType is not supported on this platform.
(lldb)
firebase.nativescript.json
{
"external_push_client_only": false,
"using_ios": true,
"using_android": true,
"firestore": false,
"realtimedb": false,
"authentication": false,
"remote_config": true,
"performance_monitoring": true,
"messaging": false,
"crashlytics": true,
"crash_reporting": false,
"storage": false,
"functions": false,
"facebook_auth": false,
"google_auth": false,
"admob": false,
"invites": false,
"dynamic_links": false,
"ml_kit": false
}
部署目标
【问题讨论】:
-
在 Xcode 设置中寻找部署目标
-
您是否在
firebase.nativescript.json文件中启用了分析功能? -
@NarendraMongiya 我添加了来自 xCode 的屏幕截图。我尝试在图像中,也选择了 12.1,但结果是一样的
-
@Manoj 我添加了 firebase.nativescript.json 文件,该配置有什么问题吗?
-
你解决了吗?
标签: ios firebase nativescript angular2-nativescript