Skip to content

BD-7588 Push notifications documentation for Flutter and React Native - #148

Merged
denniskoluris merged 15 commits into
mainfrom
dev/18.0.0-flutter
Oct 13, 2026
Merged

denniskoluris merged 15 commits into
mainfrom
dev/18.0.0-flutter

Conversation

@denniskoluris

Copy link
Copy Markdown
Collaborator

No description provided.

akrupczynskirezolve and others added 11 commits April 20, 2026 11:30
BD-7425 Add React Native docs for Push Notifications
The guide described push as Android-only and pinned bluedot_point_sdk_push to
2.1.1 - a version that does not exist on pub.dev, so pub get would fail for
anyone following it. iOS shipped in 1.0.0, so the guide now covers both
platforms.

Corrected:
- versions to bluedot_point_sdk 2.2.0 and bluedot_point_sdk_push 1.0.0
- the Android-only notice, and the claim that iOS is a no-op stub
- added registerForRemoteNotifications(), which iOS needs after the user
  grants notification permission and which was missing entirely

Added the iOS half: the Push Notifications capability, the two
UNUserNotificationCenterDelegate callbacks to add to AppDelegate, APNs
credentials in Canvas, and the build steps.

The AppDelegate instructions show only the additions, and say to leave the
rest of the file alone. How plugins are registered differs between Flutter
versions - older templates in didFinishLaunchingWithOptions, current ones in
didInitializeImplicitFlutterEngine, UIScene apps in SceneDelegate - so a
full-class snippet would be wrong for most readers.

Also restructured for readability: one index, sections grouped by task rather
than by file, and the payload fields and FCM priority notes kept where they
help the reader decide something.
- Note that Xcode derives aps-environment from the signing configuration, so
  development and distribution builds get different values
- Label the custom messaging service section as Android-only, and update the
  index entry and cross-reference that point at it
- Fix bluedot-react-native to 3.5.0 in the React Native guide - 4.0.0 does not
  exist on npm, and 3.5.0 is the latest. The prerequisites table carried the
  same version and is corrected too.
pushVersion and data are Android-only in practice. Both keys are still present
in the iOS map, but the plugin reads them out of the APNs payload, so they come
back empty unless the campaign sets them.

Adds a Platform column to the payload table and a note explaining the iOS
behaviour.
Push Notifications in Flutter Plugin - Android & iOS
@denniskoluris denniskoluris changed the title Dev/18.0.0 flutter BD-7588 Update Flutter documentation for the upcoming 18.0.0 release Oct 7, 2026
@denniskoluris denniskoluris changed the title BD-7588 Update Flutter documentation for the upcoming 18.0.0 release BD-7588 Update Flutter documentation for the 18.x release Oct 7, 2026
…ly Geo-triggering

React Native guide:
- the index listed four sections that do not exist (4.4, 5, 5.1, 7), leaving
  four dead anchors and a numbering gap from 4 to 6
- removed those entries and renumbered 6 -> 5 so the headings run 1-5
- added an Android-only notice: the package ships no iOS module and every
  method is a no-op on iOS

Android location permissions:
- documented the case where an app runs neither a foreground service nor
  ACCESS_BACKGROUND_LOCATION. Geo-triggering then operates only while the app
  is in the foreground, and needs no FOREGROUND_SERVICE or background location
  permission. Tempo is unaffected - it must always run as a foreground service.
@denniskoluris denniskoluris changed the title BD-7588 Update Flutter documentation for the 18.x release BD-7588 Push notifications documentation for Flutter and React Native Oct 11, 2026
BD-7588 Fix React Native push guide index; document foreground-only Geo-triggering
@denniskoluris
denniskoluris force-pushed the dev/18.0.0-flutter branch 3 times, most recently from 2d83d0a to 6b3bfe3 Compare October 13, 2026 05:38
Follow-up to review feedback on the push notifications documentation.

React Native platform scope:
- the guide claimed push is Android-only, because
  bluedot-react-native-pushnotifications ships no iOS module. That package is
  Android-only, but iOS is implemented in the main bluedot-react-native
  wrapper, so the guide now covers both platforms
- added a real iOS setup section. The "5. iOS setup" index entry was never a
  phantom section, only an unwritten one

React Native iOS - the consequential fix:
- the plugin sets the Point SDK's push callbacks but does not implement
  UNUserNotificationCenterDelegate or the APNs device-token callback. Added
  the app-delegate forwarding steps; without them nothing registers and no
  event reaches JavaScript
- written in Swift, calling the Point SDK directly through
  BDLocationManager.instance().pushNotifications. The framework's
  .swiftinterface exposes register(_:), handleForeground(_:) and
  handleResponse(_), so no bridge class or bridging header is needed
- the snippet shows the class declaration with the
  UNUserNotificationCenterDelegate conformance the stock template lacks, and
  the block is type-checked against the shipped framework with swiftc

React Native Android:
- 4.3 no longer claims the package is not auto-linked; the CLI links it
- 6.5 now states that with @react-native-firebase/messaging installed, JS
  forwarding is required, not optional. Verified against that library's
  manifest, which declares its service with no priority and therefore
  defaults to 0, pre-empting the bundled service at -1
- new 4.4 documents POST_NOTIFICATIONS for Android 13 and above

Flutter:
- new 3.4 documents POST_NOTIFICATIONS for Android 13 and above, which the
  published guide had dropped from the wrapper's INTEGRATION.md

iOS native guide:
- register(deviceToken: deviceToken) does not compile - the Swift signature is
  register(_ deviceToken: Data), so the argument label is dropped in both
  places it appeared

Overview:
- Platform Implementation Guides now lists the Flutter and React Native
  pages alongside iOS and Android

Also documents the notification payload fields with a Platform column, where
body, pushVersion and data are Android-only on React Native.
@denniskoluris

Copy link
Copy Markdown
Collaborator Author

@nklymenko integratione example converted to Swift.

@nklymenko nklymenko left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Small changes required

Comment thread docs/Push Notifications/React Native.md Outdated
) -> Bool {
UNUserNotificationCenter.current().delegate = self
// ...your existing setup...
return true

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@denniskoluris It should return super to create RN bridge, right?

Comment thread docs/Push Notifications/React Native.md Outdated
_ application: UIApplication,
didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data
) {
BDLocationManager.instance().pushNotifications.register(deviceToken)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Small fix - missed ?: BDLocationManager.instance()?.pushNotifications.register(deviceToken)

Comment thread docs/Push Notifications/React Native.md Outdated
willPresent notification: UNNotification,
withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void
) {
let handled = BDLocationManager.instance().pushNotifications.handleForeground(notification)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Ditto with missed ?

Comment thread docs/Push Notifications/React Native.md Outdated
didReceive response: UNNotificationResponse,
withCompletionHandler completionHandler: @escaping () -> Void
) {
BDLocationManager.instance().pushNotifications.handleResponse(response)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Ditto with missed ?

- Show the UNUserNotificationCenter delegate assignment as a standalone line
  to add to the didFinishLaunchingWithOptions method the reader already has,
  rather than a whole method body. Returning super creates the bridge on
  RCTAppDelegate-based templates, but the current template has no superclass
  and starts the bridge through factory.startReactNative instead, so a full
  method body would be wrong for one of the two shapes
- Use optional chaining on the three Point SDK calls, matching the native
  iOS guide

Type-checked with swiftc against the shipped BDPointSDK framework.
@denniskoluris
denniskoluris merged commit 67d6f64 into main Oct 13, 2026
1 check passed
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.

4 participants