IOS推送通知smartface 4.3注册和远程令牌

时间:2015-07-03 17:00:44

标签: ios notifications push smartface.io

我已将以下代码包含在smartface测试应用程序中并导出到Xcode也是模拟器,但它会提醒空结果并询问任何推送硝化的权限。

Notifications.remote.registerForPushNotifications({
    OnSuccess : function () {
        alert("Success");
    },
    OnFailure : function () {
        alert("Fail");
    }
});
alert(Notifications.remote.token);

似乎它无法正常推送通知。是否有更多设置来获取设备的访问令牌?并注册推送通知?

1 个答案:

答案 0 :(得分:2)

对于解析通知Notifications.remote.token是一项新功能,可为您提供deviceToken值。在下一个版本中,您将能够使用它。

但是对于GCM推送,它应该适用于发布。请注意,使用模拟器它不会起作用。 请确保您在项目详细信息中输入了发件人ID值。您可以在console.developers.google的“概述”部分中找到此值。它将作为项目编号。