简体   繁体   中英

What does “missing topic” error mean in APNS?

I have implemented APNS in my code, I am trying to test my app on ad-hoc distribution profile . Device is getting registered properly. But i am not getting any push notification on my device. And feedback shows 130 as response which means "missing topic." What does topic referes to? What is topic in my push notification ?

This seems to be covered in the Apple Guide on the subject:

The topic is currently the bundle identifier of the target application on an iOS device.

it solve,

now need to config topic, see request, for example: APNS MissingTopic is because you use first request, you should use second request, add a topic. it's OK

topic is your app's bundleID

  1. single topic's request:

     HEADERS - END_STREAM + END_HEADERS :method = POST :scheme = https :path = /3/device/00fc13adff785122b4ad28809a3420982341241421348097878e577c991de8f0 host = api.development.push.apple.com apns-id = eabeae54-14a8-11e5-b60b-1697f925ec7b apns-expiration = 0 apns-priority = 10 DATA + END_STREAM { "aps" : { "alert" : "Hello" } }
  2. multiple topic's request

    HEADERS - END_STREAM + END_HEADERS :method = POST :scheme = https :path = /3/device/00fc13adff785122b4ad28809a3420982341241421348097878e577c991de8f0 host = api.development.push.apple.com apns-id = eabeae54-14a8-11e5-b60b-1697f925ec7b apns-expiration = 0 apns-priority = 10 apns-topic = <MyAppTopic> DATA + END_STREAM { "aps" : { "alert" : "Hello" } }

New error table https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.html

400: MissingTopic: The apns-topic header of the request was not specified and was required. The apns-topic header is mandatory when the client is connected using a certificate that supports multiple topics.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM