Skip to content

Commit 8fe3494

Browse files
DennisAlundclaude
andcommitted
docs: align setPushNotificationToken iOS mapping with the Swift symbol
The dartdoc referenced setPushNotificationsDeviceTokenString, which does not exist in Swift: NS_SWIFT_NAME renames that ObjC selector to setPushNotificationsDeviceToken(_:), the symbol the plugin actually calls. Documents the real Swift method (String overload) and notes the ObjC origin. Addresses Copilot review comment 3328481126. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent a4bbaff commit 8fe3494

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

lib/facebook_app_events.dart

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -675,8 +675,11 @@ class FacebookAppEvents {
675675
/// push-driven app opens and measure push campaigns.
676676
///
677677
/// Platform mapping:
678-
/// - iOS: `setPushNotificationsDeviceTokenString`.
679-
/// - Android: `setPushNotificationsRegistrationId`.
678+
/// - iOS: `AppEvents.setPushNotificationsDeviceToken(_:)` (the String overload).
679+
/// The underlying `setPushNotificationsDeviceTokenString:` Objective-C
680+
/// selector is renamed to `setPushNotificationsDeviceToken(_:)` in Swift via
681+
/// `NS_SWIFT_NAME`, so that is the symbol this plugin calls.
682+
/// - Android: `AppEventsLogger.setPushNotificationsRegistrationId`.
680683
Future<void> setPushNotificationToken(String token) {
681684
return _channel.invokeMethod<void>('setPushNotificationToken', token);
682685
}

0 commit comments

Comments
 (0)