应用了AB测试配置,但Firebase控制台显示0个用户 [英] AB testing config applied but firebase console show 0 users
问题描述
我已经配置了Firebase Ab-testing.一切正常,除非控制台上没有影响用户.
I've configured firebase ab-testing. Everything works fine except there is no impact user on console.
实际上,我可以看到UI和日志显示已应用Ab测试.此外,通过检查另一个StackoverFlow主题,在成功获取后也会调用activateFetched.
Actually, I can see UI and log show ab-testing is applied. Moreover, by checking the other StackoverFlow topic, activateFetched also invoked after fetch successfully.
而且,我已引用
但是这些对我的案子没有任何帮助.是否有任何遗漏或任何其他需要检查的内容,以便客户端可以将AB测试结果响应到Firebase控制台.
But those are no work on my case. Is there anything miss or any other need to check so that client can response AB testing result to firebase console.
首先感谢您的帮助.
代码段:
[FIRApp configure];
FIRRemoteConfigSettings* configSettings = [[remoteConfig configSettings] initWithDeveloperModeEnabled:YES];
[[FIRRemoteConfig remoteConfig] setConfigSettings:configSettings];
[[FIRRemoteConfig remoteConfig] fetchWithExpirationDuration:duration completionHandler:^(FIRRemoteConfigFetchStatus status, NSError *error) {
if (status == FIRRemoteConfigFetchStatusSuccess) {
BOOL configFound = [[FIRRemoteConfig remoteConfig] activateFetched];
推荐答案
请按以下顺序调用函数:
Please call the functions in the following order:
-
fetch()
- 在
fetch()
的完成处理程序中调用activatefetched()
. - 火灾激活事件.如果需要在
activatefetched()
之后立即调用激活事件,请添加几秒钟的时间延迟.这是因为activatefetched()
是异步处理的,因此在激活事件触发之前,该函数可能无法完全执行.
fetch()
- Call
activatefetched()
in the completion handler offetch()
. - Fire activation event. If you need to call activation event immediately after
activatefetched()
, add a time delay of a few seconds. This is becauseactivatefetched()
process asynchronously and hence the function may not execute completely, before the activation event is fired.
完成后,在测试设备上测试正在运行的实验.在调试日志中,使用字符串"exp_X"搜索,其中"X"是实验ID.您可以在实验的网址中找到实验ID.如果在测试设备上执行代码时在调试日志中找到实验ID,则表示该设备已被实验覆盖.同样,如果实验设置正确,则正在运行的实验将在控制台中显示1位活跃的实验用户.
Once done, test a running experiment on test device. In the debug logs search with string "exp_X" where 'X' is the experiment Id. You will find the experiment Id in the URL of the experiment. If you find the experiment ID in the debug logs while executing the code on test device, it means the device was covered in experiment. Also if the experiment setup is correct, the running experiment will show 1 active experiment user in the console.
这篇关于应用了AB测试配置,但Firebase控制台显示0个用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!