问题
I am trying to add APNS connection in Azure Notification Hub with Token as authentication mode.
I have searched around but I am not able to find any guides anywhere to make this work.
Maybe someone has a link to a guide showing how to find the information needed?
I tried to create a "APNs Auth Key" in Apple developer console, but that gives me a .p8 file and the token inside that file does not seem to be accepted, so I guess I need to find the token somewhere else.
I hope someone have a link to a guide for setting this up and find the information needed.
回答1:
Update (Apr 2018): @Krumelur reports in the comments that the blog article is out of date. Check out his suggestion on how to fix it to avoid getting errors.
Update (June 2017): There is now an official Microsoft post about Token-based (HTTP/2) Authentication for APNS.
Original answer (May 2017):
Token Based Authentication and HTTP/2 Example with APNS is a good step by step guide of how to get those values from your Apple Developer Account.
Key ID
in Azure Portal is whatAPNS_KEY_ID
is in the sample aboveApp Name
in Azure Portal is your app nameApp ID
in Azure Portal is whatTEAM_ID
is in the sample aboveToken
in Azure Portal is the contents of the file referred to inAPNS_AUTH_KEY
variable in the sample above
Do not forget to keep track which keys and tokens are sandbox and which are production endpoint ones.
回答2:
Looks like this is out of date. It is now looking for
Key ID Bundle ID Team ID Token
来源:https://stackoverflow.com/questions/43870529/how-to-configure-azure-notification-hub-to-use-apns-token-authentication-mode