使用 FCM 向 Iphone 发送推送通知
sending push notification to Iphone using FCM
我正在尝试使用 FCM 向 iPhone 发送推送通知,但我的 phone 没有收到通知。请求 json 有什么问题吗?请帮我。
我的请求 json 是
{ "notification":{"aps": {"alert": "Hello","badge": 1,"sound ": "default "},"pushtype": "", "message": "Hello"} ,"to" : "c6IJyzv8LiY:APA91bHE1g-51dWnh_ofus0nUfVGwWQBV8zOp5fn9VcQe5GLL6gqLUCQQv1RUnYvQ0MP7Q5bKwgG1_8Uuudf67HV4hU1N-3U4u4uRVpdXw3QrivE8ONxjAAfcbn5cIUzu3B6FbHR8EkG"}
我的回复 json 是:
{\"multicast_id\":5810493506209108338,\"success\":1,\"failure\":0,\"canonical_ids\":0,\"results\":[{\"message_id\":\"0:1473238399084785%fc69f82ff9fd7ecd\"}]}
我已经解决了我的问题,正确的要求 json 是:
{
"notification ": {
"title": "some title",
"text": "some text"
},
"to": "XjV2kOqh1yXNkJsQop17RlwSwT4jZpuAu-...",
"priority": "high"
}
我正在尝试使用 FCM 向 iPhone 发送推送通知,但我的 phone 没有收到通知。请求 json 有什么问题吗?请帮我。 我的请求 json 是
{ "notification":{"aps": {"alert": "Hello","badge": 1,"sound ": "default "},"pushtype": "", "message": "Hello"} ,"to" : "c6IJyzv8LiY:APA91bHE1g-51dWnh_ofus0nUfVGwWQBV8zOp5fn9VcQe5GLL6gqLUCQQv1RUnYvQ0MP7Q5bKwgG1_8Uuudf67HV4hU1N-3U4u4uRVpdXw3QrivE8ONxjAAfcbn5cIUzu3B6FbHR8EkG"}
我的回复 json 是:
{\"multicast_id\":5810493506209108338,\"success\":1,\"failure\":0,\"canonical_ids\":0,\"results\":[{\"message_id\":\"0:1473238399084785%fc69f82ff9fd7ecd\"}]}
我已经解决了我的问题,正确的要求 json 是:
{
"notification ": {
"title": "some title",
"text": "some text"
},
"to": "XjV2kOqh1yXNkJsQop17RlwSwT4jZpuAu-...",
"priority": "high"
}