Repository navigation
docs(react-native): document @posthog/react-native-plugin 3.0 requirements - #20922
turnipdabeets wants to merge 3 commits into
Conversation
Deploy preview
Changed pages
|
|
Vale prose linter → found 2 errors, 58 warnings, 10 suggestions in your markdown Full report → Copy the linter results into an LLM to batch-fix issues. Linter being weird? Update the rules!
|
| Line | Severity | Message | Rule |
|---|---|---|---|
| 19:705 | warning | Use 'X' instead of 'x'. | Vale.Terms |
| 21:41 | error | 'native' is repeated! | Vale.Repetition |
contents/docs/libraries/react-native/index.mdx — 0 errors, 52 warnings, 10 suggestions
| Line | Severity | Message | Rule |
|---|---|---|---|
| 6:18 | warning | Use 'GitHub' instead of 'github'. | Vale.Terms |
| 6:37 | warning | Use 'PostHog' instead of 'posthog'. | Vale.Terms |
| 33:82 | warning | Capitalize 'Session Replay' for PostHog's product. Use 'session replay' for the general industry concept. | PostHogBase.ProductNames |
| 42:97 | warning | Use 'X' instead of 'x'. | Vale.Terms |
| 47:6 | warning | 'CocoaPods' heading should be in sentence case, and product names should be capitalized. | PostHogBase.SentenceCase |
| 56:12 | warning | 'podspec' is a possible misspelling. | PostHogBase.Spelling |
| 56:142 | warning | 'podspec' is a possible misspelling. | PostHogBase.Spelling |
| 58:1 | warning | 'CocoaPods with *********** through Swift Package Manager' heading should be in sentence case, and product names should be capitalized. | PostHogBase.SentenceCase |
| 60:55 | warning | Use 'X' instead of 'x'. | Vale.Terms |
| 85:6 | warning | 'Full Swift Package Manager' heading should be in sentence case, and product names should be capitalized. | PostHogBase.SentenceCase |
| 97:243 | warning | 'podspec's' is a possible misspelling. | PostHogBase.Spelling |
| 118:168 | warning | Capitalize 'Experiments' for PostHog's product. Use 'experiments' for the general industry concept. | PostHogBase.ProductNames |
| 119:125 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. | PostHogBase.ProductNames |
| 121:157 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. | PostHogBase.ProductNames |
| 130:254 | warning | 'Backgrounded' is a possible misspelling. | PostHogBase.Spelling |
| 131:171 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. | PostHogBase.ProductNames |
| 132:129 | warning | Capitalize 'Session Replay' for PostHog's product. Use 'Session replay' for the general industry concept. | PostHogBase.ProductNames |
| 133:109 | warning | Capitalize 'Session Replay' for PostHog's product. Use 'Session replay' for the general industry concept. | PostHogBase.ProductNames |
| 135:150 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. | PostHogBase.ProductNames |
| 139:171 | suggestion | Address the reader directly. Use 'you' instead of 'the user'. | PostHogDocs.DirectAddress |
| 167:19 | warning | 'Backgrounded' is a possible misspelling. | PostHogBase.Spelling |
| 167:78 | suggestion | Address the reader directly. Use 'you' instead of 'the user'. | PostHogDocs.DirectAddress |
| 170:24 | suggestion | Address the reader directly. Use 'you' instead of 'the user'. | PostHogDocs.DirectAddress |
| 171:42 | suggestion | Address the reader directly. Use 'you' instead of 'the user'. | PostHogDocs.DirectAddress |
| 208:119 | suggestion | Address the reader directly. Use 'you' instead of 'the user'. | PostHogDocs.DirectAddress |
| 321:303 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. | PostHogBase.ProductNames |
| 325:5 | warning | '$set' heading should be in sentence case, and product names should be capitalized. | PostHogBase.SentenceCase |
| 331:5 | warning | '$set_once' heading should be in sentence case, and product names should be capitalized. | PostHogBase.SentenceCase |
| 333:75 | suggestion | Address the reader directly. Use 'you' instead of 'the user'. | PostHogDocs.DirectAddress |
| 356:49 | suggestion | Address the reader directly. Use 'you' instead of 'the user'. | PostHogDocs.DirectAddress |
| 358:23 | suggestion | Address the reader directly. Use 'you' instead of 'the user'. | PostHogDocs.DirectAddress |
| 370:69 | warning | Avoid trivializing words. 'simply' can sound dismissive to the reader. | PostHogDocs.Trivializers |
| 407:10 | suggestion | Address the reader directly. Use 'you' instead of 'the user'. | PostHogDocs.DirectAddress |
| 407:94 | suggestion | Address the reader directly. Use 'you' instead of 'the user'. | PostHogDocs.DirectAddress |
| 407:103 | warning | Capitalize 'Logs' for PostHog's product. Use 'logs' for the general industry concept. | PostHogBase.ProductNames |
| 478:17 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. | PostHogBase.ProductNames |
| 480:89 | warning | 'refetches' is a possible misspelling. | PostHogBase.Spelling |
| 511:8 | warning | Capitalize 'Experiments' for PostHog's product. Use 'experiments' for the general industry concept. | PostHogBase.ProductNames |
| 511:55 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. | PostHogBase.ProductNames |
| 511:128 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. | PostHogBase.ProductNames |
| 513:28 | warning | Capitalize 'Experiments' for PostHog's product. Use 'experiments' for the general industry concept. | PostHogBase.ProductNames |
| 513:54 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. | PostHogBase.ProductNames |
| 521:4 | warning | Capitalize 'Error Tracking' for PostHog's product. Use 'Error tracking' for the general industry concept. | PostHogBase.ProductNames |
| 521:4 | warning | 'Error tracking' heading should be in sentence case, and product names should be capitalized. | PostHogBase.SentenceCase |
| 523:11 | warning | Capitalize 'Error Tracking' for PostHog's product. Use 'error tracking' for the general industry concept. | PostHogBase.ProductNames |
| 523:52 | warning | Capitalize 'Error Tracking' for PostHog's product. Use 'error tracking' for the general industry concept. | PostHogBase.ProductNames |
| 552:132 | warning | 'symbolication' is a possible misspelling. | PostHogBase.Spelling |
| 589:163 | warning | Capitalize 'Logs' for PostHog's product. Use 'logs' for the general industry concept. | PostHogBase.ProductNames |
| 632:12 | warning | Capitalize 'Logs' for PostHog's product. Use 'logs' for the general industry concept. | PostHogBase.ProductNames |
| 636:4 | warning | Capitalize 'Session Replay' for PostHog's product. Use 'Session replay' for the general industry concept. | PostHogBase.ProductNames |
| 636:4 | warning | 'Session replay' heading should be in sentence case, and product names should be capitalized. | PostHogBase.SentenceCase |
| 638:12 | warning | Capitalize 'Session Replay' for PostHog's product. Use 'session replay' for the general industry concept. | PostHogBase.ProductNames |
| 638:74 | warning | Avoid trivializing words. 'all you need to do' can sound dismissive to the reader. | PostHogDocs.Trivializers |
| 638:133 | warning | Capitalize 'Session Replay' for PostHog's product. Use 'Session replay' for the general industry concept. | PostHogBase.ProductNames |
| 642:11 | warning | Capitalize 'Surveys' for PostHog's product. Use 'surveys' for the general industry concept. | PostHogBase.ProductNames |
| 652:62 | warning | Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. | PostHogBase.ProductNames |
| 652:100 | warning | Capitalize 'Surveys' for PostHog's product. Use 'surveys' for the general industry concept. | PostHogBase.ProductNames |
| 654:126 | warning | Capitalize 'Logs' for PostHog's product. Use 'logs' for the general industry concept. | PostHogBase.ProductNames |
| 714:128 | warning | Use 'X' instead of 'x'. | Vale.Terms |
| 732:25 | warning | Capitalize 'Session Replay' for PostHog's product. Use 'session replay' for the general industry concept. | PostHogBase.ProductNames |
| 734:22 | warning | Capitalize 'Session Replay' for PostHog's product. Use 'session replay' for the general industry concept. | PostHogBase.ProductNames |
| 736:4 | warning | 'Upgrading from V1, V2 to V3 or V3 to V4' heading should be in sentence case, and product names should be capitalized. | PostHogBase.SentenceCase |
contents/docs/session-replay/installation/react-native.mdx — 1 errors, 5 warnings, 0 suggestions
| Line | Severity | Message | Rule |
|---|---|---|---|
| 22:39 | warning | Use 'X' instead of 'x'. | Vale.Terms |
| 27:41 | error | 'native' is repeated! | Vale.Repetition |
| 31:6 | warning | Capitalize 'Session Replay' for PostHog's product. Use 'session replay' for the general industry concept. | PostHogBase.ProductNames |
| 31:27 | warning | 'janky' is a possible misspelling. | PostHogBase.Spelling |
| 31:88 | warning | 'iPhones' is a possible misspelling. | PostHogBase.Spelling |
| 31:280 | warning | Use 'X' instead of 'x'. | Vale.Terms |
Bundle reportTotal JS (gzip)10.44 MiB (no change) Eager graph (modules shipped in each entrypoint's initial chunks)
Largest modules in the
|
| Module | Size |
|---|---|
./src/data/mcp-tools.json |
1451.1 KiB |
css ./node_modules/.pnpm/css-loader@5.2.7_webpack@5.101.3/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[8].oneOf[1].use[1]!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.5.6_webpack@5.101.3/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[8].oneOf[1].use[2]!./src/styles/global.css |
817.2 KiB |
./src/components/Stickers/Stickers.tsx |
696.4 KiB |
./node_modules/.pnpm/@posthog+brand@0.13.0_react@18.3.1/node_modules/@posthog/brand/dist/generated/hoggies/svg/x-ray.mjs |
481.2 KiB |
./node_modules/.pnpm/@posthog+brand@0.13.0_react@18.3.1/node_modules/@posthog/brand/dist/generated/hoggies/svg/trenchcoat.mjs |
450.8 KiB |
./node_modules/.pnpm/rehype-raw@7.0.0/node_modules/rehype-raw/lib/index.js + 29 modules |
395.1 KiB |
./node_modules/.pnpm/@posthog+brand@0.13.0_react@18.3.1/node_modules/@posthog/brand/dist/generated/hoggies/svg/im-the-driver.mjs |
385.8 KiB |
./src/hooks/useCustomers.tsx + 61 modules |
381.8 KiB |
./node_modules/.pnpm/@posthog+brand@0.13.0_react@18.3.1/node_modules/@posthog/brand/dist/generated/hoggies/svg/tourist.mjs |
364.6 KiB |
./node_modules/.pnpm/@posthog+icons@0.36.6_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js |
354.8 KiB |
./node_modules/.pnpm/react-markdown@8.0.7_@types+react@16.14.66_react@18.3.1/node_modules/react-markdown/lib/react-markdown.js + 88 modules |
351.4 KiB |
./src/components/ProductComparisonTable/index.tsx + 130 modules |
314.2 KiB |
./node_modules/.pnpm/framer-motion@14.0.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/components/motion/proxy.mjs + 127 modules |
287.8 KiB |
./node_modules/.pnpm/@posthog+brand@0.13.0_react@18.3.1/node_modules/@posthog/brand/dist/generated/hoggies/svg/doll-house.mjs |
284.1 KiB |
./node_modules/.pnpm/cloudinary-core@2.14.0_lodash@4.17.21/node_modules/cloudinary-core/cloudinary-core.js |
281.9 KiB |
Eager-graph budgets are report-only until a baseline is established. Sizes are gzip of public/**/*.js; eager size is webpack module source bytes for the modules actually shipped in the entrypoint's initial chunks (post-tree-shake).
|
This PR hasn't seen activity in two weeks! Should it be merged, closed, or further worked on? If you want to keep it open, please remove the |
Covers PostHog/posthog-js#5449: posthog-ios always comes from SwiftPM, and screenshotModeBackgroundCapture is ignored on iOS.
There was a problem hiding this comment.
PostHog Review · Standard · reviewed 60a9b00: 3 Should fix.
This is the only automatic review while this pull request is a draft. Comment @posthog review to review new changes sooner. Otherwise, a review of the new changes runs when you mark it ready for review.
See this review and its findings in PostHog Review. Comment @posthog review --deep for a Deep review. A Deep review takes longer and looks deeper than a Standard review.
| On iOS, the plugin now always resolves `posthog-ios` through Swift Package Manager: | ||
|
|
||
| - Remove `"posthog.useSpm"` from `ios/Podfile.properties.json` if you set it. The plugin no longer reads it. | ||
| - The plugin no longer needs `use_frameworks! :linkage => :dynamic`. Keep it only if another dependency needs it. |
There was a problem hiding this comment.
P2 · Preserve the opt-in Swift Package Manager configuration
For apps using the hybrid path, removing posthog.useSpm switches dependency resolution back to CocoaPods. The plugin podspec still reads this property and defaults to s.dependency 'PostHog'; the referenced 4.0 update only changes its version pin. Removing dynamic frameworks also violates the hybrid path's requirements. Retain both settings and correct the path descriptions.
There was a problem hiding this comment.
Not changing: posthog-js #5449 drops posthog.useSpm from the podspec and always calls spm_dependency (CI now covers static libraries and dynamic frameworks), so 3.0 no longer reads the property or needs dynamic frameworks.
|
|
||
| `@posthog/react-native-plugin` 3.0 uses `posthog-ios` 4.0 and requires: | ||
|
|
||
| - React Native 0.75 or later |
There was a problem hiding this comment.
P2 · Document React Native 0.71 as the plugin minimum
For apps on React Native 0.71–0.74, this requirement incorrectly rules out plugin 3.0 and directs users toward an unnecessary framework upgrade. The upstream plugin's package.json declares react-native: >=0.71; 0.75 is the requirement for the optional spm_dependency integration. Use 0.71 for the plugin minimum across all three pages.
There was a problem hiding this comment.
Not changing: posthog-js #5449 raises the plugin peerDependency to react-native: >=0.75 and the podspec raises an error below 0.75, since spm_dependency is now mandatory.
|
|
||
| Apps that use the plugin only through `posthog-react-native` need no code changes. If your code calls the plugin directly: | ||
|
|
||
| - Call `setup()` instead of the removed `start()` method. |
There was a problem hiding this comment.
P2 · Explain the new setup argument structure
For direct callers of start(sessionId, sdkOptions, sdkReplayConfig, decideReplayConfig), renaming the method leaves an incompatible call. setup() accepts three arguments and reads replay settings under pluginConfig.sessionReplay, with enabled defaulting to false. TypeScript rejects the old call, and JavaScript disables replay; document the nested configuration with enabled: true.
There was a problem hiding this comment.
Fixed in ed38281: the 3.0 upgrade section now shows the setup(sessionId, sdkOptions, { sessionReplay: { enabled: true, sdkReplayConfig, decideReplayConfig } }) replacement and notes enabled defaults to false.
…art() callers Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Changes
Documents
@posthog/react-native-plugin3.0 (PostHog/posthog-js#5194, with PostHog/posthog-js#5237, PostHog/posthog-js#5236 and PostHog/posthog-js#5449), which adopts posthog-ios 4.0 (PostHog/posthog-ios#873):@posthog/react-native-plugin3.0" section: no code changes for apps that use the plugin throughposthog-react-native. Direct callers switch fromstart()tosetup()and passthrottleDelayMs.posthog-iosthrough Swift Package Manager (chore(react-native-plugin)!: resolve posthog-ios through Swift Package Manager posthog-js#5449). Theposthog.useSpmhybrid path is marked 2.x only, and the upgrade section says to remove the property, that dynamic frameworks are no longer needed, and to drop the legacyposthog-react-native-session-replaypackage (it pinsposthog-ios3.x).sessionReplayConfig.screenshotModeBackgroundCaptureno longer has an effect on iOS from 3.0; the session replay troubleshooting tip is marked 2.x only.Merge only after
@posthog/react-native-plugin3.0.0 is released. If PostHog/posthog-ios#909 doesn't ship in posthog-ios 4.0, drop the cellular sentence first.Checklist
vercel.json(n/a)🤖 Generated with Claude Code