小编Sup*_*j v的帖子

适用于iOS的亚马逊网络服务移动中心SNS推送

移动集线器 - >创建新应用程序 - >推送 - > ios - > p12文件上传 - >保存更改

当我点击保存更改下面的错误消息我得到

参数无效:属性原因:您提供了SANDBOX类型的证书,该证书不能用于创建iOS Production类型的应用程序.请选择SANDBOX类型的应用程序或提供iOS Production类型的证书(服务:AmazonSNS;状态代码:400;错误代码:InvalidParameter;请求ID:f5f810fd-7f8e-5462-9ff1-40f586dbe4ec)

我使用的是沙盒(dev)类型的证书而不是iOS生产.

amazon-web-services amazon-sns

10
推荐指数
1
解决办法
2964
查看次数

一信号推送通知

如何在节点js中创建推送通知时包含小图标和大图标url,我知道我们需要在发送推送通知时发送图像url,我需要节点js中的代码示例..我有这个代码..

sendNotificationToSpecific =function (token,messages) {
    var sendNotification = function (data) {
        var headers = {
            "Content-Type": "application/json; charset=utf-8",
            "Authorization": "Basic MDNlMTNjYWMTgy"
        };

        var options = {
            host: "onesignal.com",
            port: 443,
            path: "/api/v1/notifications",
            method: "POST",
            headers: headers
        };

        var https = require('https');
        var req = https.request(options, function (res) {
            res.on('data', function (data) {
                console.log("Response:");
                console.log(JSON.parse(data));
            });
        });

        req.on('error', function (e) {
            console.log("ERROR:");
            console.log(e);
        });

        req.write(JSON.stringify(data));
        req.end();
    };

    var message = {
        app_id: "awer342-d744-4787-b59a-f55c6215c491",
        contents: {"en": messages},
        include_player_ids: [token],
    };

    sendNotification(message);
};
Run Code Online (Sandbox Code Playgroud)

push-notification node.js onesignal

2
推荐指数
1
解决办法
5924
查看次数