Closed grey-dev-0 closed 3 years ago
Alright, the solution was pretty simple after some research in Apple's documentation, if you're going to use VoIP notifications with token-based authentication with their service i.e. using the p8 key file you'll need to append .voip
at the end of your bundle ID.
E.g. your bundle id is com.something.app
then you'll need to set it to com.something.app.voip
, and that's how it worked with me, I think this point needs to be emphasized in the documentation - if it's not already - and, thanks @edamov for this essential package.
Hello there, we're using your package with Laravel through the APN Laravel notification channel package, standard notifications work fine with a normal p8 key file, however when we try to push VoIP notifications with a pem certificate we get the following Error:
Unfortunately Apple does NOT provide anyway to generate p8 keys for VoIP notifications as of now, the error seems to be originating from the
web-token/jwt-key-mgmt
package you're relying on to generate the token, I was going to pass this issue to the maintainers of that package but, because this issue might be more related to how APN currently works I've posted it here.When debugging I've found out that in
KeyConverter
class of the mentionedjwt
package the following line returnsfalse
I tired to force pass the password as a second argument to the function but, with no avail, we also tried generating multiple pem certificates for VoIP and they all yielded the same error, we'll keep trying to resolve the issue, we appreciate your support with this problem, and if we managed to find a solution I'll post it here for anyone who might be facing the same dilemma.