Demo Application
View product
develop
The repository contains a demo application that shows the following features:
- Initialization and Shutdown
- Listen to RASP events
- Gather all information about RASP and Antivirus modules
- Android custom Smart Protection Styling
By default, the application starts in offline mode because the Malwarelytics configuration has no service section configured.
Run Demo Application
- Clone the repository
git clone https://github.com/wultra/react-native-malwarelytics.git - Prepare dependencies
cd react-native-malwarelytics yarn cd example - Run Android App
yarn android - Run iOS App
yarn pods yarn ios
To start Malwarelytics click the Initialize button. Some information is displayed to debug logs only (like RASP events), so check the React Native’s log after the application starts. To change the configuration, open example/src/Config.ts. To apply the changes in config you have to click Shutdown and re-initialize the Malwarelytics.
If you want to configure the application for online service, then follow the next chapter.
Configure Online Service
- Copy the environment example into the
.envfile. It’s expected that your current directory isexample:cp .env-example .env - Edit the newly created file
.envand update the following properties:SERVICE_APPLE_USERNAMEwith your username for iOS applicationSERVICE_APPLE_PASSWORDwith your password for the iOS applicationSERVICE_APPLE_PUBLIC_KEYwith your signing public key for the iOS applicationSERVICE_ANDROID_USERNAMEwith your username for Android applicationSERVICE_ANDROID_PASSWORDwith your password for Android applicationSERVICE_ANDROID_PUBLIC_KEYwith your signing public key for the Android application
- Make sure that each time you edit the
.envfile you must run the following steps to apply the changes:yarn android yarn pods yarn ios yarn ios # repeat ios, to detect the changes properly - Update the package name for the Android App to match the one you have registered in Malwarelytics Console:
- Open
example/android/app/build.gradle - Find and edit
applicationId "com.wultra.android.malwarelytics.reactnative.demo"
- Open
- Update the Bundle ID for iOS App to match the one you have registered in Malwarelytics Console:
- Open
example/ios/Config.xcconfig - Update the
PRODUCT_BUNDLE_IDENTIFIERproperty
- Open
Make sure you don’t commit and push your local changes to the git repository.
Last updated on Oct 25, 2024 (14:24)
View product