startManually static method

Future<ApphudUser> startManually({
  1. required String apiKey,
  2. String? userID,
  3. String? deviceID,
  4. bool? observerMode,
})

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 pass true. If you purchase products using Apphud.purchase(product) method, then pass false. Default value is false.

  • Returns ApphudUser object after the SDK initialization is complete. Note: Do not store ApphudUser 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);
}