-
Notifications
You must be signed in to change notification settings - Fork 496
[Bug] iOS 17+ Calendar Permissions not working when setting the first time #2105
Description
Description
iOS 17 and higher doesn't show any permission popup when requesting Calendar.Write or Calendar.Read for the first time both on (Mai)Permission and via EventStore (Eventstore throwns an error ->
-requestAccessToEntityType:completion: has been deprecated-calling this method is no longer allowed.
Instead, use -requestFullAccessToEventsWithCompletion:, -requestWriteOnlyAccessToEventsWithCompletion:, or -requestFullAccessToRemindersWithCompletion:
)
Steps to Reproduce
- Make a new ios application (dotnet 7+)
- Add true to project files
- Add NSCalendarsUsageDescription description to info.list
- Add an button to screen with click event
- Start and press on the button
note: When the user declines the permission
Example code: With (maui)permission
private async Task RequestCalendarPermissions()
{
var permissionWrite = await Permissions.CheckStatusAsync<Permissions.CalendarWrite>();
var permissionRead = await Permissions.CheckStatusAsync<Permissions.CalendarRead>();
if (permissionWrite != PermissionStatus.Granted)
{
BeginInvokeOnMainThread(() => Permissions.RequestAsync<Permissions.CalendarWrite>());
}
if (permissionRead != PermissionStatus.Granted)
{
BeginInvokeOnMainThread(() => Permissions.RequestAsync<Permissions.CalendarRead>());
}
}
Example code without (maui)Permission
private async Task RequestEventPermission()
{
var store = new EKEventStore();
var setPermission = await store.RequestAccessAsync(EKEntityType.Event);
//results in error from ios
}
Expected Behavior
1:
Permission popup for with
"name app" Would like to Access Your Calander
description from info.plist
2:
Settings -> Privancy & Security -> Calendars -> "App name" toggle switch on (at least when you accept it)
3:
Settings -> "App name" -> Allow "app name" To Acces -> Calendars.
Actual Behavior
Apps doesn't show any popup
Basic Information
- Version with issue:
- Last known good version: till ios 17
- IDE: Vs for mac
- Platform Target Frameworks:
- iOS: 17.0 (simulator and device)
- Android: N/A
- UWP: N/A
- Android Support Library Version:
- Nuget Packages:
- MAUI Essentials
- Affected Devices: