updateAPNsDeviceToken method

  1. @Deprecated("Use [bindDeviceToken] instead")
Future<void> updateAPNsDeviceToken(
  1. String token
)

Updates the APNs push token.

Param token The APNs push token.

Throws A description of the issue that caused this exception. See ChatError

Implementation

@Deprecated("Use [bindDeviceToken] instead")

///
/// Updates the APNs push token.
///
/// Param [token] The APNs push token.
///
/// **Throws** A description of the issue that caused this exception. See [ChatError]
///
///
///
Future<void> updateAPNsDeviceToken(String token) async {
  if (Platform.isIOS) {
    try {
      Map req = {'token': token};
      Map result = await platform_interface.Client.instance.pushManager
          .callNativeMethod(ChatMethodKeys.updateAPNsPushToken, req);
      ChatError.hasErrorFromResult(result);
    } catch (e) {
      rethrow;
    }
  } else {
    return;
  }
}