一、推送證書(shū)的制作
①創(chuàng)建一個(gè)推送的APPID
1.選擇identifiers -> app ids

2.填寫(xiě)描述

3.Bundle ID(域名的反寫(xiě))

4.勾選"Push Notifications"

5.點(diǎn)擊上面的繼續(xù),可以看到下面的信息


6.成功創(chuàng)建APPID

②根據(jù)剛才新建的APPID ,制作APNS開(kāi)發(fā)環(huán)境證書(shū)
1.選擇certificates->development -> add新建

2.選擇

3.選擇APPID(自己新建的用于推送的APPID)

4.選取CSR上傳(具體百度一下)

5.開(kāi)發(fā)環(huán)境的推送證書(shū)制作完成

③、開(kāi)發(fā)環(huán)境描述文件的制作(根據(jù)推送的APPID)
1.還是『+』

2.選擇開(kāi)發(fā)環(huán)境

3.選擇APPID

4.選擇開(kāi)發(fā)者

5選擇需要安裝的設(shè)備

6.起個(gè)名字,制作完成


④、推送的.p12制作

選中上面的push service ,導(dǎo)出,把這個(gè).p12上傳到極光的服務(wù)器
二、極光推送的接入
附地址極光推送文檔
1.在- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions方法中注冊(cè)極光推送時(shí),
#if __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_7_1
if ([[UIDevice currentDevice].systemVersion floatValue] >= 8.0) {
[JPUSHService registerForRemoteNotificationTypes:UIUserNotificationTypeAlert | UIUserNotificationTypeBadge | UIUserNotificationTypeSound categories:nil];
}else{
[JPUSHService registerForRemoteNotificationTypes:UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound categories:nil];
}
#else
[JPUSHService registerForRemoteNotificationTypes:UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound categories:nil];
#endif
[JPUSHService setupWithOption:launchOptions appKey:BFY_JPush_APP_Key channel:BFY_JPush_Channle apsForProduction:NO];
這樣可以是iPhone4 7.1可以接受推送