-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Callback Support to reloadFeatureFlags
Method
#76
Add Callback Support to reloadFeatureFlags
Method
#76
Conversation
reloadFeatureFlags
Method
@cameronehrlich thanks for the PR. |
@marandaneto great to hear that you are adding a I can definitely update this PR to post a From the perspective of the consumer of your SDK, while I totally agree that a having a notification could be very useful, it also is very handy to have a tight coupling between requesting the flags and knowing when they arrive, especially in a use case like ours where we want to guarantee the feature flags are loaded at launch. In fact, it looks like your team has recognized this based on the support for this that you have added in In short, I would propose that the SDK should support both a callback and a notification. Do you have a rough estimate of when you are planning on shipping v3.0.0? |
@cameronehrlich Indeed, the new SDK has both approaches because it solves different use cases. Would you mind adding a changelog entry? The first alpha of the iOS v3 should be coming within the next few days (later next week most likely), would you like to be a beta tester as soon as it is out? :) |
@marandaneto I'm not entirely sure what you mean when you say it "leaks". My understanding is that the |
@cameronehrlich Sorry for the confusion. I meant the implementation leaking, since we have to pass the callback to all the methods ( |
What does this PR do?
This PR adds support for receiving a callback when fetching feature flags.
Where should the reviewer start?
I added a new method to the
PHGPostHog
class that allows the user to specify a callback when fetching feature flags.How should this be manually tested?
Make sure that the user receives a callback when the feature flags are finished being fetched.
Any background context you want to provide?
We would like to be able to fetch feature flags at app launch and wait to proceed until they are guaranteed to be fetched. The infrastructure appeared to be already in place, and I just hooked it up.
What are the relevant tickets?
N/A
Screenshots or screencasts (if UI/UX change)
Questions:
You may want to mention this functionality in your iOS SDK docs.
No.
Probably not.