swift 极光推送
极光推送有两种形式:1、通知消息(在手机的通知栏能看见的); 2、推送消息;开发时要注意:后台发的的推送消息还是通知消息以便处理接收消息 一、注册 let entity = JPUSHRegisterEntity (); entity. types = Int ( JPAuthorizationOptions . alert . rawValue ) | Int ( JPAuthorizationOptions . badge . rawValue ) | Int ( JPAuthorizationOptions . sound . rawValue ); JPUSHService . register (forRemoteNotificationConfig: entity, delegate: self ); JPUSHService . setup (withOption: launchOptions, appKey: JPushAppKey , channel: JPushChannel , apsForProduction: JPushIsProduction); // 注册接收极光推送 NotificationCenter . default. addObserver ( self ,selector: #selector ( self