Skip to main content
SDK Version

Getting Started

Using the Actito Expo library will allow you to quickly implement remote notifications, use actionable analytics or display content in your app.

Requirements

Quick start​

Three steps and you're done. Details for each step are below if you get stuck.

1. Install the SDK:

# Required
npx expo install react-native-actito

# Optional modules
npx expo install react-native-actito-assets
npx expo install react-native-actito-in-app-messaging
npx expo install react-native-actito-inbox
npx expo install react-native-actito-push
npx expo install react-native-actito-push-ui
npx expo install react-native-actito-user-inbox

2. Download your actito-services.json/ActitoServices.plist from your Actito app (one per environment) and wire them up in your app.config.ts — see setting up the configuration file below.

3. Launch Actito when your app's main component initializes:

useEffect(() => {
(async () => {
// Launch Actito! 🚀
await Actito.launch();
})();
}, []);

That's it — your app now registers itself with Actito automatically. Jump to verifying your setup, or read on for the details behind each step.

An overview of the library​

The Actito SDK is composed of multiple modules designed to integrate seamlessly with your application.

The core Actito module is required and provides the foundational functionality necessary for all Actito integrations.

Additional modules are optional and can be included as needed to extend the SDK's capabilities — for example, in-app messages or an inbox.

Overview of the library

This modular structure allows developers to include only the components relevant to their use case, ensuring optimal performance and reduced application size. Install the packages you need:

# Required
npx expo install react-native-actito

# Optional modules
npx expo install react-native-actito-assets
npx expo install react-native-actito-in-app-messaging
npx expo install react-native-actito-inbox
npx expo install react-native-actito-push
npx expo install react-native-actito-push-ui
npx expo install react-native-actito-user-inbox

Setting up the configuration file​

To establish a connection between your application and Actito, you must download a configuration file for each environment your application supports. In most cases, this includes both development and production configurations.

Once downloaded, place each file in the following locations within your project:

  • Production configuration:
    • <project>/configuration/release/actito-services.json
    • <project>/configuration/release/ActitoServices.plist
  • Development configuration:
    • <project>/configuration/debug/actito-services.json
    • <project>/configuration/debug/ActitoServices.plist

Set their location in your app.config.ts file:

import { ExpoConfig, ConfigContext } from 'expo/config';

const IS_DEV = process.env.APP_VARIANT === 'development';

const getAndroidServicesFile = () => {
if (IS_DEV) {
return './configuration/debug/actito-services.json';
}

return './configuration/release/actito-services.json';
};

const getIOSServicesFile = () => {
if (IS_DEV) {
return './configuration/debug/ActitoServices.plist';
}

return './configuration/release/ActitoServices.plist';
};

export default ({ config }: ConfigContext): ExpoConfig => ({
// More code

plugins: [
[
'react-native-actito',
{
ios: {
servicesFile: getIOSServicesFile(),
optionsFile: './configuration/ActitoOptions.plist',
},
android: {
servicesFile: getAndroidServicesFile(),
},
},
],
],
});

Set the environment variable in your scripts, for example, in your package.json:

{
"scripts": {
"dev": "APP_VARIANT=development npx expo start",
"pre-build": "APP_VARIANT=development expo prebuild --clean",
}
}

And add environment variable in your eas.json:

{
"build": {
"development": {
"developmentClient": true,
"distribution": "internal",
"env": {
"APP_VARIANT": "development"
}
}
}
}

Launching Actito​

Before using any Actito features, the SDK must be initialized by invoking the launch() method. This process ensures that the Actito SDK is fully set up and ready to operate. Most SDK functionality will remain unavailable until this initialization occurs.

It is recommended to invoke the launch within when the main application component initialises its state:

useEffect(() => {
(async () => {
// Launch Actito! 🚀
await Actito.launch();
})();
}, []);

Launching the SDK automatically registers the device with Actito. If your application requires user consent before collecting or registering device information, you may delay the initial launch until consent is granted.

Otherwise, ensure that launch() is called during the application's initialization phase to avoid missing important updates — particularly when the app is created in the background.

Verify your setup​

  • Run the app on Android and iOS (device or emulator/simulator).
  • Check the console/Logcat for any Actito errors during startup — a clean startup means initialization succeeded.
  • Open your Actito app dashboard: the device should appear registered within a minute of launching the app.

If nothing shows up, see troubleshooting.

Unlaunching Actito​

If your application needs to permanently disable Actito functionality, you can invoke the unlaunch() method. This method completely removes all Actito-related functionality and deletes any previously registered device information, both locally and remotely.

While this action is generally discouraged, it may be required in certain cases — such as when a user requests permanent account deletion or data removal — to ensure compliance with privacy and data protection regulations.

await Actito.unlaunch()
Important

Once unlaunch() is invoked, all associated data is permanently destroyed and cannot be recovered. Any subsequent calls to Actito APIs will fail until the SDK is reinitialized using the launch() method.

Why two environments?​

Applications commonly operate across two primary environments: development and production.

  • The development environment is used for feature implementation, debugging, and internal testing.
  • The production environment represents the live deployment accessed by end users.

It is strongly recommended to assign distinct bundle identifiers to each environment (for example, com.example.app.dev for development and com.example.app for production). Maintaining separate identifiers allows both versions to coexist on the same device, ensures each build connects to the appropriate Actito environment, and prevents data or configuration conflicts.

In most configurations, the development environment corresponds to the debug build type on Android and the Debug build configuration on iOS, and the production environment to release/Release respectively.

Establishing a clear separation between environments minimizes the risk of deploying builds that target incorrect services.

Environments

Important

Please ensure you configure distinct environments, as this separation is required for remote notifications to function correctly.