Skip to content

iOS Session Replay

Prerequisites

Configuration

Link the FTSessionReplay feature module from the FTMobileSDK library to your project according to your package manager:

Package Manager Installation Steps
CocoaPods Add pod 'FTMobileSDK/FTSessionReplay','latest_version' to your Podfile. You need to specify the SDK version number.
Swift Package Manager Add FTSessionReplay as a dependency for your app target.

Code Invocation

   FTSessionReplayConfig *srConfig = [[FTSessionReplayConfig alloc]init];
   srConfig.privacy = FTSRPrivacyAllow;
   srConfig.sampleRate = 100;
   [[FTRumSessionReplay sharedInstance] startWithSessionReplayConfig:srConfig];
   let srConfig = FTSessionReplayConfig.init()
   srConfig.privacy = .allow
   srConfig.sampleRate = 100
   FTRumSessionReplay.shared().start(with: srConfig)
Property Type Required Description
sampleRate int No Sampling rate. Range [0,100], where 0 means no collection, and 100 means full collection. The default value is 100. This sampling rate is based on the RUM sampling rate.
privacy FTSRPrivacy No Sets the privacy level for content masking in Session Replay. Default is FTSRPrivacyMask.
Masking processing: text is replaced with * or #
FTSRPrivacyAllow: records all content except sensitive input controls, such as password fields
FTSRPrivacyMaskUserInput: masks input elements, e.g., UITextField, UISwitch, etc.
FTSRPrivacyMask: masks all content.

Code and Configuration References

Feedback

Is this page helpful? ×