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

MissingTopic #170

Open
noeurphireak opened this issue Feb 19, 2024 · 1 comment
Open

MissingTopic #170

noeurphireak opened this issue Feb 19, 2024 · 1 comment

Comments

@noeurphireak
Copy link

noeurphireak commented Feb 19, 2024

$push = new PushNotification('apn');
$apn = $push->setConfig(['topic' => 'com.example.walletapp.io']);

$response = $apn->setMessage(['aps' => []])
->setDevicesToken($device)
->send()
->getFeedback();

return response()->json($response);

The response
{
"success": false,
"error": "",
"results": [
{
"status": 400,
"headers": "HTTP/2 400 \r\napns-id: 9D3220FE-444B-633E-D1F1-5D0DCB4F537A",
"body": "{"reason":"MissingTopic"}",
"token": device_token_goes_here
}
]
}

did i miss any configurations for apn ?

@nerminator
Copy link

You can use headers under message for APN :

$push->setMessage([
'headers'=> [
'apns-topic' => 'com....' // your app's bundle id here
],
'aps' => [
...

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

2 participants