Skip to content
Closed
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
6 changes: 6 additions & 0 deletions .changeset/v6-ios-payload-decoding.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"posthog_flutter": major
---

- **Breaking:** return `null` instead of the raw string for a malformed, empty, or whitespace-only `getFeatureFlagResult()` payload on iOS and macOS
- **Breaking:** keep string payloads passed to `PostHogBootstrapConfig.featureFlagPayloads`, such as `"123"`, as strings on iOS and macOS instead of decoding them to numbers or booleans
10 changes: 10 additions & 0 deletions .changeset/v6-posthog-ios-4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
"posthog_flutter": major
---

- **Breaking:** bump minimum iOS deployment target from 13.0 to 15.0 and macOS from 10.15 to 11.0, and require Xcode 26, adopting `posthog-ios` 4.x
- **Breaking:** remove `PostHogConfig.apiKey` and the `com.posthog.posthog.API_KEY` manifest/Info.plist key — use `projectToken` and `com.posthog.posthog.PROJECT_TOKEN`
- **Breaking:** remove `Posthog().getFeatureFlagPayload()` — use `getFeatureFlagResult(key, sendEvent: false)` and read `payload`
- **Breaking:** remove the `PostHogSessionReplayConfig.debouncerDelay` setter — use `PostHogSessionReplayConfig.throttleDelay`
- **Breaking:** remove `PostHogDataMode.cellular` — use `PostHogDataMode.any`, which it always behaved like
- Declare Android `minSdkVersion` 23 to match `posthog-android`, which has required it since 3.39.0. Apps on minSdk 21 or 22 already could not build with this plugin, so nothing changes for them
6 changes: 6 additions & 0 deletions .changeset/v6-remove-5x-deprecations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"posthog_flutter": major
---

- **Breaking:** remove `Posthog().enable()` and `Posthog().disable()` — use `optIn()` and `optOut()`
- **Breaking:** remove `PostHogConfig.sendFeatureFlagEvents` — use `sendFeatureFlagEvent`
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
runner: ubuntu-latest
- language: swift
build-mode: manual
runner: macos-15-xlarge
runner: macos-26
- language: actions
build-mode: none
runner: ubuntu-latest
Expand All @@ -45,7 +45,7 @@ jobs:
if: matrix.language == 'swift'
uses: maxim-lobanov/setup-xcode@ed7a3b1fda3918c0306d1b724322adc0b8cc0a90 # v1.7.0
with:
xcode-version: '16.4'
xcode-version: '26.4'

