I have a watch app that is supposed to access the calendar and display information about the event and then count down until that event. But ever since the IOS 17.0.0 and watchOS 14.0.0, the old method of requesting access does not work (though it still works with the reminders).
I tried to add a new authorization method that fits with the later version.
static func requestAccess() {
let eventStore = EKEventStore()
let todayDate : Date = Date()
let status = EKEventStore.authorizationStatus(for: .event)
if status == .authorized {
print("Access is already granted.")
} else {
print(status.rawValue)
eventStore.requestFullAccessToEvents { success, error in
if success && error == nil {
print("Access has been granted.")
} else {
print(error ?? "unknown error")
print("Access request failed with error: \(error?.localizedDescription ?? "Unknown error")")
}
}
}
}
NSCalendarsWriteOnlyAccessUsageDescriptionHowever, even though I have both the NSCalendarWriteOnlyAccessDescription, adn the older NSCalendarUsageDescription as shown here:
But the watch app not only fails to show a message to the user requesting access to the events on the watch, when I try to see what is causing the problem (despite the plist clearly showing the message), all I get is this output:
Does anyone know what is the problem, even though the plist clearly has descriptions.
Thank you in advance.