Repository navigation
chore: show capture options and captureAi in the example apps - #985
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dustinbyrne
approved these changes
Oct 28, 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.
💡 Motivation and Context
Stacked on #938. The example apps already send through capture v1, since it's the SDK's only route on that branch. This PR adds examples for the two capture APIs that are new in 4.0:
capture(..., options: ["process_person_profile": false]).captureAi("$ai_generation", ...)with typical$ai_*properties and prints the returned UUID.captureWithEvent:...:timestamp:options:andcaptureAiWithEvent:...:options:, so the example build also compiles the new Objective-C selectors.The rest of 4.0's API changes were already in the examples:
projectToken,onFeatureFlags,PostHogFeatureFlagsLoadedinreloadFeatureFlagscallbacks, and thePostHogConsoleLog*renames. No example uses a removed API.💚 How did you test it?
PostHogExampleandPostHogObjCExamplebuild forgeneric/platform=ios.PostHogExampleon an iOS simulator: the launch$screenevent was queued and sent ("capture sent successfully" in the debug log). I didn't tap the new buttons.swiftformat --lintandswiftlintpass on the changed Swift file.📝 Checklist
🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Built with Claude Code. Checked the example apps against the 4.0 changesets for removed APIs (none were still in use) and added coverage only for the new capture APIs. No changeset, since only the example apps changed.
🤖 Generated with Claude Code