Skip to content

Commit 8c4961b

Browse files
authored
feat: add new iOS session replay configuration (#317)
* feat: add new iOS session replay configuration * fix: assign config * fix: format * chore: prepare release
1 parent f84ce2f commit 8c4961b

File tree

4 files changed

+34
-1
lines changed

4 files changed

+34
-1
lines changed

posthog-react-native/CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# Next
22

3+
# 3.4.0 - 2024-11-26
4+
5+
1. feat: automatically mask out user photos and sandboxed views like photo picker (iOS Only)
6+
1. To disable masking set `maskAllSandboxedViews` and `maskPhotoLibraryImages` to false
7+
8+
```js
9+
export const posthog = new PostHog(
10+
'apiKey...',
11+
sessionReplayConfig: {
12+
maskAllSandboxedViews: false,
13+
maskPhotoLibraryImages: false,
14+
);
15+
```
16+
317
# 3.3.14 - 2024-11-21
418
519
1. fix: identify method allows passing a $set_once object

posthog-react-native/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "posthog-react-native",
3-
"version": "3.3.14",
3+
"version": "3.4.0",
44
"main": "lib/posthog-react-native/index.js",
55
"files": [
66
"lib/"

posthog-react-native/src/posthog-rn.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,8 @@ export class PostHog extends PostHogCore {
300300
const {
301301
maskAllTextInputs = true,
302302
maskAllImages = true,
303+
maskAllSandboxedViews = true,
304+
maskPhotoLibraryImages = true,
303305
captureLog = true,
304306
captureNetworkTelemetry = true,
305307
iOSdebouncerDelayMs = 1000,
@@ -309,6 +311,8 @@ export class PostHog extends PostHogCore {
309311
const sdkReplayConfig = {
310312
maskAllTextInputs,
311313
maskAllImages,
314+
maskAllSandboxedViews,
315+
maskPhotoLibraryImages,
312316
captureLog,
313317
captureNetworkTelemetry,
314318
iOSdebouncerDelayMs,

posthog-react-native/src/types.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,21 @@ export type PostHogSessionReplayConfig = {
6060
* Default: true
6161
*/
6262
maskAllImages?: boolean
63+
/**
64+
* Enable masking of all sandboxed system views
65+
* These may include UIImagePickerController, PHPickerViewController and CNContactPickerViewController
66+
* iOS only
67+
* Experimental support
68+
* Default: true
69+
*/
70+
maskAllSandboxedViews?: boolean
71+
/**
72+
* Enable masking of images that likely originated from user's photo library
73+
* Experimental support (UIKit only)
74+
* iOS only
75+
* Default: true
76+
*/
77+
maskPhotoLibraryImages?: boolean
6378
/**
6479
* Enable capturing of logcat as console events
6580
* Android only

0 commit comments

Comments
 (0)