What does "missing topic" error mean in APNS?

15,853

Solution 1

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.

Solution 2

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" } }
    
Share:
15,853
Baby Groot
Author by

Baby Groot

(づ°‿°.)づ

Updated on June 03, 2022

Comments

  • Baby Groot
    Baby Groot about 2 years

    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?

  • Baby Groot
    Baby Groot over 11 years
    that we need to set in entitlement.plist or where? cos everything was working fine on development profile. Or it's error while creating ck.pem for distribution profile?
  • therealprashant
    therealprashant over 7 years
    the link is dead
  • Sazzad Hissain Khan
    Sazzad Hissain Khan over 4 years
    What they meant by - END_STREAM , + END_STREAM etc.?
  • Schemetrical
    Schemetrical about 4 years
    @therealprashant I have fixed the link with the equivalent link in the new documentation format. "In general, the topic is your app’s bundle ID, but it may have a suffix based on the push notification’s type."
  • JN01
    JN01 almost 3 years
    That text is now: The topic for the notification. In general, the topic is your app’s bundle ID/app ID. So I suppose Bundle ID still works.