是否可以像我们在移动应用程序中那样,在apple tv应用程序中使用pubnub发送推送通知。也浏览了pubnub文档,但没有找到任何具体的苹果电视实现。
任何建议都会有很大帮助。
最佳答案
pubnub-发送移动推送通知
您可以在任何平台发送移动推送消息。这只需要在发布的消息中包含适当的移动推送负载。这包括苹果电视应用程序。
对。在apple tv应用程序中可以使用pubnub发送推送通知。
组合APN和FCM/GCM推送通知
发送到apns和gcm移动服务的dictionary对象必须采用格式良好的格式,以便处理远程服务(由apple、google等操作)。
例如,当通过pubnub向苹果和谷歌发送本地APN和GCM警报时,可以采用以下格式发送:
{
"name" : "Fitchwitz Technology",
"pn_gcm": {
"data": {
"title_for_mobile": "Fitchwitz Technology",
"summary_for_mobile": [ "Fitchwitz antivirals... more info at http://FitchwitzTech.com/fooz" ]
}
},
"pn_apns" : {
"aps" : {
"alert" : "Fitchwitz Technology",
"badge": 2,
"summary_for_mobile": "Fitchwitz antivirals... more info at http://FitchwitzTech.com/fooz"
}
}
}
请查看文章Sending APNS and GCM Messages to Subscribers and Mobile Push Notification Services in One API Call,了解详细信息。
关于swift - Apple TV应用程序的PubNub推送通知,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/49467246/