Skip to content

adds PHGPostHogFeatureFlagsDidLoadNotification - #33

Closed
chrisladd wants to merge 1 commit into
PostHog:masterfrom
chrisladd:master
Closed

chrisladd wants to merge 1 commit into
PostHog:masterfrom
chrisladd:master

Conversation

@chrisladd

Copy link
Copy Markdown

Big fan, first time caller. I'm starting to use PostHog's experiments, and wanted an easy way to know which group users fell into. In my testing, all users were control at launch, and then were assigned to their groups some time later as data is fetched from the server.

What does this PR do?

Allows clients to delay checking for feature flags until they've loaded, as well as listen for relevant updates.

I tried to fit in with the current style of the project, but am glad to make any stylistic changes.

Where should the reviewer start?

How should this be manually tested?

On launch, or after calling reloadFeatureFlags, clients should expect the PHGPostHogFeatureFlagsDidLoadNotification.

Any background context you want to provide?

Questions:

  • do we want to do any kind of equality checking to only post this notification if there are changes to feature flags? If so, any suggestions?
  • do we want to give the notification a prettier name for Swift clients
  • if so, do we want to update or alias the PHGPostHogIntegrationDidStart notification to better match, for example providing a Notification suffix so the compiler automatically creates an NSNotification.Name for us.

What are the relevant tickets?

Screenshots or screencasts (if UI/UX change)

Questions:

  • Does the docs need an update?

Perhaps—if you all agree with the change, it would be useful to let clients know to listen.

  • Are there any security concerns?
  • Do we need to update engineering / success?

this allows clients to delay checking for feature flags until they've loaded.
@benjackwhite
benjackwhite self-requested a review January 25, 2023 18:00
@benjackwhite benjackwhite self-assigned this Jan 25, 2023
@benjackwhite

Copy link
Copy Markdown
Contributor

Just noticed this (we had few eyes on this repo as Christmas approached and passed). I'm working on this SDK atm so will check this out ASAP and get it in as it looks good at a glance 👍

@marandaneto

Copy link
Copy Markdown
Member

Closed because of the new major version that should have addressed this use case (via callback and/or notification)
#75

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants