MaikuB/flutter_local_notifications
在 GitHub 查看iOS provisional notification permission not working
Open
#2,235 建立於 2024年2月3日
help wanted
倉庫指標
- Star
- (2,208 star)
- PR 合併指標
- (平均合併 59分鐘) (30 天內合併 4 個 PR)
描述
Describe the bug
Requesting provisional permissions returns false immediatly and does display a system prompt.
To Reproduce
- Initialize the plugin using the following ios settings. Note that this call also returns false.
final DarwinInitializationSettings iosSettings =
const DarwinInitializationSettings(
requestAlertPermission: false,
requestSoundPermission: false,
requestBadgePermission: false,
requestProvisionalPermission: true,
requestCriticalPermission: false,
defaultPresentAlert: false,
defaultPresentSound: false,
defaultPresentBadge: false,
defaultPresentBanner: false,
defaultPresentList: false,
onDidReceiveLocalNotification: null,
notificationCategories: const <DarwinNotificationCategory>[],
);
- Request permission later on using the following API:
requestPermissions(
sound: false,
alert: false,
badge: false,
provisional: true,
critical: false,
);
- Receive a false response and notifications cannot be scheduled.
Expected behavior Provisional notifications should be granted automatically as described in the docs here.
Maybe related: This line in the code comments mentions needing special approval from Apple to use provisional permissions. But I can't see any references to it at the linked page.