1

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

Dhruvil Shah
  • 376
  • 2
  • 8

2 Answers2

3

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!

Sunny Parekh
  • 945
  • 7
  • 17
1

Right now I am using getDeviceName() to get the string which indicates the device model.

As example if I am using iPhone 11 then getDeviceName() is going to return 'iPhone 11'

Dhruvil Shah
  • 376
  • 2
  • 8