當寫Push的時候,必須有相應的證書。而證書的建立也是個知識點。今天以圖文的形式寫個相關的證書建立的流程。 生成對應的APP ID 和證書
一.新增App ID
1.進入蘋果開發中心的App Id
- 選擇
Cerfificates,Identifiers&Profiles
-->Identifiers
-->App IDs
- 點選右上角的
+
來新增證書。

2.註冊一個App ID
在這個頁面填寫和選擇相應的
- 在
App ID Description
-->name
輸入相應的App Name

- 在
App ID Suffix
-->Explicit App ID
-->Bundle ID
輸入相應的bundle id

- 在 App Services -->
Enable Services
選擇相應的服務。這裡選項Push Notifications
。點選continue
生成對應的app id

3. 確認App Id
,這個頁面不需要填選任何內容。檢查下即將建立的App ID的內容,是否正確。


點選Rigister
註冊。
4. 完成操作
點選Done
完成操作。這個時候App ID
就建立成功了。


生成APP ID 之後,再生成對應的證書,用於身份認證。
二. 進入蘋果開發中心的證書
1. 進入開發環境證書列表頁
- 選擇
Cerfificates,Identifiers&Profiles
-->Cerfificates
-->Development
- 點選右上角的
+
來新增證書。

2. 選擇證書型別
2.1. 因為是需要新增推送證書,選擇的證書了型別Apple Push Notification server SSL(SandBox)
。然後下一步


3. 提交點子資訊證書的請求
相應證書建立電子資訊證書步驟是提示,點選continue
.

4. 生成
選擇新增本地請求檔案。如何建立請求檔案,從下面的第三部分:建立電子資訊證書的步驟獲取。

5. 下載
證書已經生成成功,下載到本地。

6. 新增到鑰匙串
下載的檔案aps_development.cer
,雙擊這個檔案來安裝。安裝成功就會跳轉到鑰匙串的證書部分,表示安裝成功。

三. 電子證書請求檔案的建立。
- 在進入鑰匙串中

-
建立電子簽名請求
a.
鑰匙串訪問
-->證書助理
-->從證書頒發機構請求...



以上就是整個開發環境Push證書的建立過程。