From e6cdfdc48827c8c038b0d8c011b5bc09bc3f31b6 Mon Sep 17 00:00:00 2001 From: Manoel Aranda Neto Date: Wed, 16 Oct 2024 17:34:11 +0200 Subject: [PATCH] add missing capture method for objC with groups overload --- CHANGELOG.md | 2 ++ PostHog/PostHogSDK.swift | 12 +++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 04c79b65e..4606d742b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ ## Next +- add missing capture method for objC with groups overload ([#216](https://github.com/PostHog/posthog-ios/pull/216)) + ## 3.13.1 - 2024-10-16 - add optional distinctId parameter to capture methods ([#216](https://github.com/PostHog/posthog-ios/pull/216)) diff --git a/PostHog/PostHogSDK.swift b/PostHog/PostHogSDK.swift index 2674856a6..971ab089e 100644 --- a/PostHog/PostHogSDK.swift +++ b/PostHog/PostHogSDK.swift @@ -475,7 +475,7 @@ let maxRetryDelay = 30.0 } @objc public func capture(_ event: String) { - capture(event, properties: nil, userProperties: nil, userPropertiesSetOnce: nil, groups: nil) + capture(event, distinctId: nil, properties: nil, userProperties: nil, userPropertiesSetOnce: nil, groups: nil) } @objc(captureWithEvent:properties:) @@ -510,6 +510,16 @@ let maxRetryDelay = 30.0 return false } + @objc(captureWithEvent:properties:userProperties:userPropertiesSetOnce:groups:) + public func capture(_ event: String, + properties: [String: Any]? = nil, + userProperties: [String: Any]? = nil, + userPropertiesSetOnce: [String: Any]? = nil, + groups: [String: String]? = nil) + { + capture(event, distinctId: nil, properties: properties, userProperties: userProperties, userPropertiesSetOnce: userPropertiesSetOnce, groups: groups) + } + @objc(captureWithEvent:distinctId:properties:userProperties:userPropertiesSetOnce:groups:) public func capture(_ event: String, distinctId: String? = nil,