0
的 '權限被拒絕狀態' 這段代碼是檢查UILocalNotification
權限檢查 '無法確定狀態' 和UILocalNotification
[[UIApplication sharedApplication] currentUserNotificationSettings];
而且
UIUserNotificationSettings *grantedSettings = [[UIApplication sharedApplication] currentUserNotificationSettings];
NSMutableDictionary *localNotificationPermissions = [[NSMutableDictionary alloc]init];
if (grantedSettings.types == UIUserNotificationTypeNone) {
NSLog(@"No Permission Granted");
} else {
NSLog(@"Permission Granted");
}
會告訴有關permission
但我不知道如何檢查not determine state
和permission denied state
,上面的代碼打印No Permission Granted
我兩種情況。