0

我对使用 Arrow 的推送通知有疑问。

在开发模式下,一切都很好,注册发送正确,通知在 android 和 iO 上都很好接收。

在生产中,注册没有问题。每个设备都存储在 Arrow 中,我可以在我的帐户中看到它及其 device_token。

当我尝试向用户发送通知时,只有 Android 用户会收到通知。iOs 上什么都没有。我拿了一个 Apple Push Services 证书并将其转换为 P12 文件。

这是我的注册码:

var Cloud = require("ti.cloud");
 // Subscribes the device to the 'news_alerts' channel
 // Specify the push type as either 'android' for Android or 'ios' for iOS
    Cloud.PushNotifications.subscribeToken({
        device_token: deviceToken,
        channel: 'news_alerts',
        type: Ti.Platform.name == 'android' ? 'android' : 'ios'
    }, function (e) {
        if (e.success) {
            Ti.API.info('Subscribed');
        } else {
            Ti.API.info('Error:\n' + ((e.error && e.message) || JSON.stringify(e)));
        }
    });
}

订阅没问题,开发模式没问题,Android 生产也没问题……

任何想法 ?

谢谢 !

4

0 回答 0