-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[flutter_local_notifications] Add CarPlay notification support with IOSInitializationSettings #2716
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
base: master
Are you sure you want to change the base?
[flutter_local_notifications] Add CarPlay notification support with IOSInitializationSettings #2716
Conversation
2f7a5d2 to
b54129f
Compare
b54129f to
42ed4ec
Compare
MaikuB
left a comment
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.
Thanks for the PR. I left some comments and can also see some checks have failed. Would you be able to take a look?
| When `requestCarPlayPermission` is set to `true`, the plugin will request CarPlay notification permissions if the device supports it (iOS 10.0+). This allows your app's notifications to appear on the CarPlay interface when the device is connected to a compatible vehicle. | ||
|
|
||
| **Important considerations:** | ||
| - CarPlay permissions are only available on iOS 10.0 and later |
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.
| - CarPlay permissions are only available on iOS 10.0 and later | |
| - CarPlay permissions are only available on iOS 10.0 or newer |
For consistency with rest of plugin docs that have been using "or newer"
| carPlayPermissionSpecified = true; | ||
| requestCarPlayPermission = | ||
| [arguments[CARPLAY_PERMISSION] boolValue]; | ||
|
|
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.
nit: remove blank line
|
|
||
| /// Whether CarPlay notifications are enabled. | ||
| /// | ||
| /// Available on iOS 10.0 and later. |
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.
| /// Available on iOS 10.0 and later. | |
| /// This property is only applicable to iOS 10 or newer. |
For consistency with rest of docs
Closes #2715
Summary
• Introduces
IOSInitializationSettingsclass for iOS-specific notification features including CarPlay support• Adds CarPlay notification permission request capability via
requestCarPlayPermissionparameter• Maintains full backward compatibility with existing
DarwinInitializationSettingsusageChanges Made
Core Implementation
IOSInitializationSettingsextendsDarwinInitializationSettingsrequestCarPlayPermissionparameter for iOS 10.0+ devicesNotificationsEnabledOptionswithisCarPlayEnabledstatusNative iOS Changes
FlutterLocalNotificationsPlugin.mUNAuthorizationOptionCarPlay)Testing & Documentation
IOSInitializationSettingsclassIOSInitializationSettingsBackward Compatibility
DarwinInitializationSettingscontinues to work unchangedDarwinInitializationSettings