Expo

freeRASP for React Native is a bare React Native plugin. When installing freeRASP into a project that uses Expo SDK, there may be extra configuration needed.

To integrate freeRASP into the Expo projects, follow the instructions for React Native. After that, continue on this page.

We provide a plugin config that sets up the dependencies of freeRASP without the need to eject the Expo project. It is recommended to use the plugin config. However, manual setup is also possible.

Plugin config setup

Add the plugin config to your app.json and specify the minSdkVersion (use at least 23). Additionally, if you are using Expo 50, increase the version of R8 above 8.2 with the R8Version property (to support sealed classes on Android).

"plugins":[
    [
        "freerasp-react-native/app.plugin.js",
        {
            "android":{
                "minSdkVersion":"23",
                "R8Version":"8.3.37" // optional for Expo 50
            }
        }
    ]
]

Manual setup

  1. Increase minSdkVersion

    This can be done in two ways:

    • update the minSdkVersion property directly in android/build.gradle, or

    • use expo-build-properties plugin, which updates the property in the prebuild phase. Read more in the Expo docs.

  2. Add maven dependency

    1. open android/build.gradle (if you don't see the android folder, run npx expo prebuild -p android in terminal to create it)

    2. add the following dependency under allprojects > repositories:

      maven { url "https://europe-west3-maven.pkg.dev/talsec-artifact-repository/freerasp" }

    3. if not already configured, add also:

      maven { url 'https://www.jitpack.io' }

Last updated