React Native Tutorial — Getting the SHA1 from your React Native Android App

For all your App SigningReport needs!

Hafiz Hanif, PhD
1 min readJan 27, 2023
Photo by Ferenc Almasi on Unsplash

As I make different mobile apps based on React Native (bare), I like to use Medium as a place to write about problems that may not be talked about much on sites like StackOverflow, Github, and others. The purpose of this is two-fold, i.e., one — for future reference since I will probably stick to this tech stack a lot, and two — for the benefit of other developers out there who face similar predicaments as I did when developing React Native applications.

Instructions:

  • In your terminal, enter the command cd android && ./gradlew signingReport
  • The result will display the debug and release version SHA1. Choose the corresponding version appropriately.
  • Then you can go to Google Developer Console and generate the OAuth Client ID for Android.
  • Copy the ID generated and save it in a .env file at the root of your React Native app.

Side-note:

To use the values stored inside your.env file, you need to have thereact-native-config package installed, either via npm or yarn.

Reference:

--

--

A CTO at SiagaX Group, an EduTech Senior Lecturer at UPSI, the Hon. Sec. Gen. for PTPM-META, and an Autodidact. https://www.drhafizhanif.net