问题
We've started an AB test using Firebase remote config. It's been over 24 hours, and it's showing "Total Users: 0" when there should have been tens of thousands of DAUs assigned to each variant.
- how long does it take for data to come in?
- is there any way to tell if it's running?
- If it remains at zero, what are the potential root causes? Why are people not being assigned to test variants?
回答1:
Found the solution. A few dumb mistakes, but they are easy to miss because the remote config works fine without fixing them.
- Ensure you upgrade Firebase SDK/pod to 4.5 or later. Earlier versions have an identical API but won't serve AB tests values (only remote config values)
- Ensure you call fetchWithExpirationDuration AFTER you call
FIRApp configure
- Verify a draft AB test is working before shipping to app store. Some tips for doing this:
- Pass 0 for expiration in
fetchWithExpirationDuration
when in debug mode so it's forced to fetch new values every time (it will cache by default). - Setup remote config in debug mode (code below)
- Instructions from Google on how to verify: https://firebase.google.com/docs/remote-config/abtest-config#validate_your_experiment_on_a_test_device
- Pass 0 for expiration in
#ifdef DEBUG FIRRemoteConfigSettings* remoteConfigSettings = [[FIRRemoteConfigSettings alloc] initWithDeveloperModeEnabled:YES]; [FIRRemoteConfig remoteConfig].configSettings = remoteConfigSettings; #endif
来源:https://stackoverflow.com/questions/48915388/firebase-ab-test-has-0-users