Skip to content

Commit

Permalink
Avoid duplication for device name retrival
Browse files Browse the repository at this point in the history
  • Loading branch information
vbuberen committed Dec 10, 2024
1 parent b9f1586 commit efdcc35
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ - (void)handleMethodCall:(FlutterMethodCall *)call
NSString *deviceName;
if ([self isDevicePhysical]) {
machine = @(un.machine);
deviceName = [DeviceIdentifiers userKnownDeviceModel:@(un.machine)];
} else {
machine = [info environment][@"SIMULATOR_MODEL_IDENTIFIER"];
deviceName = [DeviceIdentifiers userKnownDeviceModel:machine];
}
deviceName = [DeviceIdentifiers userKnownDeviceModel:machine];

result(@{
@"name" : [device name],
@"systemName" : [device systemName],
Expand Down

0 comments on commit efdcc35

Please sign in to comment.