-
-
Notifications
You must be signed in to change notification settings - Fork 21
iOS : Notification and Calendar permission issue resolution #2833
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,8 @@ | ||
| import 'dart:io'; | ||
| import 'package:acter/common/themes/app_theme.dart'; | ||
| import 'package:acter/features/calendar_sync/calendar_sync_permission_page.dart'; | ||
| import 'package:device_calendar/device_calendar.dart'; | ||
| import 'package:flutter/material.dart'; | ||
| import 'package:permission_handler/permission_handler.dart'; | ||
|
|
||
| /// Handles calendar permission request for both Android and iOS platforms | ||
| Future<bool> handleCalendarPermission(BuildContext context) async { | ||
|
|
@@ -39,7 +39,6 @@ | |
|
|
||
| /// Checks if calendar permission is granted | ||
| Future<bool> _checkCalendarPermission() async { | ||
| final deviceCalendar = DeviceCalendarPlugin(); | ||
| final hasPermission = await deviceCalendar.hasPermissions(); | ||
| return hasPermission.data ?? false; | ||
|
Comment on lines
-42
to
-44
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This permission checking was managed by device_calendar code which was always buggy and not giving proper status so I replaced it with permission_handler which we are using in other places of the app as well.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where does this idea that "device_calendar code which was always buggy" come from? It worked fine for at least a bunch of cases, including some iOS testing (I had done here before). Replacing this raises the question: has this been tested on other platforms than iOS? And: is this change really necessary for the fix? |
||
| final status = await Permission.calendarFullAccess.request(); | ||
| return status.isGranted; | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the actual fix then? I don't understand why this would fix anything. Clearly notifications worked before without this, so whatever this is doing, it isn't overwriting the
Info.plistsettings. And as said before, the same is true for calendar events - it is used to work fine before, why is this necessary now?I think this requires more documentation than a link to a list of things, like maybe a github issue or readme describing that doing this is necessary?!?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is a huge explanation but I still don't know where this code comes from. It is not on the
permission_handlersetup README as implied. If this is not the setup usually needed for permission_handler, why do we need it?