Repository navigation
fix(mobile): use projectToken instead of deprecated apiKey - #425
Merged
Merged
Conversation
posthog-ios 3.56.0, posthog-android 3.72.0 and posthog-kmp 0.8.0 renamed the config's apiKey to projectToken and deprecated the old name. The Swift commandment, the KMP integration skill and the Swift/Android example apps still taught apiKey, so wizard runs wrote deprecated code. Bump the example apps to SDK versions that have projectToken. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
🧙 Wizard CIRun the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands: Test all apps:
Test all apps in a directory:
Test an individual app:
Show more apps
Test against a wizard branch:
Add Results will be posted here when complete. |
gewenyu99
approved these changes
Oct 12, 2026
This was referenced Nov 6, 2026
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.
Problem
posthog-ios 3.56.0, posthog-android 3.72.0 and posthog-kmp 0.8.0 renamed the config's
apiKeytoprojectTokenand deprecated the old name. The Swift commandment, the KMP integration skill and the Swift/Android example apps still taughtapiKey, so every wizard run on these platforms writes code that compiles with a deprecation warning and will break when the old name is removed in the next major.Changes
commandments.yamlSwift rule, both Swift example apps and their READMEs usePostHogConfig(projectToken:host:). Theswiftexample's posthog-ios requirement goes from3.0.0to3.56.0(first release withprojectToken); Package.resolved refreshed 3.40.0 → 3.92.0.swift-xcodegenalready required 3.64.1.PostHogAndroidConfig(projectToken = ...); posthog-android bumped 3.31.0 → 3.72.1. The example'sposthog.apiKeylocal property is renamed toposthog.projectTokento match.description-kmp-docs-only.mdusesPostHogConfig(projectToken = ...). It already tells the agent to install the latest version, so no pin to change.The matching KMP line in the wizard's
kmp-wizard-agent.tsis fixed in a companion wizard PR.Testing
swift-xcodegenviaxcodegen generate)../gradlew :app:compileDebugKotlinpasses with no warnings.Related: PostHog/wizard#1439
🤖 Generated with Claude Code