在运行时注册设备 [英] register device at run time

查看:46
本文介绍了在运行时注册设备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  1. 在程序门户"的应用程序ID"部分中,找到要与Apple Push Notification服务一起使用的应用程序ID.仅具有特定捆绑软件ID的App ID可以与APN一起使用.您不能使用通配符"应用程序ID.您必须在Apple Push Notification服务列下看到可用",以注册此App ID并为此App ID配置证书.

  1. In the App ID section of the Program Portal, locate the App ID you wish to use with the Apple Push Notification service. Only App IDs with a specific bundle ID can be used with the APNs. You cannot use a "wild-card" application ID. You must see "Available" under the Apple Push Notification service column to register this App ID and configure a certificate for this App ID.

点击所需的应用ID旁边的配置"链接.

Click the ‘Configure’ link next to your desired App ID.

在配置应用程序ID"页面中,选中启用推送通知服务"框,然后单击配置"按钮.单击此按钮将启动APNs助手,该助手将指导您完成接下来的一系列步骤,以创建特定于App ID的客户端SSL证书.

In the Configure App ID page, check the Enable Push Notification Services box and click the Configure button. Clicking this button launches the APNs Assistant, which guides you through the next series of steps that create your App ID specific Client SSL certificate.

将客户端SSL证书文件下载到您的下载位置.导航到该位置,然后双击证书文件(具有cer的扩展名)以将其安装在钥匙串中.

Download the Client SSL certificate file to your download location. Navigate to that location and double-click the certificate file (which has an extension of cer) to install it in your keychain.

完成后,在APNS Assistant中单击完成".

When you are finished, click Done in the APNS Assistant.

双击文件将启动钥匙串访问".确保将证书安装在用于提供程序开发的计算机上的登录钥匙串中.APNs SSL证书应安装在通知服务器上.

Double-clicking the file launches Keychain Access. Make sure you install the certificate in your login keychain on the computer you are using for provider development. The APNs SSL certificate should be installed on your notification server.

完成这些步骤后,您将返回到iPhone Dev Center门户的Configure App ID页面.证书上应带有绿色圆圈,并标有已启用"标签.

When you finish these steps you are returned to the Configure App ID page of the iPhone Dev Center portal. The certificate should be badged with a green circle and the label "Enabled".

要完成APNs设置过程,您需要创建一个新的配置文件,其中包含启用了APNs的应用程序ID.

To complete the APNs set-up process, you will need to create a new provisioning profile containing your APNs-enabled App ID.

可以通过代码完成这些步骤.

IS it posssible to do theses steps through code.

推荐答案

否,这仅完成证书部分.您需要在应用中实现代码,还需要一台服务器(支持SSL).生成证书后需要执行的操作是注册设备以进行远程通知.您将在《远程通知指南》中找到如何执行此操作.您将获得设备令牌,将设备令牌发送到服务器,然后服务器会将设备令牌+消息(要在设备上显示)转发给APNS.APNS会将通知发送到设备.此外,您还需要在以下情况下显示证书将设备令牌从服务器发送到APN.请仔细阅读整个《远程通知指南》.

No, this completes only the certificate part. you need to implement code in your app and also you need a server(SSL supported).what you have to do after generating certificate is register your device for remote notification.you'll find that how to do this in Remote notification guide.then you'll get device token send the device token to your server and your server will forward the device token+message(you want to show on device) to APNS.APNS will send the notification to the device.also you need to show certificate when sending device token from your server to APNs.read the whole Remote Notifications Guide carefully.

这篇关于在运行时注册设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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