ETENG-OSP / xgpush-cordova

腾讯信鸽推送 for Cordova
http://xg.qq.com/
MIT License
79 stars 38 forks source link

在ios上registerPush出现异常 #22

Open cnryb opened 8 years ago

cnryb commented 8 years ago

使用以下代码, 在ios9.x上,页面上显示 registerPush success null 在ios8.x上,页面上显示 registerPush oh no: null

    // 带设备别名注册
    xgpush.registerPush('android').then(function (results) {
        $("#msg").after('registerPush success ' + JSON.stringify(results));

    }).catch(function (errCode) {
        $("#msg").after('registerPush oh no: ' + errCode);
    });
JrontEnd commented 8 years ago

测试的时候应使用真机,信鸽上传证书要对应申请的推送证书

cnryb commented 8 years ago

我使用的是真机、ipad

JrontEnd commented 8 years ago

你是在device ready 之后调用的么?

cnryb commented 8 years ago

是在deviceready事件里面执行的,用的是生产环境证书

JrontEnd commented 8 years ago

只是在iOS8和9有问题,安卓有测过么?

cnryb commented 8 years ago

先测试的android,在android上没有问题,表现很好

JrontEnd commented 8 years ago

那么很有可能是你的推送证书出现了问题,建议你重新申请一个推送证书,上传到信鸽,再去试试

cnryb commented 8 years ago

好的,那我在弄个证书, 先试试看

cnryb commented 8 years ago

我重新弄了一个开发版的证书,结果这这个一样

JrontEnd commented 8 years ago

安装或者注册时,有什么相关的错误调试信息?

cnryb commented 8 years ago

在安装和注册时,没有遇见error。不知道你说的错误调试信息应该怎么搞到,求指导

JrontEnd commented 8 years ago

可以通过xcode连上真机,看调试信息

YangWenChaoTony commented 8 years ago

我和你一样的情况,最后怎么办的? @cnryb 这个怎么弄?@JrontEnd

cnryb commented 8 years ago

@YangWenChaoTony 我ios放弃使用信鸽了,azure的ios推送表现比较好。信鸽在android上表现比较好。目前我是这么设计的。

cnryb commented 8 years ago

@JrontEnd 前一阵子使用xcode调试,调试信息里面能够打印出来devicetoken,但是js的返回值还是空的

YangWenChaoTony commented 8 years ago

我和你一样,xcode调试能打印出token,js返回一直是空的