Repository navigation
feat!: mark frames from other frameworks as not in-app by default - #1087
Merged
turnipdabeets merged 1 commit intoNov 16, 2026
Merged
Conversation
Change errorTrackingConfig.inAppByDefault to false, so only frames from the app's executable and inAppIncludes are in-app. Third-party dynamic frameworks no longer show up as app code. Matches Android, which only marks the app's own package as in-app.
PR overviewNo security issues were found in this pull request. Reviews
|
marandaneto
approved these changes
Nov 16, 2026
Contributor
posthog-ios Compliance ReportDate: 2026-11-16T17:03:20.461850+00:00 ✅ All Tests Passed!234/234 tests passed Capture_V1 Tests✅ 106/106 tests passed View Details
Capture_Ai_V1 Tests✅ 111/111 tests passed View Details
Feature_Flags Tests✅ 17/17 tests passed View Details
|
8 of 20 tasks
turnipdabeets
added a commit
to PostHog/posthog-kmp
that referenced
this pull request
Nov 17, 2026
posthog-ios 4.0 (PostHog/posthog-ios#1087) defaults inAppByDefault to false. KMP only sent its own default (true) when errorTracking was set, so apps without it would mark Kotlin frames in a dynamic framework as not in-app. Always send the KMP value, as Flutter does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
💡 Motivation and Context
From @marandaneto's suggestion on #1084, for 4.0.
Today any binary that isn't a known system framework counts as in-app, so third-party frameworks show up in error tracking as the app's own code. This changes
errorTrackingConfig.inAppByDefaultfromtruetofalse. Frames are then in-app only when they come from the app's executable or a binary ininAppIncludes. The bundle ID and executable name are already added toinAppIncludesautomatically.That's Android's rule: it adds the app's package name to
inAppIncludes, and nothing else is in-app.What it doesn't cover: iOS matches on the binary, not the Swift module. Code linked statically into the app, which is most Swift packages and 4.0's default, is part of the app's executable and stays in-app. Telling third-party code apart inside one binary would need the Swift module name from symbols, which stripped builds don't have on the client. So this mainly affects dynamic frameworks: binary XCFrameworks and dynamically linked pods.
Changes
inAppByDefaultdefaults tofalse, and its doc comment explains what is and isn't in-app.MIGRATION.md.usesInAppByDefaulttest.Who's affected:
inAppIncludes, or setinAppByDefault = trueto go back to 3.x.x behavior.nativeAutocaptureon. The plugin doesn't setinAppByDefault, so native crash frames from dynamic frameworks such as Hermes become not in-app.inAppByDefault(defaulttrue) to the iOS SDK.💚 How did you test it?
make testwith the error-tracking suites (stack trace, caller stack, crash report, memory exception, exception processor): 78 tests pass.swiftlintandswiftformat --lintpass on the changed files, andgit diff --checkis clean.PostHogMemoryExceptionReporterTest) already setsinAppByDefault = false.📝 Checklist
If releasing new changes
pnpm changesetto generate a changeset file🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Claude Code (Opus 5.5), directed by @turnipdabeets. Compared Android's and Flutter's in-app rules and cymbal's fingerprinting before choosing to change only the default. Leaving include/exclude precedence alone (iOS: includes win, Android: excludes win) to keep this to one behavior change. The generated
references/docs update on release.🤖 Generated with Claude Code