java - 如何配置苹果推送通知?
问题描述
目前我已经根据 Certificate.P12 文件进行了编码。像这样:
PushNotificationPayload payload = PushNotificationBigPayload.complex();
payload.getMaximumPayloadSize();
payload.addAlert(data.getString("message"));
payload.addBadge(1);
payload.addSound("default");
payload.addCustomDictionary("data", data);
List<PushedNotification> NOTIFICATIONS = new ArrayList<PushedNotification>();
File file = new File(p12FilePath, "Certificates.p12");
NOTIFICATIONS.addAll(Push.payload(payload, file, "password", true, deviceList));
那么如何使用 P8 进行配置。证书文件。IOS 已提供,我有“KeyId”、“Bundle Id”、“Team ID”。那么我需要做哪些更改来配置 P8 证书文件?
解决方案
推荐阅读
- python - 检查列表中的项目是否存在于另一个列表中,然后写入 SQL 表
- powerbi - 具有最大值和最小值的逐行动态条件格式
- r - 多元分析,如何检验两个方程中某个参数是否不同?
- c - 使用 main 函数进行递归
- r - 强制字符变量长度相同
- mysql - 是否有任何插件/组件可以让我在启动时为 aerospike 填充数据,就像 liquibase 对 mysql 所做的那样?
- google-api - 从学生帐户获取教师信息时无法获取电子邮件地址(OAuth 范围为电子邮件开启)
- python - 如何实现这种EBNF语法(lookahead)?
- azure - Azure 中的负载平衡 - 子域和 SignalR
- vim - Vim:如何在多行中插入一定长度的 /