Add PostHog analytics to replace removed Firebase

Wire PostHog iOS SDK into existing EventLogger pattern so all 60+
call sites flow to self-hosted PostHog instance with zero changes.
Sets subscription person properties for segmentation on foreground.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Trey t
2026-02-10 13:57:30 -06:00
parent 7cb5bdfb40
commit a08d0d33c0
4 changed files with 69 additions and 4 deletions

View File

@@ -291,6 +291,7 @@
name = "Feels (iOS)";
packageProductDependencies = (
1C9566432EF8F5F70032E68F /* Algorithms */,
1CA00002300000000000002A /* PostHog */,
);
productName = "Feels (iOS)";
productReference = 1CD90AF5278C7DE0001C4FEA /* Feels.app */;
@@ -442,6 +443,7 @@
mainGroup = 1CD90AE5278C7DDF001C4FEA;
packageReferences = (
1C9566402EF8F4D30032E68F /* XCRemoteSwiftPackageReference "swift-algorithms" */,
1CA00001300000000000001A /* XCRemoteSwiftPackageReference "posthog-ios" */,
);
productRefGroup = 1CD90AF6278C7DE0001C4FEA /* Products */;
projectDirPath = "";
@@ -1126,6 +1128,14 @@
version = 0.2.1;
};
};
1CA00001300000000000001A /* XCRemoteSwiftPackageReference "posthog-ios" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/PostHog/posthog-ios";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 3.0.0;
};
};
/* End XCRemoteSwiftPackageReference section */
/* Begin XCSwiftPackageProductDependency section */
@@ -1134,6 +1144,11 @@
package = 1C9566402EF8F4D30032E68F /* XCRemoteSwiftPackageReference "swift-algorithms" */;
productName = Algorithms;
};
1CA00002300000000000002A /* PostHog */ = {
isa = XCSwiftPackageProductDependency;
package = 1CA00001300000000000001A /* XCRemoteSwiftPackageReference "posthog-ios" */;
productName = PostHog;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = 1CD90AE6278C7DDF001C4FEA /* Project object */;