Troubleshooting
Troubleshoot and resolve common issues with the iOS Session Replay.
Does Session Replay work with UIKit, SwiftUI or AppKit?
Session Replay works with both UIKit and SwiftUI.
Does Session Replay work on macOS, watchOS, tvOS and visionOS?
We don't actively prevent you from using Session Replay on these platforms, but we only officially support it on iOS. As a consequence, we can't make guarantees about its functionality and performance on other platforms.
Why are parts of my replay not masked?
Text views, input views, images, video players and webviews are all masked by default. Images with bundled assets aren't masked because the likelihood of these assets containing PII is low. If you encounter a view that should be masked by default, consider opening a GitHub issue.
What's the lowest version of iOS supported?
Session Replay recording happens even on the lowest version supported by the Sentry SDK, which is aligend with appstore support.
Why is my issue missing a replay?
An issue may be missing a replay because the user's device was offline while sessionSampleRate
was specified, your project/organization was rate-limited, or (in rare cases) the device failed to capture the replay video.
AVFoundation views and layers are not rendered
Session Replay currently cannot capture content from AVFoundation views and layers. This includes:
AVPlayerLayer
and other AVFoundation-backed video contentAVCaptureVideoPreviewLayer
used for camera previews- Any media content rendered using AVFoundation components
As a result, camera views, video players, and other AVFoundation-based UI elements will not appear in session replays, even when using unmaskedViewClasses
configuration.
We are aware of this limitation and are exploring potential solutions to support AVFoundation content in future releases.
You can follow the progress in this GitHub issue.
Session Replay is not recording with custom window setup
If you have a custom window setup (e.g., multiple instances of UIWindow
), you need to ensure that the Sentry SDK is able to find the correct window.
When using window scenes, make sure that the main window is assigned in your UIWindowSceneDelegate
's window
property.
final class SceneDelegate: NSObject, UIWindowSceneDelegate {
var window: UIWindow?
func scene(
_ scene: UIScene,
willConnectTo session: UISceneSession,
options connectionOptions: UIScene.ConnectionOptions
) {
guard let scene = scene as? UIWindowScene else { return }
// Configure your windows here, e.g.
let mainWindow = UIWindow(windowScene: scene)
mainWindow.rootViewController = UIViewController()
mainWindow.makeKeyAndVisible()
// Do not forget to assign the window to the SceneDelegate's window property:
self.window = mainWindow
}
}
Alternatively, you can also create a custom proxy variable for the window:
final class SceneDelegate: NSObject, UIWindowSceneDelegate {
var mainWindow: UIWindow?
func scene(
_ scene: UIScene,
willConnectTo session: UISceneSession,
options connectionOptions: UIScene.ConnectionOptions
) {
guard let scene = scene as? UIWindowScene else { return }
// Configure your windows here, e.g.
let mainWindow = UIWindow(windowScene: scene)
mainWindow.rootViewController = UIViewController()
mainWindow.makeKeyAndVisible()
// Do not forget to assign the window to the SceneDelegate's window property:
self.window = mainWindow
}
// This is required to make sure that the Sentry SDK can find the correct window:
var window: UIWindow? {
get {
return mainWindow
}
set {
mainWindow = newValue
}
}
}
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").