mirror of
https://github.com/jpush/jpush-phonegap-plugin.git
synced 2025-02-12 14:22: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.backgroundColor = [UIColor whiteColor];
|
||||||
[self.window makeKeyAndVisible];
|
[self.window makeKeyAndVisible];
|
||||||
// Required
|
// Required
|
||||||
[APService registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge |
|
#if __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_7_1
|
||||||
UIRemoteNotificationTypeSound |
|
if ([[UIDevice currentDevice].systemVersion floatValue] >= 8.0) {
|
||||||
UIRemoteNotificationTypeAlert)];
|
//可以添加自定义categories
|
||||||
// Required
|
[APService registerForRemoteNotificationTypes:(UIUserNotificationTypeBadge |
|
||||||
[APService setupWithOption:launchOptions];
|
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;
|
return YES;
|
||||||
}
|
}
|
||||||
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
|
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
|
||||||
|
Loading…
Reference in New Issue
Block a user