diff --git a/permission_handler_apple/CHANGELOG.md b/permission_handler_apple/CHANGELOG.md index 965522b5b..495783a7e 100644 --- a/permission_handler_apple/CHANGELOG.md +++ b/permission_handler_apple/CHANGELOG.md @@ -1,6 +1,7 @@ ## 9.4.4 -* Fixes typo in comment for full calendar access. +* Fixes potentially-nil return type of EventPermissionStrategy#getEntityType. +* * Fixes typo in comment for full calendar access. ## 9.4.3 diff --git a/permission_handler_apple/ios/Classes/strategies/EventPermissionStrategy.m b/permission_handler_apple/ios/Classes/strategies/EventPermissionStrategy.m index 80ac400ad..41baccbc0 100644 --- a/permission_handler_apple/ios/Classes/strategies/EventPermissionStrategy.m +++ b/permission_handler_apple/ios/Classes/strategies/EventPermissionStrategy.m @@ -133,13 +133,11 @@ + (PermissionStatus)permissionStatus:(PermissionGroup)permission { } + (EKEntityType)getEntityType:(PermissionGroup)permission { - if (permission == PermissionGroupCalendar || permission == PermissionGroupCalendarFullAccess || permission == PermissionGroupCalendarWriteOnly) { - return EKEntityTypeEvent; - } else if (permission == PermissionGroupReminders) { + if (permission == PermissionGroupReminders) { return EKEntityTypeReminder; } - return nil; + return EKEntityTypeEvent; } @end