如何解决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 举报,一经查实,本站将立刻删除。