Skip to content

Commit

Permalink
add missing capture method for objC with groups overload (#217)
Browse files Browse the repository at this point in the history
* add missing capture method for objC with groups overload

* fix
  • Loading branch information
marandaneto authored Oct 17, 2024
1 parent 4ad3cf1 commit 8ea23bc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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))
Expand Down
12 changes: 11 additions & 1 deletion PostHog/PostHogSDK.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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:)
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 8ea23bc

Please sign in to comment.