react-nativereact-native-device-info

device.getModel() is not working properly


I am trying to get the modelname using DeviceInfo.getModel() the inbuilt method that is provided by the react-native-device-info but for each model instead of giving the model name it is returning iPhone.I am not able to understand why this is happening.

here is the code that I am using

console.log(DeviceInfo.getModel());

note that the version of react-native and react-native-device-info are respectively 0.53 and 0.12.1


Solution

  • iOS warning: The list with device names is maintained by the community and could lag new devices. It is recommended to use getDeviceId() since it's more reliable and always up-to-date with new iOS devices. We do accept pull requests that add new iOS devices to the list with device names.

    Kindly take a note of it!