Apple Push Notification Регистрация и токен устройства Получите разъяснения?
Я работаю над приложением для iPhone с
Apple Push Notification интеграция. У меня есть некоторые сомнения по этому поводу.
If the user clicked "Dont Allow" button in the APNS registration alert, will our code still receives the Device Token from APNS?
I have tested that when the user switched off the notification in iPhone notification, still the app receives the Device Token from APNS? It is correct?
Может кто-нибудь прояснить эти сомнения?
Ответы на вопрос(2)
t depend on the user's action (as you mentioned that if when the user clicks on "Don't Allow" button) for your iOS to receive the Device Token.
If you included in your app:
This means that your iOS-based app is sending a request for Push Notification registration. In return, Apple sends the Device Token to the iOS; then the iOS sends the token to the app and then the app sends it to their service provider.
Note that when the user is asked "Don't Allow" doesn't mean that you're not going to receive the device token. "Don't Allow" refers to the action to be taken to any notification received by the app that is intended for the user. Say, location. This is a whole different thing. This means that the user doesn't allow the app to use his/her location.
Yes. it still receives the Device Token as what I have discussed in my answer to your question in #1. This is only a setting for your app, which means that you won't be receiving any visible notification (badge, message or a sound) whenever there are updates about any information in relevance to your application. It's like setting your Facebook account to only receive notifications when your friends sends you a private message. Other than that, you won't be notified at all.
The process of enabling APNS is:Request for certificate Authority Create app id Configuring AppId for Push Notifications Create provisioning profile Provisioning a device Enabling the profile in Xcode Creating push notification provider.
Для большего понимания APNS, проверьтеэтот из.
ios8.1.2. В настоящее время токен устройства будет сгенерирован только в двух случаях.Apple's default consent with "Ok" option After "Dont allow", manual change in Setting->Notifications->app->AllowNotification(On)
Отклонение в первый раз с согласия Apple не будет генерировать токен устройства, пока не будет вручную изменено значение на странице настроек.