ios - 我从哪里获得 Urban Airship 注册 iOS 所需的设备 token ?

标签 ios mobile token

来自在线 API:

An HTTP PUT to /api/device_tokens/ registers a device token on our end. This lets us know that the device token is active, and should happen every time the application is opened to ensure that the list of device tokens remains up-to-date.

首先我该如何获取设备 token ?

最佳答案

我相信你需要看看here : 实现 application:didRegisterForRemoteNotificationsWithDeviceToken 方法来接收设备 token 。

编辑: Urban Airship 指南位于 http://urbanairship.com/docs/apns_test_client.html .

编辑:发送 APNS 消息的唯一方法是使用设备 token :您必须将设备 token 传回作为通知起始点的任何非 Apple 服务器。事务中有 3 个逻辑实体:设备、APNS 服务器(Apple 的后端)和原始服务器(在本例中为 Urban Airship 的服务器)。设备和 Apple 的后端已经拥有 token (或可以生成 token )。 Urban Airship 服务器仅在您从设备向其发送 token 时才会获取该 token 。然后它可以使用该 token 与 APNS 后端通信并识别设备。您要做的是使用 application:didRegisterForRemoteNotificationsWithDeviceToken 回调,然后(通过 HTTP,或您选择的任何其他有线协议(protocol))将该 token 发送到原始服务器(Urban Airship 文档向您展示了如何做与他们的图书馆)。他们的服务器现在可以使用该 token 与 APNS 后端通信。

关于ios - 我从哪里获得 Urban Airship 注册 iOS 所需的设备 token ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7586669/

相关文章:

ipad - iPad 3 可以模拟 iPad 2 进行应用测试吗?

android - 移动开发(Android & iOS)初学者需要指导

python - 尝试使用 Flask-Security 手动确认用户电子邮件时,确认 token 无效

ruby-on-rails - 如何以及为什么要在 Rails 应用程序中实现 Oauth?

ios - UIViewController 方法 viewDidLoad/viewWillHappen - View 帧大小检测

ios - Swift 中的 Google 日历 API

javascript - 启动应用程序时出现启动画面

authentication - 我如何在 Netbeans 12.0 中使用 Github token ?

ios - View Controller 进入 UITabBarController 后台的问题

iOS App Store 更新 - 打补丁?