Skip to content

Commit

Permalink
Fix compile issue in Xcode 14 (Artificial-Pancreas#235)
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasStokholm authored and mountrcg committed Oct 7, 2023
1 parent 76b73e2 commit 62575b5
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions FreeAPS/Sources/Services/Calendar/CalendarManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,7 @@ final class BaseCalendarManager: CalendarManager, Injectable {
#if swift(>=5.9)
case .fullAccess:
promise(.success(true))
#endif

case .writeOnly:
#if swift(>=5.9)
case .writeOnly:
if #available(iOS 17.0, *) {
EKEventStore().requestFullAccessToEvents(completion: { (granted: Bool, error: Error?) -> Void in
if let error = error {
Expand All @@ -78,7 +75,7 @@ final class BaseCalendarManager: CalendarManager, Injectable {
promise(.success(granted))
})
}
#endif
#endif

@unknown default:
warning(.service, "Unknown calendar access status")
Expand Down

0 comments on commit 62575b5

Please sign in to comment.