diff --git a/Sources/Backup/Commands/OARegisterDeviceCommand.m b/Sources/Backup/Commands/OARegisterDeviceCommand.m index 4a2ebf333c..7a209ebcbe 100644 --- a/Sources/Backup/Commands/OARegisterDeviceCommand.m +++ b/Sources/Backup/Commands/OARegisterDeviceCommand.m @@ -6,7 +6,7 @@ // Copyright © 2022 OsmAnd. All rights reserved. // -#import +#import #import "OARegisterDeviceCommand.h" #import "OABackupListeners.h" @@ -55,9 +55,11 @@ - (void) main params[@"token"] = _token; params[@"lang"] = [OAUtilities currentLang]; params[@"brand"] = @"Apple"; - NSString *machine = UIDevice.machine; - if (machine) - params[@"model"] = machine; + + struct utsname systemInfo; + if (uname(&systemInfo) == 0) + params[@"model"] = [NSString stringWithCString:systemInfo.machine encoding:NSUTF8StringEncoding]; + [OANetworkUtilities sendRequestWithUrl:OABackupHelper.DEVICE_REGISTER_URL params:params post:YES onComplete:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) { int status; NSString *message;