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
5 changes: 5 additions & 0 deletions .changeset/v4-remove-datamode-cellular.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'posthog-ios': major
---

**Breaking:** remove `PostHogDataMode.cellular`. It always behaved the same as `.any`, so use `.any` instead (`PostHogDataModeAny` in Objective-C). Flushing behavior is unchanged. `.wifi` and `.any` keep their raw values 0 and 2; `PostHogDataMode(rawValue: 1)` now returns `nil`.
7 changes: 2 additions & 5 deletions PostHog/PostHogConfig.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,9 @@ public typealias BeforeSendBlock = (PostHogEvent) -> PostHogEvent?
/// Network connectivity mode required before queued data may be flushed.
@frozen @objc(PostHogDataMode) public enum PostHogDataMode: Int {
/// Flush only while the device is connected to Wi-Fi.
case wifi
/// Behaves the same as `.any`. Use `.any` instead.
@available(*, deprecated, message: "Behaves the same as .any. Use .any instead. This will be removed in the next major version.")
case cellular
case wifi = 0
/// Flush while any network connection is available.
case any
case any = 2
}

/// PostHog ingestion host used for all SDK network requests.
Expand Down
2 changes: 0 additions & 2 deletions api/posthog-ios.public-api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ PostHog | PostHogCompression.none | enum.case | case none | c:@M@PostHog@E@PostH
PostHog | PostHogConfig | class | @objc(PostHogConfig) class PostHogConfig | c:@M@PostHog@objc(cs)PostHogConfig
PostHog | PostHogConfig.PostHogDataMode | enum | @frozen @objc(PostHogDataMode) enum PostHogDataMode | s:7PostHog0aB6ConfigC0aB8DataModeO
PostHog | PostHogConfig.PostHogDataMode.any | enum.case | case any | s:7PostHog0aB6ConfigC0aB8DataModeO3anyyA2EmF
PostHog | PostHogConfig.PostHogDataMode.cellular | enum.case | case cellular | s:7PostHog0aB6ConfigC0aB8DataModeO8cellularyA2EmF
PostHog | PostHogConfig.PostHogDataMode.init(rawValue:) | init | init?(rawValue: Int) | s:7PostHog0aB6ConfigC0aB8DataModeO8rawValueAESgSi_tcfc
PostHog | PostHogConfig.PostHogDataMode.wifi | enum.case | case wifi | s:7PostHog0aB6ConfigC0aB8DataModeO4wifiyA2EmF
PostHog | PostHogConfig.appGroupIdentifier | property | @objc var appGroupIdentifier: String? | c:@M@PostHog@objc(cs)PostHogConfig(py)appGroupIdentifier
Expand Down Expand Up @@ -105,7 +104,6 @@ PostHog | PostHogConfig.tracingHeaders | property | @objc var tracingHeaders: [S
PostHog | PostHogConfig.urlSessionConfiguration | property | @objc var urlSessionConfiguration: URLSessionConfiguration? | c:@M@PostHog@objc(cs)PostHogConfig(py)urlSessionConfiguration
PostHog | PostHogDataMode | enum | @frozen enum PostHogDataMode | c:@M@PostHog@E@PostHogDataMode
PostHog | PostHogDataMode.any | enum.case | case any | c:@M@PostHog@E@PostHogDataMode@PostHogDataModeAny
PostHog | PostHogDataMode.cellular | enum.case | case cellular | c:@M@PostHog@E@PostHogDataMode@PostHogDataModeCellular
PostHog | PostHogDataMode.init(rawValue:) | init | init?(rawValue: Int) | s:So15PostHogDataModeV8rawValueABSgSi_tcfc
PostHog | PostHogDataMode.wifi | enum.case | case wifi | c:@M@PostHog@E@PostHogDataMode@PostHogDataModeWifi
PostHog | PostHogDisplayChoiceQuestion | class | @objc class PostHogDisplayChoiceQuestion | c:@M@PostHog@objc(cs)PostHogDisplayChoiceQuestion
Expand Down
Loading