IOS 收不到通知


(诗人的眼泪) #1

接口调用成功,但是ios端通知栏不显示通知,也没有收到消息;我的消息体如下:

 "platform": [
    "ios"
  ],
  "audience": {
    "tag": [
      "userid=2000826262"
    ]
  },
  "notification": {
    "alert": "idifdsfdsfdsfdsfd",
    "android": {
      "alert": "idifdsfdsfdsfdsfd",
      "title": "idifdsfdsfdsfdsfd",
      "builder_id": 1,
      "extras": {
        "msgType": 0,
        "time": "2017-12-21 16:41:31",
        "imageUrl": "",
        "msgId": 16,
        "dict": {
          "type": 1,
          "title": "idifdsfdsfdsfdsfd",
          "url": ""
        }
      }
    },
    "ios": {
      "alert": "idifdsfdsfdsfdsfd",
      "extras": {
        "msgType": 0,
        "time": "2017-12-21 16:41:31",
        "imageUrl": "",
        "msgId": 16,
        "dict": {
          "type": 1,
          "title": "idifdsfdsfdsfdsfd",
          "url": ""
        }
      }
    },
    "winphone": {
      "alert": "idifdsfdsfdsfdsfd",
      "title": "idifdsfdsfdsfdsfd",
      "extras": {
        "msgType": 0,
        "time": "2017-12-21 16:41:31",
        "imageUrl": "",
        "msgId": 16,
        "dict": {
          "type": 1,
          "title": "idifdsfdsfdsfdsfd",
          "url": ""
        }
      }
    }
  },
  "message": {
    "msg_content": "121212",
    "title": "idifdsfdsfdsfdsfd",
    "extras": {
      "msgType": 0,
      "time": "2017-12-21 16:41:31",
      "imageUrl": "",
      "msgId": 16,
      "dict": {
        "type": 1,
        "title": "idifdsfdsfdsfdsfd",
        "url": ""
      }
    }
  },
  "options": {
    "sendno": 16,
    "time_to_live": 259200
  }
},
16:41:31.2431564 >INFO> 极光返回结果json: > {"sendno":"16","msg_id":"27021598069820518"},

#2

收不到消息的问题:请提供推送的消息的msgid(MessageID)和收不到这条消息的设备的registrationID(在客户端获取,无论以何种方式做推送,该信息必须提供)

为什么要求一定要提供 registrationID 给我,因为你很有可能别名下有很多个目标,别名设置失败,推送的AppKey和设备对应的AppKey不一致等等,只有通过registrationID才能确确实实的查询到具体的设备收不到的原因!

这两个信息如何获取: 极光产品相关提问简要说明


(诗人的眼泪) #3

reid:101d85590942a5dfcfd
msgid:27021598069820518


#4

环境不一致,你App是开发的

API推送消息给iOS,需要指定推送的环境!请让后台修改apns_production,false是开发,true是生产。

客户端的环境与证书有关!
关于测试两种环境的说明: 常见问题 - JPush 合集(持续更新)