在ios上使用firebase时nativescript angular应用程序自动崩溃

在ios上使用firebase时nativescript angular应用程序自动崩溃,ios,nativescript-angular,nativescript-firebase,Ios,Nativescript Angular,Nativescript Firebase,我运行这个命令tnsrunios--device“iphone11” 得到 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 transfe

我运行这个命令
tnsrunios--device“iphone11”

得到

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

我的角码

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}`);
          }
        );
    }
}

我被卡住了,非常感谢您的帮助

您试过在XCode中运行它吗?如果出现无声崩溃,我会从XCode运行它,通常会在那里收到错误消息。@agritton您能描述一下如何做到这一点吗?请这不是从XCode打开位于platforms/ios文件夹中的.xcworkspace文件所必需的。然后您可以从XCode中单击run按钮。@agritton我稍后会测试,谢谢
  "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}`);
          }
        );
    }
}