Closed info-trone closed 8 months ago
Did some more searching, as seen in these issues from the permission_handler package. iOS 17 has indeed changed it's calendar permission and some additions will be needed to make this package work.
https://github.com/Baseflow/flutter-permission-handler/pull/1151 https://github.com/Baseflow/flutter-permission-handler/issues/1108
Here it is some additional info that may be useful: https://developer.apple.com/documentation/technotes/tn3152-migrating-to-the-latest-calendar-access-levels https://developer.apple.com/documentation/eventkit/accessing_calendar_using_eventkit_and_eventkitui
@info-trone It looks that "develop" code already contains the fix for iOS 17
Setup your deps as this:
# TEMPORAL FIX for https://github.com/builttoroam/device_calendar/issues/507
# device_calendar: ^4.3.1
device_calendar:
git:
url: https://github.com/builttoroam/device_calendar.git
ref: develop
I had to leave both keys in Info.plist
, older NSCalendarsUsageDescription
and newer NSCalendarsFullAccessUsageDescription
in order to make it work with both iOS 16 and iOS 17:
<key>NSCalendarsUsageDescription</key>
<string>Usage explanation</string>
<key>NSCalendarsFullAccessUsageDescription</key>
<string>Usage explanation</string>
I tried changing the pod file as recommended with iOS 17 but still wasn't able to call the permissions dialog. My current work around was by invoking it from appdelegate.swift final String status = await platform.invokeMethod('checkCalendarAuthorizationStatus');
Describe the bug After adding all requirements for the package(info.plist, pod spec gcc settings, example code), im not getting a prompt nor am I seeing the setting in the app settings. This package has worked before IOS 17, I wonder if that could be the issue. I tried creating a new project only using this package and example code, but can't seem to get it to work.
To Reproduce Steps to reproduce the behavior:
Expected behavior Calendar permission to use the package. with the prompt necessary to give it
Device(s) tested
Flutter doctor![image](https://github.com/builttoroam/device_calendar/assets/142014588/de028cd9-9011-4ee8-bb9f-32c4bd60953a)
Additional context I read through he ios17 notes and found this under privacy: "Improved sharing permissions give you even more control over what you share with apps, with an embedded photo picker and an add-only Calendar permission" could be applicable? im not sure
Also the permission_handler package won't give me a prompt for calendar permissions, but it will with other permissions