PostHog / posthog-flutter

PostHog Flutter SDK
https://posthog.com/docs/libraries/flutter
MIT License
55 stars 37 forks source link

Posthog().disable() is not working for iOS. #91

Closed TaranenkoDenis closed 8 months ago

TaranenkoDenis commented 8 months ago

Version

4.1.0

Steps to Reproduce

  1. flutter pub add posthog_flutter
  2. Call Posthog().disable() after app starts on iOS simulator or device.
  3. Send some events to the Posthog.

Expected Result

Posthog doesn't send events after disabling.

Actual Result

All events, including autocaptured, are shown in the Activity area after disabling.

TaranenkoDenis commented 8 months ago

I want to add that everything works fine on Android. When I try to send an event after disabling, I see the following message in the logs: PostHog is in OptOut state. And not a single sent event is displayed in the Activity area.

marandaneto commented 8 months ago

@TaranenkoDenis I can confirm that, on it.

marandaneto commented 8 months ago

If you upgrade your cocoapods, the iOS SDK version 3.2.3 should have fixed this, thanks for reporting @TaranenkoDenis