startManually static method
Initializes Apphud SDK with User ID & Device ID pair. Not recommended for use unless you know what you are doing.
-
parameter
apiKey
is required. Your api key. -
parameter
userID
is optional. You can provide your own unique user identifier. If null passed then UUID will be generated instead. -
parameter
deviceID
is optional. You can provide your own unique device identifier. If null passed then UUID will be generated instead. -
parameter
observerMode
is optional, iOS only. Sets SDK to Observer (Analytics) mode. If you purchase products by your own code, then passtrue
. If you purchase products usingApphud.purchase(product)
method, then passfalse
. Default value isfalse
. -
Returns
ApphudUser
object after the SDK initialization is complete. Note: Do not storeApphudUser
instance in your own code, since it may change at runtime.
Implementation
static Future<ApphudUser> startManually({
required String apiKey,
String? userID,
String? deviceID,
bool? observerMode,
}) async {
final json = await _channel.invokeMethod('startManually', {
'apiKey': apiKey,
'deviceID': deviceID,
'userID': userID,
'observerMode': observerMode ?? false,
});
return ApphudUser.fromJson(json);
}