LogoLogo
HomeArticlesCommunity ProductsPremium ProductsGitHubTalsec Website
  • 👋Introduction
  • 🛠️Integration
    • 🤖Android
      • API
      • Troubleshooting
    • 🍎iOS
      • API
      • Troubleshooting
    • 🐦Flutter
      • FlutterFlow
      • API
      • Troubleshooting
    • ⚛️React Native
      • Expo
      • API
      • Troubleshooting
    • 👾Cordova
      • API
      • Troubleshooting
    • 🪽Capacitor
      • API
      • Troubleshooting
  • 🚀Features and Pricing plans
    • The Key Differences: freeRASP vs. RASP+
  • 🎤What's New and Changelog
  • 📊Security Report
  • ⚖️User Data Policies
  • 📄License
  • 🤝Fair Usage Policy (FUP)
  • ℹ️Wiki
    • Getting Signing Certificate Hash
    • Callback Delay, Telemetry Impact, and Threat Scanning Completion Status
    • Threat detection
      • Detecting rooted or jailbroken devices
      • Emulator detection
      • Hook detection
      • App tampering detection
      • Debugger detection
      • Detecting unofficial installation
      • Device binding detection
      • Missing obfuscation detection [Android devices only]
      • Secure Hardware detection (Keystore/Keychain secure storage check)
      • Passcode
      • System VPN detection
      • Developer Mode detection [Android devices only]
      • ADB enabled detection [Android devices only]
      • Screen Capture
    • Source code obfuscation
    • isProd flag
  • 🦉FAQ
  • 🧑‍💻About Us
  • 🤝Contribution
Powered by GitBook
On this page
  • Types
  • TalsecConfig
  • AndroidConfig
  • IOSConfig
  • NativeEventEmitterActions
  • Hooks
  • const useFreeRasp = (config: TalsecConfig, actions: NativeEventEmitterActions)
  • Methods
  • const setThreatListeners = async (config: NativeEventEmitterActions): void
  • const talsecStart = async (options: TalsecConfig): Promise<string>
  • const removeThreatListeners = async (): void
  • const blockScreenCapture = async (enable: boolean): Promise<string>
  • const isScreenCaptureBlocked = async (): Promise<boolean>

Was this helpful?

Export as PDF
  1. Integration
  2. React Native

API

Types

TalsecConfig

Specifies configuration for your app. See the table below for detailed description of the attributes.

field
type
description
sample value

androidConfig

AndroidConfig?

Configuration for Android apps

any AndroidConfig instance

iosConfig

IOSConfig?

Configuration for iOS apps

any IOSConfig instance

watcherMail

string

The value is automatically used as the target address for your security reports. Mail has a strict form 'name@domain.com'.

'john@example.com'

isProd

boolean?

Defaults to true when undefined. If you want to use the Dev version to make the development process easier, set the parameter to false. Make sure that you have the Release version in the production (i.e. isProd set to true)!. To simplify switching between debug and release version of freeRASP based on the build type, you can use BuildConfig.BUILD_TYPE.contains("Release", true) as a value for isProd.

true

AndroidConfig

Specifies configuration for instances of the app running on Android devices. See the table below for detailed description of the attributes.

field
type
description
sample value

packageName

string

Package name of the app.

'com.talsec.freerasp.demoapp'

certificateHashes

string[]

Certificate hashes of your app.

['mVr/qQLO8DKTwqlL+B1qigl9NoBnbiUs8b4c2Ewcz0k=']

supportedAlternativeStores

string[]

[ 'com.sec.android.app.samsungapps']

IOSConfig

Specifies configuration for instances of the app running on Android devices. See the table below for detailed description of the attributes.

field
type
description
sample value

appBundleId

string

Apple Bundle ID for the app

'com.talsec.freerasp.demoapp'

appTeamId

string

Apple Team ID used in the app

'M8AK35...'

NativeEventEmitterActions

Specifies a set of callbacks that are used to notify the application when certain security threat is detected.

Actions

threat
type
Android
iOS

privilegedAccess

() => any

debug

() => any

simulator

() => any

appIntegrity

() => any

unofficialStore

() => any

hooks

() => any

deviceBinding

() => any

deviceID

() => any

passcode

() => any

secureHardwareNotAvailable

() => any

obfuscationIssues

() => any

devMode

() => any

adbEnabled

() => any

systemVPN

() => any

malware

`(apps: SuspiciousAppInfo[]) => any

screenshot

() => any

screenRecording

() => any

Hooks

const useFreeRasp = (config: TalsecConfig, actions: NativeEventEmitterActions)

React Custom Hook responsible for starting freeRASP and setting up listeners

Methods

const setThreatListeners = async (config: NativeEventEmitterActions): void

Sets up listeners for detected threats

const talsecStart = async (options: TalsecConfig): Promise<string>

Method is used to start freeRASP's audit. Returns 'freeRASP started'string when successful.

const removeThreatListeners = async (): void

Unregisters threat listeners. Should be called only when the app is being terminated.

const blockScreenCapture = async (enable: boolean): Promise<string>

const isScreenCaptureBlocked = async (): Promise<boolean>

Last updated 2 months ago

Was this helpful?

Package names of the alternative stores. If you publish on the Google Play Store and Huawei AppGallery, as these are already included internally. (You can assign just emptyArray()). For more information, visit the wiki page.

🛠️
⚛️
Detecting Unofficial Installation