IOS上的Phonegap Build Firebase推送通知不起作用(但在Android上起作用)
有人能帮我解决我的Phonegap混合应用程序的以下问题吗?我正在使用Phonegap构建来处理数据 我的ios设备不接收推送通知,但我的android设备接收推送通知。 我正在config.xml中使用以下数据:IOS上的Phonegap Build Firebase推送通知不起作用(但在Android上起作用),ios,push-notification,phonegap-build,phonegap,Ios,Push Notification,Phonegap Build,Phonegap,有人能帮我解决我的Phonegap混合应用程序的以下问题吗?我正在使用Phonegap构建来处理数据 我的ios设备不接收推送通知,但我的android设备接收推送通知。 我正在config.xml中使用以下数据: ... <preference name="phonegap-version" value="cli-9.0.0" /> <platform name="android"> <resource-file src="google-ser
...
<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: {}
}
);
我正在使用一个应用商店的产品供应,我正在通过Testflight测试这个应用
非常感谢。答案是确保使用正确的APN和配置文件。APN中未包含推送通知,配置文件必须用于“生产”而不是开发
我希望这对其他人有所帮助。当我直接通过Firebase云测试应用程序时,它会收到推送通知。它只是没有使用我自己的有效负载发送器代码(使用上面看到的有效负载)来接收它。