+
+
+
>
)
}
diff --git a/frontend/src/scenes/onboarding/sdks/sdk-install-instructions/android.tsx b/frontend/src/scenes/onboarding/sdks/sdk-install-instructions/android.tsx
index 103a87f183508..d3bc825f9791a 100644
--- a/frontend/src/scenes/onboarding/sdks/sdk-install-instructions/android.tsx
+++ b/frontend/src/scenes/onboarding/sdks/sdk-install-instructions/android.tsx
@@ -48,13 +48,17 @@ function AndroidSetupSnippet({ includeReplay }: AndroidSetupProps): JSX.Element
config.sessionReplay = true
// choose whether to mask images or text
config.sessionReplayConfig.maskAllImages = false
- config.sessionReplayConfig.maskAllTextInputs = true`
+ config.sessionReplayConfig.maskAllTextInputs = true
+ // screenshot is disabled by default
+ // The screenshot may contain sensitive information, use with caution
+ config.sessionReplayConfig.screenshot = true`
: ''
}
// Setup PostHog with the given Context and Config
PostHogAndroid.setup(this, config)
- }`}
+ }
+}`}
)
}
diff --git a/frontend/src/scenes/onboarding/sdks/sdk-install-instructions/ios.tsx b/frontend/src/scenes/onboarding/sdks/sdk-install-instructions/ios.tsx
index 4b86871452ca0..b8c27bcc683b1 100644
--- a/frontend/src/scenes/onboarding/sdks/sdk-install-instructions/ios.tsx
+++ b/frontend/src/scenes/onboarding/sdks/sdk-install-instructions/ios.tsx
@@ -1,8 +1,13 @@
+import { LemonBanner, Link } from '@posthog/lemon-ui'
import { useValues } from 'kea'
import { CodeSnippet, Language } from 'lib/components/CodeSnippet'
import { apiHostOrigin } from 'lib/utils/apiHost'
import { teamLogic } from 'scenes/teamLogic'
+export interface iOSSetupProps {
+ includeReplay?: boolean
+}
+
function IOSInstallCocoaPodsSnippet(): JSX.Element {
return {'pod "PostHog", "~> 3.0.0"'}
}
@@ -17,7 +22,7 @@ function IOSInstallSPMSnippet(): JSX.Element {
)
}
-function IOSSetupSnippet(): JSX.Element {
+function IOSSetupSnippet({ includeReplay }: iOSSetupProps): JSX.Element {
const { currentTeam } = useValues(teamLogic)
return (
@@ -32,6 +37,21 @@ class AppDelegate: NSObject, UIApplicationDelegate {
let POSTHOG_HOST = "${apiHostOrigin()}"
let config = PostHogConfig(apiKey: POSTHOG_API_KEY, host: POSTHOG_HOST)
+ ${
+ includeReplay
+ ? `
+ // check https://posthog.com/docs/session-replay/mobile#installation
+ // for more config and to learn about how we capture sessions on mobile
+ // and what to expect
+ config.sessionReplay = true
+ // choose whether to mask images or text
+ config.sessionReplayConfig.maskAllImages = false
+ config.sessionReplayConfig.maskAllTextInputs = true
+ // screenshot is disabled by default
+ // The screenshot may contain sensitive information, use with caution
+ config.sessionReplayConfig.screenshotMode = true`
+ : ''
+ }
PostHogSDK.shared.setup(config)
return true
@@ -41,15 +61,26 @@ class AppDelegate: NSObject, UIApplicationDelegate {
)
}
-export function SDKInstallIOSInstructions(): JSX.Element {
+export function SDKInstallIOSInstructions(props: iOSSetupProps): JSX.Element {
return (
<>
+ {props.includeReplay ? (
+
+ 🚧 NOTE: Mobile recording is
+ currently in beta. We are keen to gather as much feedback as possible so if you try this out please
+ let us know. You can send feedback via the{' '}
+
+ in-app support panel
+ {' '}
+ or one of our other support options.
+
+ ) : null}
Install via CocoaPods
Or Install via SPM
Configure
-
+
>
)
}
diff --git a/frontend/src/scenes/onboarding/sdks/session-replay/index.tsx b/frontend/src/scenes/onboarding/sdks/session-replay/index.tsx
index f0e1dee69a6ec..3a5aadfe8909d 100644
--- a/frontend/src/scenes/onboarding/sdks/session-replay/index.tsx
+++ b/frontend/src/scenes/onboarding/sdks/session-replay/index.tsx
@@ -4,6 +4,7 @@ export * from './astro'
export * from './bubble'
export * from './framer'
export * from './html-snippet'
+export * from './ios'
export * from './js-web'
export * from './next-js'
export * from './nuxt'
diff --git a/frontend/src/scenes/onboarding/sdks/session-replay/ios.tsx b/frontend/src/scenes/onboarding/sdks/session-replay/ios.tsx
new file mode 100644
index 0000000000000..0281faeba1d04
--- /dev/null
+++ b/frontend/src/scenes/onboarding/sdks/session-replay/ios.tsx
@@ -0,0 +1,11 @@
+import { SDKInstallIOSInstructions } from '../sdk-install-instructions'
+import { SessionReplayFinalSteps } from '../shared-snippets'
+
+export function iOSInstructions(): JSX.Element {
+ return (
+ <>
+
+
+ >
+ )
+}