ooni / probe-multiplatform

1 stars 1 forks source link

OONI Probe Multiplatform

Multiplatform (Android and iOS currently) version of the Probe app.

Project structure

Architecture overview

Our aim is to take advantage of multiplatform features as much as possible, specially Compose Multiplatform. Platform specific modules will be limited to the minimum required to setup and launch the apps with a compose wrapper, besides platform-specific code that we can’t avoid, such as the loading our pre-compiled engine.

Principals

Main module structure

Build, Install, and Run

To build, install, and run your application, use the following commands:

There is a custom gradle task(copyBrandingToCommonResources) that is used to copy brand specific resources to the common resources folder. This task is called before the preBuild task.

Creating Run Configurations in Android Studio

Configure run configurations for easy execution within Android Studio:

OONI Probe Android Configuration

  1. Click the Plus (+) sign in the top left corner of the "Run/Debug Configurations" dialog.
  2. Choose 'Gradle'.
  3. Configure with the following:
    • Name: OONI_Probe
    • Run: :composeApp:runDebug -Porganization=ooni

News Media Scan Android Configuration

  1. Repeat the steps for creating a new configuration.
  2. Configure with the following:
    • Name: News_Media_Scan
    • Run: :composeApp:runDebug -Porganization=dw

OONI Probe iOS Configuration

The "Run/Debug Configurations" already has the proper configuration and you just need to select the XCode Project Scheme OONIProbe and run it.

News Media Scan iOS Configuration

The "Run/Debug Configurations" already has the proper configuration and you just need to select the XCode Project Scheme NewsMediaScan and run it.

Switching between OONI Probe and News Media Scan

Testing

Common tests (tests inside commonTest) only run on the iOS Simulator. Choosing the option android (local) won't work. This is a current issue with the official testing library.