registerIMPushNotificationsTokenIOS method

Future<void> registerIMPushNotificationsTokenIOS(
  1. String imToken
)

Register Apple Push Notifications token.

After calling this function application will receive push notifications from Voximplant Server. If the provided token is not nil, but the client is not logged in, the token will be registered just after login.

IOS ONLY.

imToken - The APNS token for IM push notification.

Implementation

Future<void> registerIMPushNotificationsTokenIOS(String imToken) async {
  try {
    await _channel.invokeMethod(
      'Client.registerIMPushNotificationsToken',
      imToken,
    );
  } on PlatformException catch (e) {
    throw VIException(e.code, e.message);
  }
}