mirror of
https://github.com/jpush/jpush-phonegap-plugin.git
synced 2025-01-31 14:32:51 +08:00
fix document
This commit is contained in:
parent
b1e00baeb8
commit
9536989082
27
README.md
27
README.md
@ -52,11 +52,28 @@
|
||||
self.window.backgroundColor = [UIColor whiteColor];
|
||||
[self.window makeKeyAndVisible];
|
||||
// Required
|
||||
[APService registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge |
|
||||
UIRemoteNotificationTypeSound |
|
||||
UIRemoteNotificationTypeAlert)];
|
||||
// Required
|
||||
[APService setupWithOption:launchOptions];
|
||||
#if __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_7_1
|
||||
if ([[UIDevice currentDevice].systemVersion floatValue] >= 8.0) {
|
||||
//可以添加自定义categories
|
||||
[APService registerForRemoteNotificationTypes:(UIUserNotificationTypeBadge |
|
||||
UIUserNotificationTypeSound |
|
||||
UIUserNotificationTypeAlert)
|
||||
categories:nil];
|
||||
} else {
|
||||
//categories 必须为nil
|
||||
[APService registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge |
|
||||
UIRemoteNotificationTypeSound |
|
||||
UIRemoteNotificationTypeAlert)
|
||||
categories:nil];
|
||||
#else
|
||||
//categories 必须为nil
|
||||
[APService registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge |
|
||||
UIRemoteNotificationTypeSound |
|
||||
UIRemoteNotificationTypeAlert)
|
||||
categories:nil];
|
||||
#endif
|
||||
// Required
|
||||
[APService setupWithOption:launchOptions];
|
||||
return YES;
|
||||
}
|
||||
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
|
||||
|
Loading…
Reference in New Issue
Block a user