推送通知不适用于iOS

时间:2016-04-14 08:03:22

标签: ios apple-push-notifications appcelerator appcelerator-titanium appcelerator-arrow

我使用Arrow的推送通知存在问题。

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

在制作中,注册没问题。每个设备都存放在Arrow中,我可以在我的帐户中看到它的device_token。

当我尝试向用户发送通知时,只有Android用户会收到通知。 iOs没什么。我拿了Apple推送服务证书并将其转换为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就可以了......

有什么想法吗?

谢谢!

0 个答案:

没有答案
相关问题