Repository navigation
chore!: adopt posthog-android 4.0, core 7.0 and posthog-ios 4.0 - #108
Draft
turnipdabeets wants to merge 2 commits into
Draft
turnipdabeets wants to merge 2 commits into
turnipdabeets wants to merge 2 commits into
Conversation
|
6 tasks done
turnipdabeets
force-pushed
the
chore/adopt-native-4.0
branch
from
October 29, 2026 14:23
f370e9e to
1f3982e
Compare
3 of 5 tasks
This branch has not been deployed
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.
Important
Draft until posthog-android 4.0.0 (+ core 7.0.0) and posthog-ios 4.0.0 are released. CI fails until then: the pinned versions don't exist yet. The
TODOs ingradle/libs.versions.tomlandPostHog.apple.ktmark what's left.💡 Motivation and Context
Adopts the native 4.0 majors (PostHog/posthog-android#871, PostHog/posthog-ios#873), which send events through capture v1. KMP has no HTTP code of its own, so the native bump is all it takes to move Android, JVM and Apple targets to v1. JS/Wasm use posthog-js and are unaffected.
Code changes for the 4.0 API:
macosMinimumDeploymentTarget10.15 → 11.0debouncerDelayMs→throttleDelayMs(Android)coreConfig.apiKey→projectToken(JVM)reloadFeatureFlagsWithCallback { _ -> … }(Apple)sessionReplayConfig.screenshotMode(iOS)screenshotKDoc now says Android onlyPostHogFeatureFlagsCallback, trailingoptionsargumentStill to do before merging:
.swiftpm-locks/.../Package.resolvedagainst the 4.0.0 tag.$lib/$lib_versionfrom properties and reads them from thePostHog-Sdk-Infoheader, which comes from a Swift-only global KMP can't set. Today every Apple event would report asposthog-ios. Once posthog-ios adds an ObjC setter, call it inplatformSetup, remove the$libstamping, and makePostHogAppleTestassert on the sent request (it currently checks insidebeforeSend, so it passes either way). Android/JVM are fine:sdkName/sdkVersionalready feed the header.throttleDelayMsand deprecateSessionRecordingConfig.debouncerDelayMs.💚 How did you test it?
Built against the unreleased 4.0 branches (Android/core from a local Maven repo, posthog-ios via
localSwiftPackage):jvmTest72/72,testAndroidHostTest54/54,iosSimulatorArm64Test45/45,macosArm64Test45/45, detekt, and the sample app builds.$libgap above.Not yet: the E2E harness against a live project, and remote SwiftPM resolution (no 4.0.0 tag).
📝 Checklist
If releasing new changes
pnpm changeto generate a change intent file🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Claude Code (Claude Opus 5.5) built KMP against the merged 4.0 stacks of both native SDKs, fixed each compile and test failure, and found the iOS
$libgap with a stub-server run. The ObjC setter is left as a TODO because it doesn't exist in posthog-ios yet.🤖 Generated with Claude Code