Skip to content

Commit

Permalink
Fixed state request.
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanvorobei committed Oct 2, 2023
1 parent be120aa commit a548063
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion PermissionsKit.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = "PermissionsKit"
s.version = "9.2.1"
s.version = "9.2.2"
s.summary = "Ask permissions with ready-use interface. You can check status permission and if it has been requested before. Support SwiftUI."
s.homepage = "https://github.com/sparrowcode/PermissionsKit"
s.source = { :git => "https://github.com/sparrowcode/PermissionsKit.git", :tag => s.version }
Expand Down
3 changes: 3 additions & 0 deletions Sources/CalendarPermission/CalendarPermission.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ public class CalendarPermission: Permission {
}

public override var status: Permission.Status {
// Fix when status first time response with other state.
let _ = EKEventStore.authorizationStatus(for: EKEntityType.event)

switch EKEventStore.authorizationStatus(for: EKEntityType.event) {
case .authorized: return .authorized
case .denied: return .denied
Expand Down

0 comments on commit a548063

Please sign in to comment.