nativescript角度应用在iOS上使用Firebase默默崩溃

问题描述

我运行此命令tns run ios --device "iPhone 11"

并获得

Webpack compilation complete. Watching for file changes.
Webpack build done!
Successfully transferred bundle.875fd225a41f2a304241.hot-update.js on device B6B5FD06-ACB6-4E36-9071-2B0BE89CCF64.
Successfully transferred 875fd225a41f2a304241.hot-update.json on device B6B5FD06-ACB6-4E36-9071-2B0BE89CCF64.
Successfully transferred bundle.js on device B6B5FD06-ACB6-4E36-9071-2B0BE89CCF64.
Successfully transferred runtime.js on device B6B5FD06-ACB6-4E36-9071-2B0BE89CCF64.
Successfully transferred inspector_modules.js on device B6B5FD06-ACB6-4E36-9071-2B0BE89CCF64.
Successfully transferred vendor.js on device B6B5FD06-ACB6-4E36-9071-2B0BE89CCF64.
Restarting application on device B6B5FD06-ACB6-4E36-9071-2B0BE89CCF64...
(RunningBoardServices) [com.apple.runningboard:connection] Identity resolved as application<org.nativescript.myapp>
(UserNotifications) [com.apple.UserNotifications:Connections] [org.nativescript.myapp] Creating a user notification center
CONSOLE INFO: HMR: Hot Module Replacement Enabled. Waiting for signal.
(RunningBoardServices) [com.apple.runningboard:connection] Identity resolved as application<org.nativescript.myapp>
(UserNotifications) [com.apple.UserNotifications:Connections] [org.nativescript.myapp] Creating a user notification center
CONSOLE INFO: HMR: Hot Module Replacement Enabled. Waiting for signal.
NativeScript debugger has opened inspector socket on port 18183 for org.nativescript.myapp.
Error: connect ECONNREFUSED 127.0.0.1:18183
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1144:16) {
  errno: -61,code: 'ECONNREFUSED',syscall: 'connect',address: '127.0.0.1',port: 18183
}
Successfully synced application org.nativescript.myapp on device B6B5FD06-ACB6-4E36-9071-2B0BE89CCF64

我的应用程序只是无提示地崩溃而没有错误消息,我得到的唯一一个是来自套接字的连接错误。在网上找不到任何有关它的信息。目前,我无法通过Firebase初始化来启动简单的hello world应用程序

我在跑步

nativescript version 7.0.10
XCode Version 12.0.1

  "dependencies": {
    "@angular/animations": "~10.1.0","@angular/common": "~10.1.0","@angular/compiler": "~10.1.0","@angular/core": "~10.1.0","@angular/forms": "~10.1.0","@angular/platform-browser": "~10.1.0","@angular/platform-browser-dynamic": "~10.1.0","@angular/router": "~10.1.0","@nativescript/angular": "~10.1.0","@nativescript/core": "~7.0.0","@nativescript/firebase": "^11.0.0","@nativescript/theme": "~2.3.0","reflect-Metadata": "~0.1.12","rxjs": "^6.6.0","zone.js": "~0.11.1"
  },"devDependencies": {
    "@angular/compiler-cli": "~10.1.0","@nativescript/ios": "7.0.3","@nativescript/types": "~7.0.0","@nativescript/webpack": "~3.0.0","@ngtools/webpack": "~10.1.0","typescript": "~3.9.0"
  },

我的角度代码

import { Component,OnInit } from "@angular/core";
import { firebase } from "@nativescript/firebase"; 

@Component({
    selector: "ns-app",templateUrl: "./app.component.html"
})
export class AppComponent implements OnInit{
    ngOnInit(){
        firebase.init({
          // Optionally pass in properties for database,authentication and cloud messaging,// see their respective docs.
        }).then(
          () => {
            console.log("firebase.init done");
          },error => {
            console.log(`firebase.init error: ${error}`);
          }
        );
    }
}

我被困住了,不胜感激

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...