Skip to content

docs: update permission section in PushNotifications documentation#546

Merged
ttypic merged 1 commit intomainfrom
update-push-docs
Apr 9, 2026
Merged

docs: update permission section in PushNotifications documentation#546
ttypic merged 1 commit intomainfrom
update-push-docs

Conversation

@ttypic
Copy link
Copy Markdown
Contributor

@ttypic ttypic commented Sep 18, 2024

Updated permission section in PushNotifications documentation:

  • added recommendation to use permission_handler package
  • marked old iOS only solution as deprecated
  • add link to the refactoring issue

Summary by CodeRabbit

  • Documentation
    • Replaced iOS-only guidance with cross-platform notification permission guidance and a recommendation to use a Flutter permissions library for unified handling.
    • Added example usage for requesting notification permissions on iOS and Android.
    • Marked the built-in iOS-only permission helper as deprecated and clarified its limitations.
    • Noted an upcoming built-in utility to simplify permission handling and linked issue for updates.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Sep 18, 2024

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: bb7b7937-227e-4d9f-b8cc-f5cd52a80e9d

📥 Commits

Reviewing files that changed from the base of the PR and between 66489ff and 7d10fc4.

📒 Files selected for processing (1)
  • PushNotifications.md

Disabled knowledge base sources:

  • Jira integration is disabled

You can enable these sources in your CodeRabbit configuration.


Walkthrough

Replaces the iOS-only "Notification Permissions" section in PushNotifications.md with cross-platform guidance, recommends permission_handler with example code, documents Android 13+ explicit permission requirement, marks the built-in Push#requestPermission as deprecated, and notes a forthcoming SDK utility and related issue.

Changes

Cohort / File(s) Summary
Push notifications docs
docs/PushNotifications.md
Reworked notification permissions section to be cross-platform; recommends permission_handler (flutter-permission-handler) with example using Permission.notification.request(); clarifies Android 13+ requirement; marks Push#requestPermission as deprecated with warnings about iOS-only support and client coupling; adds note about an upcoming unified SDK utility and issue link.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

I’m a rabbit with a patch of code so bright,
Hopping through permissions morning to night. 🐰
With handlers in paw and a fearless leap,
Notifications wake from their sleepy sleep.
Tap, grant, and dance — the meadow’s alight! ✨

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch update-push-docs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot temporarily deployed to staging/pull/546/features September 18, 2024 10:20 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/546/dartdoc September 18, 2024 10:20 Inactive
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

Outside diff range and nitpick comments (3)
PushNotifications.md (3)

192-193: Ensure Consistent Heading Capitalization

The heading "Notification Permissions using permission_handler package" should use Title Case for consistency with the rest of the document. Consider capitalizing "Using" to match the style of other headings.

Apply this diff to correct the heading capitalization:

-#### Notification Permissions using `permission_handler` package
+#### Notification Permissions Using `permission_handler` Package

194-194: Remove Extra Space Between Words

There's an extra space between "the" and the [flutter-permission-handler] link. Removing it will improve readability.

Apply this diff:

-However, we recommend using the  [flutter-permission-handler](https://github.com/baseflow/flutter-permission-handler) package due to its reliable cross-platform support for both iOS and Android.
+However, we recommend using the [flutter-permission-handler](https://github.com/baseflow/flutter-permission-handler) package due to its reliable cross-platform support for both iOS and Android.

216-216: Ensure Consistent Heading Capitalization

For consistency, capitalize "iOS Only" in the heading.

Apply this diff:

-#### Built-in Notification Permissions Management (iOS only)
+#### Built-in Notification Permissions Management (iOS Only)
Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between c6a780f and 76949d8.

Files selected for processing (1)
  • PushNotifications.md (2 hunks)

@github-actions github-actions bot temporarily deployed to staging/pull/546/dartdoc September 18, 2024 10:42 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/546/features September 18, 2024 10:42 Inactive
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Outside diff range and nitpick comments (1)
PushNotifications.md (1)

Line range hint 229-254: Update documentation to reflect deprecation of Push#requestPermission method

After marking the Push#requestPermission method as deprecated, the documentation should be updated to guide users towards the recommended alternative for handling notification permissions on iOS. Continuing to instruct users to use a deprecated method may cause confusion.

Apply this diff to update the documentation:

-// Create an Ably client to access the push field
-final realtime = ably.Realtime(options: clientOptions);
-final push = realtime.push;
-// Request permission from user on iOS
-bool permissionGranted = await push.requestPermission();
-// Get more information about the notification settings
-if (Platform.isIOS) {
-  final notificationSettings = await realtime.push.getNotificationSettings();
-}
+// Request notification permission
+PermissionStatus status = await Permission.notification.request();
+
+if (status.isGranted) {
+  // Handle permission granted
+} else {
+  // Handle permission denied
+}
Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 76949d8 and 718964d.

Files selected for processing (1)
  • PushNotifications.md (2 hunks)

@ttypic ttypic requested a review from sacOO7 September 18, 2024 11:13
@github-actions github-actions bot temporarily deployed to staging/pull/546/dartdoc October 9, 2024 11:02 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/546/features October 9, 2024 11:02 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/546/dartdoc October 14, 2024 11:51 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/546/features October 14, 2024 11:51 Inactive
@ttypic ttypic force-pushed the update-push-docs branch from 9a8aaef to 66489ff Compare June 17, 2025 20:29
@github-actions github-actions bot temporarily deployed to staging/pull/546/features June 17, 2025 20:29 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/546/dartdoc June 17, 2025 20:29 Inactive
@ttypic ttypic force-pushed the update-push-docs branch from 66489ff to 7d10fc4 Compare April 9, 2026 12:42
@ttypic ttypic merged commit 89e4c4e into main Apr 9, 2026
7 of 10 checks passed
@ttypic ttypic deleted the update-push-docs branch April 9, 2026 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant