We're Hiring!

React Native Automated Quickstart

Digital background with React Native logo

The new React Native Approov Quickstart provides automated integration of Approov API threat protection for most React Native apps.

1. Start with your React Native app

Start with your current React Native app as is using fetch() network calls or common Javascript networking libraries such as Axios or Frisbee. 

If you are test-driving Approov, you can also start with an example shapes app, shapes_axios, shapes_fetch, and shapes_frisbee, which work with the publicly available shapes API and service at shapes.approov.io

Approov shapes connected not connected screenshot

2. Integrate Approov

The full quickstart is supplied as an npm package and is integrated into the standard React Native command line tooling.

A quickstart check command verifies your app is ready for integration or reports any issues and provides suggested fixes. Typical issues include a missing Android network permission or an out-of-date iOS deployment target.

Next, an integrate command adds the latest Approov SDK into your app and integrates app attestation functionality and Approov protection into your API calls. The command asks a few questions if you want to customize header names or add features such as binding user and Approov authentication. 

Now just build and run your app as usual with the react-native CLI:

$ yarn run react-native run-android

or

$ yarn run react-native run-ios

If you wish, you can also rerun the check command to ensure that Approov is now properly integrated.

3. Register your app with Approov

The remaining step is to register your app with the Approov service. For your convenience, registration commands are added into to the React-Native CLI:

$ yarn run react-native reg-android

or

$ yarn run react-native reg-ios

By default, your app is registered for one hour for debug and testing.

Continue developing your app, coordinate Approov protection with your service implementation, and when ready, just follow your normal deployment flow and register your production Android and iOS apps with Approov.

Going Further

Once your app is integrated, all Approov features, such as updating security policies, adding APIs, customizing certificate pinning, testing support, live metrics, and more, are available through the approov CLI as usual.

Tha React Native Approov quickstart is available at https://github.com/approov/quickstart-react-native or on npm at https://www.npmjs.com/package/@approov/react-native-approov.

The README contains instructions on getting started, command references, and a set of common issues and fixes for React Native and Approov app integration.

Please submit any issues or feature requests to the quickstart-react-native repo. We appreciate the feedback.

If you do not currently have an Approov account, sign up for a free trial at https://approov.io/signup.

Try Approov For Free!

Skip Hovsmith

- Senior Consultant at Approov
Developer and Evangelist - Software Performance and API Security - Linux and Android Client and Microservice Platforms