Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error sending push notification to iOS device #341

Closed
jaisontj opened this issue Mar 2, 2018 · 6 comments
Closed

Error sending push notification to iOS device #341

jaisontj opened this issue Mar 2, 2018 · 6 comments

Comments

@jaisontj
Copy link

jaisontj commented Mar 2, 2018

Request:

POST /api/push

{
  "notifications": [
    {
      "tokens": ["asdc72e09d025bbbaae6fbe04b3eb5543efeec2f1a395282c4d23d98699"],
      "platform": 1,
      "message": "Hello World!"
    }
  ]
}

Response:

{
    "counts": 1,
    "logs": [
        {
            "type": "failed-push",
            "platform": "ios",
            "token": "369ce6c9c72e09d025bbbaae6fbe04b3eb5543efeec2f1a395282c4d23d98699",
            "message": "Hello World!",
            "error": "MissingTopic"
        },
        {
            "type": "failed-push",
            "platform": "ios",
            "token": "369ce6c9c72e09d025bbbaae6fbe04b3eb5543efeec2f1a395282c4d23d98699",
            "message": "Hello World!",
            "error": "MissingTopic"
        },
        {
            "type": "failed-push",
            "platform": "ios",
            "token": "369ce6c9c72e09d025bbbaae6fbe04b3eb5543efeec2f1a395282c4d23d98699",
            "message": "Hello World!",
            "error": "MissingTopic"
        },
        {
            "type": "failed-push",
            "platform": "ios",
            "token": "369ce6c9c72e09d025bbbaae6fbe04b3eb5543efeec2f1a395282c4d23d98699",
            "message": "Hello World!",
            "error": "MissingTopic"
        },
        {
            "type": "failed-push",
            "platform": "ios",
            "token": "369ce6c9c72e09d025bbbaae6fbe04b3eb5543efeec2f1a395282c4d23d98699",
            "message": "Hello World!",
            "error": "MissingTopic"
        },
        {
            "type": "failed-push",
            "platform": "ios",
            "token": "369ce6c9c72e09d025bbbaae6fbe04b3eb5543efeec2f1a395282c4d23d98699",
            "message": "Hello World!",
            "error": "MissingTopic"
        }
    ],
    "success": "ok"
}
@jaisontj
Copy link
Author

jaisontj commented Mar 2, 2018

I dont know what the "topic" here is supposed to be. Is this a bug or something that I am missing ?

@froodian
Copy link

froodian commented Mar 2, 2018

it's supposed to be your app's bundle id.

@jaisontj
Copy link
Author

jaisontj commented Mar 3, 2018

@froodian Hmm, then this appears to be a problem with my certificates yes ? Unless I am supposed to specify my ios app's bundle id somewhere in the gorush config.

@appleboy
Copy link
Owner

Can you help to try the following request?

{
  "notifications": [
    {
      "tokens": ["asdc72e09d025bbbaae6fbe04b3eb5543efeec2f1a395282c4d23d98699"],
      "platform": 1,
      "message": "Hello World!",
      "topic": "........"
    }
  ]
}

@appleboy
Copy link
Owner

See the reference: https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.html

@appleboy
Copy link
Owner

Please reopen the issue if you still have this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants