Skip to content

Commit 0312672

Browse files
authored
feat(docs): drop a note for iOS26 swiftui view masking (#14088)
1 parent 81c5654 commit 0312672

File tree

3 files changed

+29
-0
lines changed

3 files changed

+29
-0
lines changed

contents/docs/session-replay/_snippets/ios-installation.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ export const EnableSessionReplayLight = "https://res.cloudinary.com/dmukukwp6/im
1010
> - Requires PostHog iOS SDK version >= [3.6.0](https://github.com/PostHog/posthog-ios/releases), and it's recommended to always use [the latest version](/docs/sdk-doctor).
1111
> - Session replay is currently only available on iOS. For future macOS support, please follow and upvote [this GitHub issue](https://github.com/PostHog/posthog-ios/issues/200).
1212
13+
<CalloutBox title="Xcode 26" type="caution" icon="IconWarning">
14+
15+
SwiftUI rendering behavior changed for apps built with Xcode 26 (when running on iOS 26).
16+
If you're building with Xcode 26, please use PostHog iOS SDK version &gt;= [3.36.1](https://github.com/PostHog/posthog-ios/releases/tag/3.36.1), which includes a partial fix for this issue.
17+
18+
</CalloutBox>
19+
1320
## Step two: Enable session recordings in your project settings
1421

1522
Enable session recordings in your PostHog [Project Settings](https://app.posthog.com/project/settings).

contents/docs/session-replay/_snippets/ios-privacy.mdx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,21 @@ imvProfilePhoto.accessibilityIdentifier = "ph-no-capture"
2626
.postHogNoMask()
2727
```
2828

29+
30+
<CalloutBox title="SwiftUI and Xcode 26" type="caution" icon="IconInfo">
31+
32+
SwiftUI rendering behavior changed for apps built with Xcode 26 (including when running on iOS 26).
33+
This affects how SwiftUI maps to UIKit. As a result, the view modifiers `postHogMask()` and `postHogNoMask()` may behave inconsistently for primitive SwiftUI views like `Text`, `Image`, and `Button`.
34+
35+
If you rely on these modifiers for privacy, we recommend validating masking after upgrading Xcode:
36+
37+
- Text inputs like `TextField`, `TextEditor`, `SecureField` and custom views are not affected by this change.
38+
- For primitive views, try masking a parent view instead.
39+
- Use `ph-no-capture` tagging for UIKit-backed views.
40+
- Stop and restart session recording around sensitive screens.
41+
42+
</CalloutBox>
43+
2944
### Handling sensitive third-party screens
3045

3146
Third-party components (like payment forms or authentication screens) are often rendered in separate view hierarchies that can't be accessed or modified for masking.

contents/docs/session-replay/installation/ios.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ import IOSInstall from "../../integrate/_snippets/install-ios.mdx"
1111
export const EnableSessionReplayDark = "https://res.cloudinary.com/dmukukwp6/image/upload/posthog.com/contents/images/docs/session-replay/enable-session-replay-in-project-settings-dark-mode.png"
1212
export const EnableSessionReplayLight = "https://res.cloudinary.com/dmukukwp6/image/upload/posthog.com/contents/images/docs/session-replay/enable-session-replay-in-project-settings-light-mode.png"
1313

14+
<CalloutBox title="Xcode 26" type="caution" icon="IconWarning">
15+
16+
SwiftUI rendering behavior changed for apps built with Xcode 26 (when running on iOS 26).
17+
If you're building with Xcode 26, please use PostHog iOS SDK version &gt;= [3.36.1](https://github.com/PostHog/posthog-ios/releases/tag/3.36.1), which includes a partial fix for this issue.
18+
19+
</CalloutBox>
20+
1421
<Steps>
1522

1623
<Step title="Add PostHog to your app" badge="required">

0 commit comments

Comments
 (0)