From f8c56b5aa19daf35cfe1563fcf9898d1aae7719b Mon Sep 17 00:00:00 2001 From: "E.B" <57380422@qq.com> Date: Tue, 12 Jul 2016 11:52:47 +0800 Subject: [PATCH] iOS - update API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1.更新检查用户通知设置 API 的参数 --- src/ios/Plugins/JPushPlugin.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ios/Plugins/JPushPlugin.m b/src/ios/Plugins/JPushPlugin.m index 9b65ffc..a16c07f 100644 --- a/src/ios/Plugins/JPushPlugin.m +++ b/src/ios/Plugins/JPushPlugin.m @@ -262,8 +262,9 @@ static NSDictionary *_launchOptions = nil; -(void)getUserNotificationSettings:(CDVInvokedUrlCommand*)command{ if ([[UIDevice currentDevice].systemVersion floatValue] >= 8.0) { UIUserNotificationSettings *settings = [[UIApplication sharedApplication] currentUserNotificationSettings]; - NSString *description = [settings description]; - [self handleResultWithValue:description command:command]; + UIUserNotificationType type = settings.types; + NSNumber *number = [NSNumber numberWithInteger:type]; + [self handleResultWithValue:number command:command]; }else{ UIRemoteNotificationType type = [[UIApplication sharedApplication] enabledRemoteNotificationTypes]; NSNumber *number = [NSNumber numberWithInteger:type];