[CI] (6fb03e7) swift/hackers-ios#1493
Closed
wizard-ci-bot[bot] wants to merge 1 commit into
Closed
Conversation
Author
PR Evaluation ReportSummaryThis PR integrates PostHog analytics into a Swift iOS Hacker News client app. It adds the PostHog iOS SDK via SPM, initializes it in the SwiftUI app entry point using environment variables, and instruments 13 events across authentication, feed, comments, onboarding, and in-app purchases.
Confidence score: 5/5 🧙
File changes
App sanity check ✅
IssuesNo critical or medium issues with app sanity.
|
| Criteria | Result | Description |
|---|---|---|
| PostHog SDKs installed | Yes | posthog-ios added via SPM in project.pbxproj with PBXBuildFile, XCSwiftPackageProductDependency, and XCRemoteSwiftPackageReference; also added to 4 feature Package.swift files |
| PostHog client initialized | Yes | PostHogConfig(apiKey:host:) + PostHogSDK.shared.setup(config) in SwiftUI App.init() with captureApplicationLifecycleEvents = true |
| capture() | Yes | 13 meaningful capture calls across 5 view models |
| identify() | Yes | PostHogSDK.shared.identify(username) on login, PostHogSDK.shared.reset() on logout |
| Error tracking | No | No error/exception tracking configured |
| Reverse proxy | N/A | iOS mobile app — reverse proxy only applies to browser-based PostHog JS |
Issues
- No error tracking setup: The integration lacks any
captureExceptionor error tracking configuration. PostHog iOS SDK supports exception autocapture — this should be enabled via config. [MEDIUM] - Stale SDK minimum version: All Package.swift files and project.pbxproj specify
from: "3.0.0"/minimumVersion = 3.0.0, but the latest posthog-ios release is ~3.58.0. Per framework rules, the minimum version should reflect a recent release to avoid pulling outdated SDK versions. [MEDIUM]
Other completed criteria
- API key loaded from environment variable via
PostHogEnvenum withProcessInfo.processInfo.environment— matches framework pattern - Host correctly configured via environment variable, set to
https://us.i.posthog.comin scheme PostHogEnvenum follows the prescribed pattern withprojectTokenandhostcases,fatalErroron missing values- Three distinct SPM objects in project.pbxproj with unique UUIDs (PBXBuildFile, XCSwiftPackageProductDependency, XCRemoteSwiftPackageReference)
PostHogSDK.shared.reset()called on logout before clearing state
PostHog insights and events ⚠️
| Filename | PostHog events | Description |
|---|---|---|
LoginViewModel.swift |
user_logged_in, login_failed, user_logged_out |
Auth flow tracking with identify on login, reset on logout |
OnboardingCoordinator.swift |
onboarding_completed |
Tracks onboarding completion with app_version |
FeedViewModel.swift |
post_upvoted, feed_category_changed, bookmark_toggled, search_performed |
Core feed engagement tracking with post details and search context |
CommentsViewModel.swift |
post_upvoted, comment_upvoted, bookmark_toggled |
Comment-level engagement with source differentiation |
SupportViewModel.swift |
purchase_completed, purchase_failed |
IAP tracking with product details and error context |
Issues
- PII in event properties:
user_logged_inevent includes"username": usernameas an event property. Username is PII and should only be set via person properties (which is already done correctly viaidentify()). Removeusernamefrom thecapture()properties dict. [MEDIUM]
Other completed criteria
- Events represent real user actions across all core app flows (auth, feed, comments, purchases, onboarding)
- Events enable product insights — login funnel, engagement trends, search analysis, purchase conversion
- Events enriched with contextual properties (post_id, post_title, category, source, result_count, product details)
- Event names are descriptive and use consistent snake_case convention
login_failedcorrectly omits username to avoid leaking credentials on error pathssourceproperty differentiates feed vs comments context forpost_upvotedandbookmark_toggled
Reviewed by wizard workbench PR evaluator
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.
Automated wizard CI run
Source: scheduled
Trigger ID:
6fb03e7App:
swift/hackers-iosApp directory:
apps/swift/hackers-iosWorkbench branch:
wizard-ci-6fb03e7-swift-hackers-iosWizard branch:
mainContext Mill branch:
mainPostHog (MCP) branch:
masterTimestamp: 2026-05-13T17:56:03.186Z
Duration: 594.7s