🎮Unity

📝 Prerequisites

The freeRASP has the following prerequisites that must be met before starting:

  • Unity Editor level: 6 or higher

  • Minimum SDK level: 23 or higher

📦 Install Plugin

First, you'll need to install freeRASP for Unity. Head over to [Github Unity Plugin Release Link] and download the latest plugin. The plugin file should have a .unitypackage extension.

Next, import the plugin into your Unity project: right-click on AssetsImport PackageCustom Package.

Editor - Import Package

Android (freeRASP for Android v15.1.0)

⚙️ Set Up the Configuration for Your App

To ensure freeRASP works properly, you need to configure and initialize it with the required settings. All necessary values must be provided for the plugin to function correctly. Detailed explanations of each configuration option are available on the Android API documentation page.

The first step involves obtaining your app's signing certificate hashes in Base64 format. Refer to the provided manual for comprehensive guidance on app signing, which covers both manual signing methods and Google Play's app signing service.

In this guide, we'll create the Game.cs script (see our sample) attached to a GameObject to initialize freeRASP and configure reactions. You can use any other scripts in your business logic that are initiated when the app starts.

In the Game.cs (or your app’s entry point), import freeRASP and add the following code:

👷 Handle detected threats

To receive threat notifications, implement the AndroidThreatDetectedCallback interface. It contains multiple methods that are triggered when freeRASP periodically scans the device for security threats. Implement these methods within your game logic or main application class.

Add freeRASP Maven Repository

preview

iOS (freeRASP for iOS v6.11.0)

⚙️ Set Up the Configuration for Your App

To ensure freeRASP works properly, you need to configure and initialize it with the required settings. All necessary values must be provided for the plugin to function correctly. Detailed explanations of each configuration option are available on the iOS API documentation page.

In your app’s entry point, import freeRASP and add the following code:

👷 Handle detected threats

To receive threat notifications, implement the IOSThreatDetectedCallback interface. It contains multiple methods that are triggered when freeRASP periodically scans the device for security threats. Implement these methods within your game logic or main application class.

Add freeRASP

Once you are done with your game in Unity Hub; proceed to export the project. Once exported, open up the project in Xcode and add freeRASP dependency:

  1. From GitHub, Copy Talsec folder into your Application folder.

    (select v6.11.0: https://github.com/talsec/Free-RASP-iOS/tree/v6.11.0/Talsec)

  2. Drag & drop the Talsec folder to your .xcworkspace.

  3. Add TalsecRuntime framework to Target > Build Phases > Link Binary With Libraries.

  4. In the General > Frameworks, Libraries, and Embedded Content choose Embed & Sign.

Note: In case you are using Carthage, the zipped version of the framework is included in the GitHub Releases (https://github.com/talsec/Free-RASP-iOS/releases/tag/v6.11.0).


🖥️ Check Talsec Portal

Check out Data Visualisation Portal and register using your watcherMail to see your data. If you integrated the SDK successfully, the application will be present after a few hours. The visualisations will be active later due to the bucketing mechanism.

Last updated