github mixpanel/mixpanel-ios-session-replay-package v1.3.1
Release v1.3.1

latest releases: 1.5.1, 1.5.0, 1.4.0...
3 months ago

What's Changed

autoMaskedViews can now be updated at runtime, allowing you to dynamically control which view types are masked based on the current screen or user flow. For example, you can expand masking coverage when entering a sensitive screen and restore the original configuration on exit.

// Cache original autoMaskedViews config
var originalMaskedViews  = MPSessionReplay.getInstance()?.autoMaskedViews

// Expand masking on a sensitive screen
MPSessionReplay.getInstance()?.autoMaskedViews = [.text, .image]

// Restore original config on exit
MPSessionReplay.getInstance()?.autoMaskedViews = originalMaskedViews

Example usage for Swift UI actionsheet

    Section {
        Button(action: {
            self.showActionSheet.toggle()
        }) {
            Text("Show ActionSheet")
        }
        .actionSheet(isPresented:  $showActionSheet) {
            ActionSheet(title: Text("Showing ActionSheet"),
                        message: Text("This is Message"),
                        buttons: [Alert.Button.default(Text("OK")),
                                  Alert.Button.cancel(),
                                  Alert.Button.destructive(Text("Delete"))])
        }.onChange(of: showActionSheet) { oldValue, newValue in
            if newValue {
                MPSessionReplay.getInstance()?.autoMaskedViews = [.text]
            } else {
                MPSessionReplay.getInstance()?.autoMaskedViews = []
            }
        }
    }

Don't miss a new mixpanel-ios-session-replay-package release

NewReleases is sending notifications on new releases.