IOS 上的 Phonegap Build Firebase 推送通知不起作用(但在 Android 上起作用)

Phonegap Build Firebase push notification on IOS not working (but working on Android)

谁能帮我解决我的 Phonegap 混合应用程序的以下问题?我正在使用 Phonegap Build 来处理数据。

我的 ios 设备没有收到推送通知,但我的 android 设备可以。 我在 config.xml:

中使用以下数据
 ...
 <preference name="phonegap-version" value="cli-9.0.0" />  
 <platform name="android">
     <resource-file src="google-services.json" target="app/google-services.json" />
 </platform>
 <platform name="ios">
     <resource-file src="GoogleService-Info.plist" />    
 </platform>
 <plugin name="phonegap-plugin-push" spec="2.1.3">
     <variable name="SENDER_ID" value="xxxxxxxxxxxxx" />
 </plugin>    
 ..

我的负载看起来像这样...

  $data = [
         "title"             =>$titlenotification,  
         "message"           => $message,
         "content_available" => "1",
  ];

  $fields =  [
        'registration_ids'   => $registrationtokens,          
        'data'               => $data,                         
        "priority"           => "high",
        "content_available"  => true,
  ];

...我在应用程序中的推送初始化如下所示...

   var push = PushNotification.init({
        android: {
          senderID: senderId,  
          iconColor: "#d4edda",
          alert: true,
          badge: true,
          icon: 'notification_icon',
          sound: true,
          vibrate: true,
        },
        browser: {},
        ios: {
          senderID: senderId,  
          sound: true,
          vibration: true,
          badge: true
        },
        windows: {}
      }
  );

我正在使用 App Store Production 条款并通过 Testflight 测试应用。

非常感谢。

答案是确保使用正确的 APN 和配置文件。推送通知未包含在 APN 中,配置文件必须用于 "prodduction" 而不是开发。

希望对其他人有所帮助。