mirror of
https://github.com/jpush/jpush-phonegap-plugin.git
synced 2025-02-08 03:42:52 +08:00
iOS - update API
1.更新检查用户通知设置 API 的参数
This commit is contained in:
parent
0bb6838477
commit
f8c56b5aa1
@ -262,8 +262,9 @@ static NSDictionary *_launchOptions = nil;
|
|||||||
-(void)getUserNotificationSettings:(CDVInvokedUrlCommand*)command{
|
-(void)getUserNotificationSettings:(CDVInvokedUrlCommand*)command{
|
||||||
if ([[UIDevice currentDevice].systemVersion floatValue] >= 8.0) {
|
if ([[UIDevice currentDevice].systemVersion floatValue] >= 8.0) {
|
||||||
UIUserNotificationSettings *settings = [[UIApplication sharedApplication] currentUserNotificationSettings];
|
UIUserNotificationSettings *settings = [[UIApplication sharedApplication] currentUserNotificationSettings];
|
||||||
NSString *description = [settings description];
|
UIUserNotificationType type = settings.types;
|
||||||
[self handleResultWithValue:description command:command];
|
NSNumber *number = [NSNumber numberWithInteger:type];
|
||||||
|
[self handleResultWithValue:number command:command];
|
||||||
}else{
|
}else{
|
||||||
UIRemoteNotificationType type = [[UIApplication sharedApplication] enabledRemoteNotificationTypes];
|
UIRemoteNotificationType type = [[UIApplication sharedApplication] enabledRemoteNotificationTypes];
|
||||||
NSNumber *number = [NSNumber numberWithInteger:type];
|
NSNumber *number = [NSNumber numberWithInteger:type];
|
||||||
|
Loading…
Reference in New Issue
Block a user