Closed alexsunderlion closed 1 month ago
Up on this issue. Just to be clear: currently, the only way to set configuration is to hardcode them in info.plist for iOS?
any update on this issue?
Yes, we are only able to hardcode them in info.plist
I agree with this, I'm using FlutterFlow and there is now an easy way to edit platform specific code there, an init function is needed for such scenarios.
No updates, sorry, but we will consider it for the next major version.
+1 would be great to have it as all other libs provide ability to pass tokens via init. We have different tokens for different envs and also would like to avoid hardcoding things in Info.plist
Adding that this is necessary to enable tracking of lifecycle events while staying compliant with cookie laws in the European Union.
Adding that this is necessary to enable tracking of lifecycle events while staying compliant with cookie laws in the European Union.
It's possible to disable already so it's already compliant, only needed if you want to enable it again at runtime.
In our app the users can select their region (EU vs. non-EU) at runtime, so I also want to make the choice about posthog lifecycle events at runtime.
PR is up
I haven't seen any method to set configuration(API_KEY, POSTHOG_HOST, TRACK_APPLICATION_LIFECYCLE_EVENTS, DEBUG) from dart layer. Better to have
config/init
function to set API_KEY and other option based on dynamic environment from flutter.