add_2_calendar
add_2_calendar copied to clipboard
2.2.5 Add Calendar Failed at First time after Grant Permission
I use 2.2.5 on iOS. That can compile and execute on iPhone. If the app is new installed, the permission grant dialog will be showed up. When you grant it, the event page is showed up. Tap "Add", it appears "Error".
I roll back to 2.2.4, it works good at same scenario.
However, looks like the 2.2.5 got something wrong when add the event in calendar after grant permission.
<Note> my iPhone 15 is installed with 16.7 iOS.
Tried more times, confirm this is an issue. Please kindly check the 2.2.5. The 2.2.4 has no issue.
@diegogarciar @Maleandr @ja2375
Can you test with the example app?
Good point, will let you know asap.
Same failure by example app.
I recorded a video for you to easily see the situation. Please take look: [https://www.dropbox.com/scl/fi/bidsjsz6rrad7tc91bj4p/add2calendarVideo.mp4?rlkey=yt3e7c5qaq1fq7pzib8nj57lq&dl=0] It's kept failed after allow the permission until discard changes, then it works at the next time.
The log output is: (lldb) 2023-10-15 11:22:33.579653+0800 Runner[13647:1097877] [VERBOSE-2:FlutterDarwinContextMetalImpeller.mm(37)] Using the Impeller rendering backend. Warning: Unable to create restoration in progress marker file fopen failed for data file: errno = 2 (No such file or directory) Errors found! Invalidating cache... Debug service listening on ws://127.0.0.1:53170/c-93_2nMW6g=/ws Syncing files to device jPhone... [EventKit] Error getting defaultTimedAlarmOffset: Error Domain=EKCADErrorDomain Code=1013 "Access denied" UserInfo={NSLocalizedDescription=Access denied} [Warning] Warning once only: Detected a case where constraints ambiguously suggest a height of zero for a table view cell's content view. We're considering the collapse unintentional and using standard height instead. Cell: <EKDateTimeCell: 0x11a872000; baseClass = UITableViewCell; frame = (0 198.667; 361 22.6738); autoresize = W; gestureRecognizers = <NSArray: 0x2825529d0>; layer = <CALayer: 0x282b52800>> [EventEditor] -[EKCalendarItemLocationInlineEditItem isSubitemAtIndexSaveable:] - Location Inline Edit Item didn't have a text label on its non conference location cell; will return NO [eventStoreEditor] Failed to save event: (null) [EventKitUI] Calendar: unable to save: (null) [EventEditor] -[EKCalendarItemLocationInlineEditItem isSubitemAtIndexSaveable:] - Location Inline Edit Item didn't have a text label on its non conference location cell; will return NO [eventStoreEditor] Failed to save event: (null) [EventKitUI] Calendar: unable to save: (null) [EventEditor] -[EKCalendarItemLocationInlineEditItem isSubitemAtIndexSaveable:] - Location Inline Edit Item didn't have a text label on its non conference location cell; will return NO [eventStoreEditor] Failed to save event: (null) [EventKitUI] Calendar: unable to save: (null) [xpc] XPC connection was invalidated [EventEditor] -[EKCalendarItemLocationInlineEditItem isSubitemAtIndexSaveable:] - Location Inline Edit Item didn't have a text label on its non conference location cell; will return NO [xpc] XPC connection was invalidated [EventEditor] -[EKCalendarItemLocationInlineEditItem isSubitemAtIndexSaveable:] - Location Inline Edit Item didn't have a text label on its non conference location cell; will return NO [xpc] XPC connection was invalidated Application finished.
@diegogarciar Hi Diegogarciar, The 2.2.5 you released got this issue, could you kindly check and fix it? Thanks.
@diegog-sf Per your request, I tested the example code and got same failed result. Any advice?
I'll see whats going on during the week, please revert to previous version for now
Thank you so much!
@diegog-sf Any progress? thanks!
Hello, I just tested with iOS 15 and its working fine on 3.0.0, can you test if this new version solves your issue?
I just tested the 3.0.1. The result is the same, failed at first time. Not improve. :(
So I remember I had this issue in the past, but it was because the calendar was not previously set on my iOS simulator, but for your real device it could be a different thing, I don't have a solution for it right now, so I'll keep an eye on it.
Before test, I would uninstall first on my iPhone. Then it's 100% reproduced. My iPhone is v16.7, guessingly your iPhone15 is 17.0.0. Not sure whether it's related to iOS version although I don't think so since it's good if I roll back to 2.2.4.
However, Yes! please keep watching this.
And let's see if someone else will report the same issue here.
2.2.24 does not work on ios 17. we need a version >3.0.1 which fixes this
Is there any news? It's broken for a few weeks already...
No news, open for help! if you find a workaround please submit a PR
I see the https://pub.dev/packages/device_calendar have updated their package. Does their implementation work? Can you get some inspiration from them?
device calendar does not add the calendar from a UI interface, so their implementation is totally different
Oh, thank you!
any update on this even 3.0.1 not work with iOS version 17.1.2 or higher
In the project where I use the plugin I also use permission_handler
plugin, so checking and requesting calendar permission with that plugin. But event addition works fine first or other times.
Also, don't forget that since iOS 17 there were changes in calendar permissions work and now apps also need to provide proper keys in Info.plist
for the updated permissions approach.
Take a look here (especially note the Important
orange block): https://developer.apple.com/documentation/eventkit/accessing_the_event_store#2975207
So I believe that the author of the issue probably has not all entries in Info.plist
file.