DeviceTokenNotForTopic error
通知のテストをする際、Amazon SNSからテストしている際、通知が送られてこなかった
CloudWatchに吐き出しているログを見たらこんな感じのエラーが
code:json
{
"notification": {
"messageMD5Sum": "xxxxx",
"messageId": "xxxxxxxx",
"timestamp": "2019-04-07 09:37:35.028"
},
"delivery": {
"deliveryId": "xxxxxx",
"destination": "xxxxxxx",
"providerResponse": "{\"reason\":\"DeviceTokenNotForTopic\"}",
"dwellTimeMs": 34,
"attempts": 1,
"token": "xxxxx",
"statusCode": 400
},
"status": "FAILURE"
}
原因
証明書を本番と同じbundle identifierで発行しており、実機デバッグでデバッグ用bundle identifierを使っていたために送信できなかった。