diff --git a/CHANGELOG.md b/CHANGELOG.md index 04c79b6..4d44cff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ ## Next +- add missing capture method for objC with groups overload ([#217](https://github.com/PostHog/posthog-ios/pull/217)) + ## 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 2674856..971ab08 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,