iOS - update API

1.更新检查用户通知设置 API 的参数
This commit is contained in:
E.B 2016-07-12 11:52:47 +08:00
parent 0bb6838477
commit f8c56b5aa1

View File

@ -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];