Skip to main content

Update device information

Requirements


var localDevice = try trustfactorClient.getCurrentDevice()
localDevice.setPushNotifications(token: <String?>, provider: <TFPushNotificationsProvider>?) // empty token or provider will disable push notifications delivery
try localDevice.setName(<String>) // throws if device name does not fulfill the requirements
localDevice.setLocale(<Locale>)

trustfactorClient.updateDevice(localDevice, { result, correlationID in
switch result {
case .success(_):
// no value is returned
case .failure(let error):
// handle error
}
})