ios9.2系统的6s可以获取到 token,iOS8.1的5s 却获取不到

941780
8年前 3.8k 0

极光推送,ios9.2的6s可以获取到 token,打印日志如下:

2016-03-09 10:41:44.627 BagSchool[3037:1112794] deviceToken  =====  <988f1eaa ff121746 b57e73ec e2b33efc aa6dbe0c e2dg3188 ed661aee c8e0ac93>
2016-03-09 10:41:44.631 | JPUSH | I - [JPUSHSessionController] sis is not on protect
2016-03-09 10:41:44.633 | JPUSH | I - [JPUSHAddressController] Action - sendSisRequest
2016-03-09 10:41:45.374 BagSchool[3037:1112794] 已与JPush建立连接
2016-03-09 10:41:46.996 BagSchool[3037:1112794] 已在JPush上注册成功
2016-03-09 10:41:47.421 BagSchool[3037:1112794] 已在JPush上登陆成功
2016-03-09 10:41:47.794 | JPUSH | I - [JPUSHDeviceTokenReport] upload device token success

但是在 ios8.1的5s 真机运行时获取不到 token。打印如下:

2016-03-09 10:51:17.820 | JPUSH | I - [JPUSHClientController] Action - setup
2016-03-09 10:51:18.201 BagSchool[440:68508] deviceToken : error === Error Domain=NSCocoaErrorDomain Code=3000 "未找到应用程序的“aps-environment”的授权字符串" UserInfo=0x17426e680 {NSLocalizedDescription=未找到应用程序的“aps-environment”的授权字符串}
2016-03-09 10:51:20.027 | JPUSH | W - [JPUSHClientController] Not get deviceToken yet. Maybe: your certificate not configured APNs? or current network is not so good so APNs registration failed?  or there is no APNs register code? Please refer to JPush docs.

2个回答

热门排序
  • 请在自己的项目里这样设置:
    provisioning profile文件需要包含正在调试的设备,并且provisioning profile文件要在app开启APNS之后生成。

  • Simon
    8年前
    你当前存在两个问题:1.Error Domain=NSCocoaErrorDomain Code=30002. Not get deviceToken yet. Maybe: your certificate not configured 展示全部