PostHog / posthog-ios

PostHog iOS SDK
https://posthog.com/docs/libraries/ios
MIT License
29 stars 37 forks source link

Add loadFeatureFlagsOnStart configuration flag #71

Closed marioradonic closed 9 months ago

marioradonic commented 9 months ago

What does this PR do?

It adds a configuration flag similar to JS library's advanced_disable_feature_flags_on_first_load with which a first load of feature flags can be disabled.

Where should the reviewer start?

Not much to this PR. Variable name can be discussed and I'm not sure if this is the best way to write the test, but I've tried to follow current structure. I didn't wanna name the variable the same as it's in JS lib since in iOS we don't have a "page load" concept.

How should this be manually tested?

I tested it manually by intercepting http requests using Charles proxy and confirming that /decide call is not made.

Any background context you want to provide?

In our project we want to be in control of when to reload feature flags. The flag is true by default so it's backward compatible.

What are the relevant tickets? /

Screenshots or screencasts (if UI/UX change) /

Questions:

Could be useful, but not my job.

I don't see any.

/