Sanitize Data (Mobile)

This page explains how to sanitize UI components in your mobile applications using OpenReplay’s SDKs for iOS and Android. For details on sanitizing network requests, refer to Network Options (Mobile).

iOS - Sanitizing UI Components

Section titled iOS - Sanitizing UI Components

Sanitized views will be blurred out in the resulting replay. Components are automatically removed (to preserve memory) as soon as they are no longer visible.

Add the .sensitive() modifier to the component you wish to sanitize.

import ORTracker

Text("Sensitive Information")
    .sensitive()

Use the addIgnoredView method to mark a view as sensitive.

import ORTracker

ORTracker.shared.addIgnoredView(view)

Wrap sensitive components with the ORSanitizedView component to blur them out in the replay.

import OR from '@openreplay/react-native';

<OR.ORSanitizedView>
  <SensitiveComponent />
</OR.ORSanitizedView>

Android - Sanitizing UI Components

Section titled Android - Sanitizing UI Components

Sanitized views are blurred out in the resulting replay and automatically removed from memory when off-screen.

Mark a view as sensitive using the addIgnoredView method.

import com.openreplay.tracker.OpenReplay

OpenReplay.addIgnoredView(view)

If you have any questions about sanitizing data, feel free to reach out to us on our Slack or check out our Forum.