- name: Install dependencies (Swift)
if: matrix.language == 'swift'
Expand Down
136 changes: 1 addition & 135 deletions api/posthog_flutter.api.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"packageApi": {
"androidPlatformConstraints": {
"compileSdkVersion": null,
"minSdkVersion": 21,
"minSdkVersion": 23,
"targetSdkVersion": null
},
"executableDeclarations": [
Expand Down Expand Up @@ -876,28 +876,6 @@
"type": "method",
"typeParameterNames": []
},
{
"entryPoints": [],
"isDeprecated": false,
"isExperimental": false,
"isStatic": false,
"name": "getFeatureFlagPayload",
"parameters": [
{
"isDeprecated": false,
"isExperimental": false,
"isNamed": true,
"isRequired": true,
"name": "key",
"relativePath": "lib/src/posthog_flutter_platform_interface.dart",
"typeName": "String"
}
],
"relativePath": "lib/src/posthog_flutter_platform_interface.dart",
"returnTypeName": "Future<Object?>",
"type": "method",
"typeParameterNames": []
},
{
"entryPoints": [],
"isDeprecated": false,
Expand Down Expand Up @@ -1859,28 +1837,6 @@
"type": "method",
"typeParameterNames": []
},
{
"entryPoints": [],
"isDeprecated": false,
"isExperimental": false,
"isStatic": false,
"name": "getFeatureFlagPayload",
"parameters": [
{
"isDeprecated": false,
"isExperimental": false,
"isNamed": true,
"isRequired": true,
"name": "key",
"relativePath": "lib/src/posthog_flutter_platform_interface.dart",
"typeName": "String"
}
],
"relativePath": "lib/src/posthog_flutter_platform_interface.dart",
"returnTypeName": "Future<Object?>",
"type": "method",
"typeParameterNames": []
},
{
"entryPoints": [],
"isDeprecated": false,
Expand Down Expand Up @@ -2173,17 +2129,6 @@
"relativePath": "lib/src/posthog_config.dart",
"typeName": "String"
},
{
"entryPoints": [],
"isDeprecated": true,
"isExperimental": false,
"isReadable": true,
"isStatic": false,
"isWriteable": false,
"name": "apiKey",
"relativePath": "lib/src/posthog_config.dart",
"typeName": "String"
},
{
"entryPoints": [],
"isDeprecated": false,
Expand Down Expand Up @@ -2250,17 +2195,6 @@
"relativePath": "lib/src/posthog_config.dart",
"typeName": "bool"
},
{
"entryPoints": [],
"isDeprecated": true,
"isExperimental": false,
"isReadable": true,
"isStatic": false,
"isWriteable": true,
"name": "sendFeatureFlagEvents",
"relativePath": "lib/src/posthog_config.dart",
"typeName": "bool"
},
{
"entryPoints": [],
"isDeprecated": false,
Expand Down Expand Up @@ -2770,17 +2704,6 @@
"relativePath": "lib/src/posthog_config.dart",
"typeName": "PostHogTextMask Function(String, Widget)?"
},
{
"entryPoints": [],
"isDeprecated": true,
"isExperimental": false,
"isReadable": false,
"isStatic": false,
"isWriteable": true,
"name": "debouncerDelay",
"relativePath": "lib/src/posthog_config.dart",
"typeName": "Duration"
},
{
"entryPoints": [],
"isDeprecated": false,
Expand Down Expand Up @@ -2950,17 +2873,6 @@
"relativePath": "lib/src/posthog_config.dart",
"typeName": "PostHogDataMode"
},
{
"entryPoints": [],
"isDeprecated": true,
"isExperimental": false,
"isReadable": true,
"isStatic": true,
"isWriteable": false,
"name": "cellular",
"relativePath": "lib/src/posthog_config.dart",
"typeName": "PostHogDataMode"
},
{
"entryPoints": [],
"isDeprecated": false,
Expand Down Expand Up @@ -4363,30 +4275,6 @@
"type": "method",
"typeParameterNames": []
},
{
"entryPoints": [],
"isDeprecated": true,
"isExperimental": false,
"isStatic": false,
"name": "disable",
"parameters": [],
"relativePath": "lib/src/posthog.dart",
"returnTypeName": "Future<void>",
"type": "method",
"typeParameterNames": []
},
{
"entryPoints": [],
"isDeprecated": true,
"isExperimental": false,
"isStatic": false,
"name": "enable",
"parameters": [],
"relativePath": "lib/src/posthog.dart",
"returnTypeName": "Future<void>",
"type": "method",
"typeParameterNames": []
},
{
"entryPoints": [],
"isDeprecated": false,
Expand Down Expand Up @@ -4826,28 +4714,6 @@
"type": "method",
"typeParameterNames": []
},
{
"entryPoints": [],
"isDeprecated": true,
"isExperimental": false,
"isStatic": false,
"name": "getFeatureFlagPayload",
"parameters": [
{
"isDeprecated": false,
"isExperimental": false,
"isNamed": false,
"isRequired": true,
"name": "key",
"relativePath": "lib/src/posthog.dart",
"typeName": "String"
}
],
"relativePath": "lib/src/posthog.dart",
"returnTypeName": "Future<Object?>",
"type": "method",
"typeParameterNames": []
},
{
"entryPoints": [],
"isDeprecated": false,
Expand Down
2 changes: 1 addition & 1 deletion example/ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
platform :ios, '14.0'
platform :ios, '15.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down
2 changes: 1 addition & 1 deletion example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ SPEC CHECKSUMS:
google_maps_flutter_ios: 17552876e72723da1d41accc22f03b5f7afbde69
GoogleMaps: 8939898920281c649150e0af74aa291c60f2e77d

PODFILE CHECKSUM: 3c864ae2f1db9f17d3418f22aa4b78eac050c10b
PODFILE CHECKSUM: 583e7c5826ead1663c2849ec27bee3d398ceebac

COCOAPODS: 1.16.2
18 changes: 9 additions & 9 deletions example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand All @@ -497,7 +497,7 @@
DEVELOPMENT_TEAM = PNC2XCH2XP;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -518,7 +518,7 @@
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.example.posthogFlutterExample.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -537,7 +537,7 @@
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.example.posthogFlutterExample.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -554,7 +554,7 @@
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.example.posthogFlutterExample.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -610,7 +610,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -659,7 +659,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand All @@ -680,7 +680,7 @@
DEVELOPMENT_TEAM = PNC2XCH2XP;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -704,7 +704,7 @@
DEVELOPMENT_TEAM = PNC2XCH2XP;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down
2 changes: 1 addition & 1 deletion example/macos/Podfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
platform :osx, '10.15'
platform :osx, '11.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down
6 changes: 3 additions & 3 deletions example/macos/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.15;
MACOSX_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
Expand Down Expand Up @@ -628,7 +628,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.15;
MACOSX_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
Expand Down Expand Up @@ -675,7 +675,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.15;
MACOSX_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
Expand Down
2 changes: 1 addition & 1 deletion posthog_flutter/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ android {
}

defaultConfig {
minSdkVersion 21
minSdkVersion 23
}

dependencies {
Expand Down
Loading
Loading