On Development devices, it will call it multiple times. In Production, it will call it once.
[Taplytics propertiesLoadedCallback: ^(BOOL loaded) { [self loadTLVariables]; }]; - (void)loadTLVariables { TaplyticsVar* stringVar = [TaplyticsVar taplyticsSyncVarWithName:@"stringVar" defaultValue:@"string"]; NSString* string = (NSString*)stringVar.value; }
Essentially, propertiesLoadedCallback tells you when the experiment config has loaded from the server and you can use the values from your synchronous variables.
The reason why it's called multiple times is, on a dev device, if you use the shake menu, or open an experiment, it will call the propertiesLoaded method in order to force the relevant config for the device.
Comments
0 comments
Please sign in to leave a comment.