Jeepeng / react-native-xinge-push

信鸽推送React Native版,支持华为、小米、魅族官方推送通道
Apache License 2.0
78 stars 29 forks source link

注册问题 #4

Closed KevinWisbay closed 6 years ago

KevinWisbay commented 7 years ago

跑了示例代码,deviceToken的alert没有弹出来,应该没有成功注册信鸽,请问这是什么问题?

Jeepeng commented 7 years ago

1、accessIdaccessKey换成你自己的 2、ios模拟器是获取不到deviceToken的

KevinWisbay commented 7 years ago

首先非常感谢你的回复。 其次,我用的是iphone6s真机调试的。一打开的情况,如附件所示。 你的代码,我几乎没有动,改的参数如下: async initPush() { let accessId; let accessKey; if(Platform.OS === 'ios') { accessId = 2200265244; // 请将1111111111修改为APP的AccessId,10位数字 accessKey = "I8BMB45SG54E"; // 请将YOUR_ACCESS_KEY修改为APP的AccessKey } else { accessId = 2222222222; accessKey = "YOUR_ACCESS_KEY"; } // 初始化 XGPush.init(accessId, accessKey);

// 注册 XGPush.register('xinge') .then(result = alert(result)) .catch(err = { alert(err); }); } android没有动,是因为我就跑了ios的。我不太清楚是不是我的register上有错误?那个字符串应该填应用的名称。

恭顺安康 Jin Yu 金玉 苏州慧百软件有限公司 地址:苏州工业园区嘉瑞巷8号乐嘉大厦2819室 固定电话:0512-67903639 移动电话:186 6259 5515 e-Mail:jiny@wisbay.com.cn

原始邮件 发件人:Jeepengnotifications@github.com 收件人:Jeepeng/react-native-xinge-pushreact-native-xinge-push@noreply.github.com 抄送:KevinWisbayjiny@wisbay.com.cn; Authorauthor@noreply.github.com 发送时间:2017年8月17日(周四) 22:59 主题:Re: [Jeepeng/react-native-xinge-push] 注册问题 (#4)

1、accessId、accessKey换成你自己的 2、ios模拟器是获取不到deviceToken的 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.