Skip to content

chore(messaging)!: deprecate permissions APIs, use react-native-permissions or expo-notifications#9053

Merged
mikehardy merged 1 commit into
mainfrom
deprecate-permissions
Jun 16, 2026
Merged

chore(messaging)!: deprecate permissions APIs, use react-native-permissions or expo-notifications#9053
mikehardy merged 1 commit into
mainfrom
deprecate-permissions

Conversation

@mikehardy

@mikehardy mikehardy commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Description

Deprecate permissions-related APIs, they are not firebase-specific and other packages handle them much more completely (expo-notifications for Expo users, and react-native-permissions for CLI)

It is a documentation change and adding @deprecation to APIs.

Related issues

Release Summary

This commit is marked as a breaking change since it introduces a deprecation - those can be done any time but I wanted it to show up brightly in the release notes

It will be batched with the next / coming shortly release off main which is breaking for other reasons

Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
    • Yes
  • My change supports the following platforms;
    • Android
    • iOS
    • Other (macOS, web)
  • My change includes tests;
    • e2e tests added or updated in packages/\*\*/e2e
    • jest tests added or updated in packages/\*\*/__tests__
  • I have updated TypeScript types that are affected by my change.
  • This is a breaking change;
    • Yes
    • No

Test Plan

yarn targets lint:spellcheck lint:markdown lint and reference:api all pass


Think react-native-firebase is great? Please consider supporting the project with any of the below:

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a breaking change by deprecating the notification permission-related APIs within the messaging module. The goal is to encourage users to adopt more comprehensive, dedicated libraries like react-native-permissions or expo-notifications for managing permissions, as these are not specific to Firebase and are better handled by specialized packages. The changes primarily involve updating documentation and adding deprecation notices to the codebase to prepare for their eventual removal in a future major release.

Highlights

  • API Deprecation: Marked notification permission APIs (requestPermission, hasPermission, AuthorizationStatus, and IOSPermissions) as deprecated across the codebase.
  • Documentation Updates: Updated documentation to advise users to migrate to react-native-permissions or expo-notifications for handling notification permissions.
  • TypeScript Type Updates: Added @deprecated JSDoc annotations to relevant TypeScript interfaces and types to ensure developers are warned during IDE usage.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request deprecates the notification permission APIs ('requestPermission', 'hasPermission', 'AuthorizationStatus', and 'IOSPermissions') in '@react-native-firebase/messaging' across the codebase and documentation, recommending the use of 'react-native-permissions' or 'expo-notifications' instead. The review feedback highlights a minor grammatical typo in the Android permissions documentation and points out an inconsistency between the issue number referenced in the PR description (#6282) and the one used in the code and docs (#6283).

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread docs/messaging/usage/index.mdx
Comment thread docs/messaging/ios-permissions.mdx
@mikehardy mikehardy merged commit fc317fa into main Jun 16, 2026
19 of 21 checks passed
@mikehardy mikehardy deleted the deprecate-permissions branch June 16, 2026 02:13
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.

[📚] Support for Android 13 context permissions / or switch to react-native-permissions for all permissions work

1 participant