苹果推送通知注册和放大器;设备令牌接收澄清? [英] Apple Push Notification Registration & Device Token Receive clarification?

查看:127
本文介绍了苹果推送通知注册和放大器;设备令牌接收澄清?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我工作的一个iPhone应用程序与苹果推送通知整合。我对此有些怀疑。


  1. 如果用户点击不要允许按钮,在注册APNS警报,将我们的code仍接收设备令牌从APNS?


  2. 我已经测试过,当用户在iPhone通知关闭通知,仍是从应用程序接收APNS设备令牌?这是正确的?


任何人都可以请你澄清这些疑虑?


解决方案

  1. 在我的理解APNS,它不依赖于用户的操作(如你所提到的,当用户点击,如果不允许按钮),为您的iOS接收设备令牌。

    如果您在您的应用程序包括:

       - (无效)应用:didRegisterForRemoteNotificationsWithDeviceToken

    这意味着你的基于iOS的应用程序发送推送通知登记的请求。作为回报,苹果向设备发送令牌到iOS的;那么iOS版发送令牌的应用程序,然后应用程序将其发送到他们的服务提供商。

    请注意,当用户被要求不允许并不意味着你不会接收设备令牌。 不允许,是指将采取的行动被认为是为用户的应用程序收到任何通知。再说,地理位置优越。这是一个完全不同的事情。这意味着用户不允许应用程序使用他/她的位置。


  2. 是的。它仍然会接收设备令牌正如我在我的答案#1讨论你的问题。
    这仅仅是你的应用程序,这意味着你不会收到任何通知可见(徽章,消息或声音)每当有关于关联到你的应用程序的任何信息更新的设置。这就像设置您的Facebook帐户,当你的朋友向你发送悄悄话只接收通知。除此之外,你会不会在所有通知。

    使APNS的过程是:


    1. 申请证书颁发机构

    2. 创建应用程序ID

    3. 配置的AppId推送通知

    4. 创建的provisioning profile

    5. 置备的设备

    6. 在X $ C $ç启用的配置文件

    7. 创建推送通知提供商。


有关APNS更多的了解,检查<一href=\"http://developer.apple.com/library/mac/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/ApplePushService/ApplePushService.html\"相对=nofollow>此内容出来。

I am working on an iPhone app with Apple Push Notification integration. I have some doubts on this.

  1. If the user clicked "Dont Allow" button in the APNS registration alert, will our code still receives the Device Token from APNS?

  2. 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?

Can anyone please clarify these doubts?

解决方案

  1. In my understanding on APNS, it doesn'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:

    - (void)application:didRegisterForRemoteNotificationsWithDeviceToken        
    

    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.

  2. 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:

    1. Request for certificate Authority
    2. Create app id
    3. Configuring AppId for Push Notifications
    4. Create provisioning profile
    5. Provisioning a device
    6. Enabling the profile in Xcode
    7. Creating push notification provider.

For more understanding on APNS, check this out.

这篇关于苹果推送通知注册和放大器;设备令牌接收澄清?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