diff --git a/en/react-native-device-info.md b/en/react-native-device-info.md index 9595ecf1c73988a61014140a6f4f6cefc26e8c6b..f43cc72fe76b7a116ecf8a2ae3cab1276c3f26e0 100644 --- a/en/react-native-device-info.md +++ b/en/react-native-device-info.md @@ -54,6 +54,7 @@ import DeviceInfo from 'react-native-device-info'; DeviceInfo.getBrand(); DeviceInfo.getModel(); DeviceInfo.getDeviceType(); + DeviceInfo.getDeviceNameSync(); ``` ## Use Codegen @@ -191,6 +192,7 @@ Open `entry/src/main/module.json5`, add the following permission: | getDeviceType | TReturns the device's type as a string | string | yes | IOS/Android/visionOS | yes | | getDisplay | A build ID string meant for displaying to the user. | Promise | yes | Android | yes | | getDeviceName | Gets the device name. | Promise | yes | IOS/Android/Windows/visionOS | yes | +| getDeviceNameSync | Gets the device name. | string | yes | IOS/Android/Windows/visionOS | yes | | getDeviceToken | Gets the device token (see DeviceCheck). Only available for iOS 11.0+ on real devices. This will reject the promise when getDeviceToken is not supported, be careful with exception handling. | Promise | yes | IOS/visionOS | no | | getFirstInstallTime | Gets the time at which the app was first installed, in milliseconds. | Promise | yes | IOS/Android/Windows/visionOS | yes | | getFingerprint | A string that uniquely identifies this build. | Promise | yes | Windows | no | diff --git a/zh-cn/react-native-device-info.md b/zh-cn/react-native-device-info.md index c11aa0be2478ce293e710a51deef44b6cec6d73d..c3eda284d27e51e13f738afe7915a634863aa44e 100644 --- a/zh-cn/react-native-device-info.md +++ b/zh-cn/react-native-device-info.md @@ -53,6 +53,7 @@ import DeviceInfo from 'react-native-device-info'; DeviceInfo.getBrand(); DeviceInfo.getModel(); DeviceInfo.getDeviceType(); + DeviceInfo.getDeviceNameSync(); ``` ## 使用 Codegen @@ -192,6 +193,7 @@ ohpm install | getDeviceType | TReturns the device's type as a string | string | yes | IOS/Android/visionOS | yes | | getDisplay | A build ID string meant for displaying to the user. | Promise | yes | Android | yes | | getDeviceName | Gets the device name. | Promise | yes | IOS/Android/Windows/visionOS | yes | +| getDeviceNameSync | Gets the device name. | string | yes | IOS/Android/Windows/visionOS | yes | | getDeviceToken | Gets the device token (see DeviceCheck). Only available for iOS 11.0+ on real devices. This will reject the promise when getDeviceToken is not supported, be careful with exception handling. | Promise | yes | IOS/visionOS | no | | getFirstInstallTime | Gets the time at which the app was first installed, in milliseconds. | Promise | yes | IOS/Android/Windows/visionOS | yes | | getFingerprint | A string that uniquely identifies this build. | Promise | yes | Windows | no |