Repository navigation
Immutable
release. Only release title and notes can be modified.
3.0.0
Major Changes
- #5194
c4fb72aThanks @turnipdabeets! - Release@posthog/react-native-plugin3.0. See the migration guide for upgrade steps- Breaking: require React Native 0.75 or later
- Breaking: require iOS 15 or later and macOS 12 or later
- Breaking: require posthog-ios 4.2.2 or a later 4.2.x version, which needs Xcode 26
- Breaking: require posthog-android 4.2.3 or a later 4.2.x version
- Fail the Android build instead of crashing at runtime when another dependency would raise
posthog-androidpast 4.2.x - Breaking: resolve posthog-ios through Swift Package Manager instead of CocoaPods trunk and ignore the
posthog.useSpmPodfile property - Breaking: fail
pod installfor Podfiles that also includeposthog-react-native-session-replayor thePostHogpod — remove them - Breaking: fail
pod installfor Podfiles that usegenerate_multiple_pod_projects,deduplicate_targets => false, or plugin targets with different platforms oruse_frameworks!linkage - Breaking: require posthog-react-native 4.88.4 or later, and read the project token in
setup()only fromprojectToken, not the deprecatedapiKey. With an older posthog-react-native, native PostHog stays off and the plugin logs an error - Breaking: remove the legacy
start()method — callsetup()instead - Breaking: ignore
iOSdebouncerDelayMsandandroidDebouncerDelayMswhen callingsetup()directly — passthrottleDelayMsinstead - Breaking: send native iOS and Android events (crash reports, fatal JavaScript errors, iOS rage clicks, push notification opens) to capture v1 (
/i/v1/analytics/events) withAuthorization: Bearer <projectToken>, replacing anyAuthorizationfromrequestHeaders— serve this path on reverse proxies and self-hosted instances - Breaking: drop native events when a proxy redirects them, other than with a 307 or 308 to the same origin as
host - Breaking: drop native events whose distinct ID is empty, whitespace-only or over 200 bytes, instead of shortening the ID
- Breaking: omit
nullproperty values from native iOS events and keepnulllist elements in native Android events - Breaking: report
$localeon native events as the device's preferred language, as a full language tag with region, such asde-CHinstead ofde, and ashe,idandyiinstead of the legacyiw,inandjion Android. On iOS, an English-only app on a French device sendsfr-FRinstead ofen - Breaking: ignore
screenshotModeBackgroundCaptureon iOS, because posthog-ios 4.0 removed background screenshot capture. Remove it, or setiOSCaptureMethod: 'gpu' - Always record session replay as masked screenshots on iOS and Android, the mode the plugin already used
- Apply the project's mobile session replay masking setting on iOS and Android, which can add text and image masking but never remove it
- Add
PosthogReactNativePlugin.addBeforeSendin Swift and Kotlin to filter or edit events the native SDKs send, such as crash reports from the previous launch, which the JSbefore_sendnever sees - Load the native module as a TurboModule on React Native's New Architecture, and keep loading it as a bridge module on the old architecture
- Add
iOSCaptureMethod('standard'or experimental'gpu') to choose how iOS captures replay screenshots, set throughposthog-react-native'ssessionReplayConfig(4.89.0+) - Add
setSessionReplayMinimumDuration - Send the language set with
posthog-react-native'ssetAppLanguage()(4.86.0+) as$app_languageon native events - Gzip
posthog-react-native's (5.0+) analytics, AI and log requests natively on iOS and Android, off the JS thread - Wait on iOS for a fatal JS exception's request before React Native aborts the app, so the next launch doesn't send the exception again
- Leave
$is_identifiedoff an iOS fatal JS exception whenposthog-react-nativesends it asnull, as on Android, instead of sendingnull - Pause iOS native uploads (session replay, native crash reports) while the device is on cellular and cellular data is turned off for the app, instead of sending requests that fail
- Wait at most 30 seconds on
Retry-Afterfor session replay and native uploads, and double the wait after each failed upload up to 30 seconds - Drop native crashes recorded while the user was opted out instead of sending them after
optIn() - Mark iOS native crash frames from dynamic frameworks, such as Hermes, as not in-app, so some native crash issues may be grouped again once
- Keep iOS secure text inputs masked inside
ph-no-maskviews, and stop recording touches insideph-no-captureviews on Android, as on iOS since 2.13.2 - Stop bundling posthog-ios's native surveys in apps that use React Native's Swift Package Manager integration (2026-12-01)