updateAPNsDeviceToken method
- 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
Future<void> updateAPNsDeviceToken(String token) async {
if (Platform.isIOS) {
Map req = {'token': token};
Map result = await PushChannel.invokeMethod(
ChatMethodKeys.updateAPNsPushToken, req);
try {
ChatError.hasErrorFromResult(result);
} on ChatError catch (e) {
throw e;
}
}
}