Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## Next

- feat: surveys GA ([#381](https://github.com/PostHog/posthog-ios/pull/381))
> Note: Surveys are now enabled by default

## 3.30.1 - 2025-08-12

- fix: map missing content type for Surveys ([#377](https://github.com/PostHog/posthog-ios/pull/377))
Expand Down
5 changes: 1 addition & 4 deletions PostHog/PostHogConfig.swift
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ public typealias BeforeSendBlock = (PostHogEvent) -> PostHogEvent?
#endif

/// Enable mobile surveys
/// Experimental support
///
/// Default: false
///
Expand All @@ -130,7 +129,6 @@ public typealias BeforeSendBlock = (PostHogEvent) -> PostHogEvent?
@available(macOS, unavailable, message: "Surveys are only available on iOS 15+")
@available(tvOS, unavailable, message: "Surveys are only available on iOS 15+")
@available(visionOS, unavailable, message: "Surveys are only available on iOS 15+")
@_spi(Experimental)
@objc public var surveys: Bool {
get { _surveys }
set { setSurveys(newValue) }
Expand All @@ -141,7 +139,6 @@ public typealias BeforeSendBlock = (PostHogEvent) -> PostHogEvent?
@available(macOS, unavailable, message: "Surveys are only available on iOS 15+")
@available(tvOS, unavailable, message: "Surveys are only available on iOS 15+")
@available(visionOS, unavailable, message: "Surveys are only available on iOS 15+")
@_spi(Experimental)
@objc public var surveysConfig: PostHogSurveysConfig {
get { _surveysConfig }
set { setSurveysConfig(newValue) }
Expand Down Expand Up @@ -202,7 +199,7 @@ public typealias BeforeSendBlock = (PostHogEvent) -> PostHogEvent?
return integrations
}

var _surveys: Bool = false // swiftlint:disable:this identifier_name
var _surveys: Bool = true // swiftlint:disable:this identifier_name
private func setSurveys(_ value: Bool) {
// protection against objc API availability warning instead of error
// Unlike swift, which enforces stricter safety rules, objc just displays a warning
Expand Down
Loading