From 00aa00ad4df781659e910682ce1edd81ec3a33df Mon Sep 17 00:00:00 2001 From: Anna Garcia Date: Tue, 6 Oct 2026 10:24:12 -0400 Subject: [PATCH] chore: adapt to posthog-ios 4.0 reloadFeatureFlags callback posthog-ios 4.0 passes a PostHogFeatureFlagsLoaded to the reloadFeatureFlags(_:) callback (PostHog/posthog-ios#913). Co-Authored-By: Claude Opus 5.5 (1M context) --- .../Sources/posthog_flutter/PosthogFlutterPlugin.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/posthog_flutter/darwin/posthog_flutter/Sources/posthog_flutter/PosthogFlutterPlugin.swift b/posthog_flutter/darwin/posthog_flutter/Sources/posthog_flutter/PosthogFlutterPlugin.swift index a69380be..a99dd547 100644 --- a/posthog_flutter/darwin/posthog_flutter/Sources/posthog_flutter/PosthogFlutterPlugin.swift +++ b/posthog_flutter/darwin/posthog_flutter/Sources/posthog_flutter/PosthogFlutterPlugin.swift @@ -1540,7 +1540,7 @@ extension PosthogFlutterPlugin { private func reloadFeatureFlags(_ result: @escaping FlutterResult) { // Resolve the Dart Future only once flags have actually finished loading. // The native callback fires on a background thread, so hop to main for Flutter. - PostHogSDK.shared.reloadFeatureFlags { + PostHogSDK.shared.reloadFeatureFlags { _ in DispatchQueue.main.async { result(nil) }