Skip to content

Conversation

@derrik-fleming
Copy link

@derrik-fleming derrik-fleming commented Nov 12, 2025

Closes #2715

Summary

• Introduces IOSInitializationSettings class for iOS-specific notification features including CarPlay support
• Adds CarPlay notification permission request capability via requestCarPlayPermission parameter
• Maintains full backward compatibility with existing DarwinInitializationSettings usage

Changes Made

Core Implementation

  • New class: IOSInitializationSettings extends DarwinInitializationSettings
  • CarPlay support: Added requestCarPlayPermission parameter for iOS 10.0+ devices
  • Permission checking: Extended NotificationsEnabledOptions with isCarPlayEnabled status
  • Platform mapper: Created iOS-specific mapper that includes CarPlay permissions

Native iOS Changes

  • Added CarPlay permission constants and handling in FlutterLocalNotificationsPlugin.m
  • Implemented CarPlay authorization option support (UNAuthorizationOptionCarPlay)
  • Added CarPlay status checking in permission verification

Testing & Documentation

  • Comprehensive test coverage for new IOSInitializationSettings class
  • Updated integration tests to use IOSInitializationSettings
  • Added migration examples and CarPlay usage documentation
  • Updated iOS deployment target to 13.0 for example app

Backward Compatibility

  • Existing code using DarwinInitializationSettings continues to work unchanged
  • Runtime type checking ensures appropriate mapper usage
  • CarPlay permissions excluded when using DarwinInitializationSettings

@derrik-fleming derrik-fleming changed the title [flutter_local_notifications] Add CarPlay notification support with IOSInitializationSet… [flutter_local_notifications] Add CarPlay notification support with IOSInitializationSettings Nov 12, 2025
@derrik-fleming derrik-fleming force-pushed the feat/ios-carplay-notifications branch from 2f7a5d2 to b54129f Compare November 17, 2025 20:06
@derrik-fleming derrik-fleming force-pushed the feat/ios-carplay-notifications branch from b54129f to 42ed4ec Compare November 17, 2025 20:10
Copy link
Owner

@MaikuB MaikuB left a 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
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- 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];

Copy link
Owner

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.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// Available on iOS 10.0 and later.
/// This property is only applicable to iOS 10 or newer.

For consistency with rest of docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[iOS] Add CarPlay notification support

2 participants