1、打開推送
在打開的方法里寫入一下代碼:
// 打開推送
[JPUSHService registerForRemoteNotificationTypes:(UIUserNotificationTypeBadge | UIUserNotificationTypeSound | UIUserNotificationTypeAlert) categories:nil];
2鲸匿、關(guān)閉推送
在關(guān)閉的方法里寫入一下代碼:
// 關(guān)閉推送
[[UIApplication sharedApplication] unregisterForRemoteNotifications];