Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/116.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jquery-ui/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios Ionic FirebaseX getToken()不返回任何数据_Ios_Firebase_Firebase Cloud Messaging_Ionic4_Cordova Plugin Firebasex - Fatal编程技术网

Ios Ionic FirebaseX getToken()不返回任何数据

Ios 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

我开始将Firebase云消息传递连接到Ionic+Angular,但当我调用method
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下载并粘贴到项目中