From 57aec1298f6198dbe1bccfa9df9bbfb1eaa09372 Mon Sep 17 00:00:00 2001 From: Manoel Aranda Neto Date: Wed, 12 Jun 2024 08:39:26 +0200 Subject: [PATCH 1/3] fix: screenshotMode typo --- CHANGELOG.md | 2 +- PostHog/Replay/PostHogReplayIntegration.swift | 10 +++++----- PostHog/Replay/PostHogSessionReplayConfig.swift | 2 +- PostHogExample/AppDelegate.swift | 2 +- USAGE.md | 8 ++++---- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2090bf73c..5ae3cef40 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ - chore: change host to new address ([#139](https://github.com/PostHog/posthog-ios/pull/139)) - fix: rename groupProperties to groups for capture methods ([#140](https://github.com/PostHog/posthog-ios/pull/140)) -- recording: add `screenhshotMode` option for session replay instead of wireframe ([#142](https://github.com/PostHog/posthog-android/pull/142)) +- recording: add `screenshotMode` option for session replay instead of wireframe ([#142](https://github.com/PostHog/posthog-android/pull/142)) ## 3.4.0 - 2024-05-23 diff --git a/PostHog/Replay/PostHogReplayIntegration.swift b/PostHog/Replay/PostHogReplayIntegration.swift index 29edbc085..89fd12277 100644 --- a/PostHog/Replay/PostHogReplayIntegration.swift +++ b/PostHog/Replay/PostHogReplayIntegration.swift @@ -144,7 +144,7 @@ let style = RRStyle() // no parent id means its the root - if parentId == nil, config.sessionReplayConfig.screenhshotMode { + if parentId == nil, config.sessionReplayConfig.screenshotMode { if let image = view.toImage() { wireframe.base64 = imageToBase64(image) } @@ -304,12 +304,12 @@ var screenName: String? if let controller = window.rootViewController { - // SwiftUI only supported with screenhshotMode - if controller is AnyObjectUIHostingViewController, !config.sessionReplayConfig.screenhshotMode { - hedgeLog("SwiftUI snapshot not supported, enable screenhshotMode.") + // SwiftUI only supported with screenshotMode + if controller is AnyObjectUIHostingViewController, !config.sessionReplayConfig.screenshotMode { + hedgeLog("SwiftUI snapshot not supported, enable screenshotMode.") return // screen name only makes sense if we are not using SwiftUI - } else if !config.sessionReplayConfig.screenhshotMode { + } else if !config.sessionReplayConfig.screenshotMode { screenName = UIViewController.getViewControllerName(controller) } } diff --git a/PostHog/Replay/PostHogSessionReplayConfig.swift b/PostHog/Replay/PostHogSessionReplayConfig.swift index e7daa1a07..c10f25035 100644 --- a/PostHog/Replay/PostHogSessionReplayConfig.swift +++ b/PostHog/Replay/PostHogSessionReplayConfig.swift @@ -28,7 +28,7 @@ /// The screenshot may contain sensitive information, use with caution. /// Experimental support /// Default: false - @objc public var screenhshotMode: Bool = false + @objc public var screenshotMode: Bool = false // TODO: sessionRecording config such as networkPayloadCapture, captureConsoleLogs, sampleRate, etc } diff --git a/PostHogExample/AppDelegate.swift b/PostHogExample/AppDelegate.swift index 5df538d2f..d05567a20 100644 --- a/PostHogExample/AppDelegate.swift +++ b/PostHogExample/AppDelegate.swift @@ -22,7 +22,7 @@ class AppDelegate: NSObject, UIApplicationDelegate { config.debug = true config.sendFeatureFlagEvent = false config.sessionReplay = true - config.sessionReplayConfig.screenhshotMode = true + config.sessionReplayConfig.screenshotMode = true PostHogSDK.shared.setup(config) PostHogSDK.shared.debug() diff --git a/USAGE.md b/USAGE.md index c8460c8cd..898009501 100644 --- a/USAGE.md +++ b/USAGE.md @@ -214,18 +214,18 @@ config.sessionReplay = true config.sessionReplayConfig.maskAllTextInputs = true config.sessionReplayConfig.maskAllImages = true config.sessionReplayConfig.captureNetworkTelemetry = true -// screenhshotMode is disabled by default +// screenshotMode is disabled by default // The screenshot may contain sensitive information, use with caution -config.sessionReplayConfig.screenhshotMode = true +config.sessionReplayConfig.screenshotMode = true ``` If you don't want to mask everything, you can disable the mask config above and mask specific views using the `ph-no-capture` [accessibilityIdentifier](https://developer.apple.com/documentation/uikit/uiaccessibilityidentification/1623132-accessibilityidentifier). ### Limitations -- [SwiftUI](https://developer.apple.com/xcode/swiftui/) is only supported if the `screenhshotMode` option is enabled. +- [SwiftUI](https://developer.apple.com/xcode/swiftui/) is only supported if the `screenshotMode` option is enabled. - It's a representation of the user's screen, not a video recording nor a screenshot. - Custom views are not fully supported. - - If the option `screenhshotMode` is enabled, the SDK will take a screenshot of the screen instead of making a representation of the user's screen. + - If the option `screenshotMode` is enabled, the SDK will take a screenshot of the screen instead of making a representation of the user's screen. - WebView is not supported, a placeholder will be shown. - React Native and Flutter for iOS aren't supported. From 9232130bad03573a929ecc6f124db4cd0cb83a30 Mon Sep 17 00:00:00 2001 From: Manoel Aranda Neto Date: Wed, 12 Jun 2024 08:40:30 +0200 Subject: [PATCH 2/3] fix --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ae3cef40..a69e176b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ ## Next +- recording: fix `screenshotMode` typo ([#143](https://github.com/PostHog/posthog-android/pull/143)) + ## 3.5.0 - 2024-06-11 - chore: change host to new address ([#139](https://github.com/PostHog/posthog-ios/pull/139)) From 90daa3e67bd80faf5da0cde73731d3adda2f4081 Mon Sep 17 00:00:00 2001 From: Manoel Aranda Neto Date: Wed, 12 Jun 2024 08:44:21 +0200 Subject: [PATCH 3/3] fix --- USAGE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/USAGE.md b/USAGE.md index 898009501..659cddc8f 100644 --- a/USAGE.md +++ b/USAGE.md @@ -202,7 +202,7 @@ If any of the breaking changes are blocking you, please [open an issue](https:// Enable `Record user sessions` on the [PostHog project settings](https://us.posthog.com/settings/project-replay#replay). -Requires the iOS SDK version >= [3.3.0-alpha.1](https://github.com/PostHog/posthog-ios/releases/). +Requires the iOS SDK version >= [3.5.0](https://github.com/PostHog/posthog-ios/releases/). Enable the SDK to capture Session Recording.