Ios Ionic FirebaseX getToken()不返回任何数据
我开始将Firebase云消息传递连接到Ionic+Angular,但当我调用methodIos Ionic FirebaseX getToken()不返回任何数据,ios,firebase,firebase-cloud-messaging,ionic4,cordova-plugin-firebasex,Ios,Firebase,Firebase Cloud Messaging,Ionic4,Cordova Plugin Firebasex,我开始将Firebase云消息传递连接到Ionic+Angular,但当我调用methodconst token=wait this.Firebase.getToken()时我什么都没有得到。应用程序继续工作,但我仍然没有得到令牌。完整代码: async getToken() { const hasPermission = await this.firebase.hasPermission(); if (Capacitor.getPlatform() === 'ios' &&am
const token=wait this.Firebase.getToken()时代码>我什么都没有得到。应用程序继续工作,但我仍然没有得到令牌。完整代码:
async getToken() {
const hasPermission = await this.firebase.hasPermission();
if (Capacitor.getPlatform() === 'ios' && !hasPermission) {
await this.firebase.grantPermission();
}
const token = await this.firebase.getToken();
this.saveToken(token);
}
我将GoogleService-Info.plist添加到我的应用程序根目录中:
此外,在我的firebase帐户中,我已经上传了我的APNs身份验证密钥,并在AppleDeveloper上创建了证书。在Apple、application和firebase中,应用程序标识符是相同的
我做错了什么?您是如何在项目中添加GoogleService-info.plist的?手动从文件系统复制粘贴?@PareshGami我从Firebase下载并粘贴到项目中