device.getModel() 无法正常工作
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());
注意react-native和react-native-device-info的版本分别是0.53和0.12.1
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.
请注意!
现在我正在使用 getDeviceName() 来获取指示设备型号的字符串。
例如,如果我使用 iPhone 11,则 getDeviceName() 将变为 return 'iPhone 11'
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());
注意react-native和react-native-device-info的版本分别是0.53和0.12.1
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.
请注意!
现在我正在使用 getDeviceName() 来获取指示设备型号的字符串。
例如,如果我使用 iPhone 11,则 getDeviceName() 将变为 return 'iPhone 11'