Lets assume you want to decide which message works better e.g.
First create test and define variation controls in Vessel AB Center, e.g. If variation control is "purchase_title" then before you set welcome text get the value from VesselAB Sdk as follows.
Eg. To change messaging on a TextView:
/***
* Returns the value associated with a given test variation variable. If there is none associated
* or the tes failed to load then the defaultValue is returned.
*
* @param variableKey The variableKey whose value is to the retrieved.
* @param defaultValue In case there is no variation variable named variationVariable
* or if the test failed to load then the defaultValue is returned.
* @return value for given key | return default value if key is missing.
*/
String title = VesselAB.getValue("YOUR_TEST_NAME","VARIABLE_KEY", "DEFAULT_VALUE");
Lets assume you want to decide which message works better e.g.
First create test and define variation controls in Vessel AB Center, e.g. If variation control is
Eg. To change messaging on a TextView:
/** Returns the value associated with a given test variation variable. If there is none associated or the test failed to load then the defaultValue is returned.
@param testName The test name from which variation variable needs to be retrieved.
@param variableKey The variableKey whose value is to the retrieved.
@param defaultValue In case there is no variation variable named variationVariable or if the test failed to load then the defaultValue is returned.
*/
NSString *newLabel =[VesselAB fromTest:@"YOUR_TEST_NAME" getVariableValueFor:@"VARIATION_KEY" defaultValue:@"DEFAULT_VALUE"];
Lets assume you want to decide which message works better e.g.
First create test and define variation controls in Vessel AB Center, e.g. If variation control is "purchase_title" then before you set welcome text get the value from VesselAB Sdk as follows.
To retrieve the variation control data, you can call vesslab.getValue(function(value){},function(error){}, key, defaultValue) method.
Eg. To change welcome message call
vesselab.getValue(
function(value){ console.log("Value " + value)},
function(error){ console.log("error "+ error)},
"welcome_text", "Welcome to the world");
Lets assume you want to decide which message works better e.g.
First create test and define variation controls in Vessel AB Center, e.g. If variation control is "purchase_title" then before you set welcome text get the value from VesselAB Sdk as follows.
To retrieve the variation control data, you can call VesselSDK.getValue(key, default) method.
Eg. To change messaging on a Button:
var VesselSDK = require('io.vessel');
var buy = Ti.UI.createButton({
title: VesselSDK.getValue('purchase_title', 'Buy'),
height:Ti.UI.SIZE,
});
Lets assume you want to decide which message works better e.g.
First create test and define variation controls in Vessel AB Center, e.g. If variation control is "purchase_title" then before you set welcome text get the value from VesselAB Sdk as follows.
To retrieve the variation control data, you can call VesselAB.getValue(string key, string default) method.
Eg. To change messaging on a TextBlock:
......
var title = VesselAB.getValue("purchase_title", "default title");
// Other initialization code, set the title to respective TextBlock
}