Skip to content

Native Device Info

Latest

Choose a tag to compare

@bharathidas bharathidas released this 20 Aug 11:40

Native Device Info — Studio Pro 10.24.17

Fixed

Six actions referenced Platform.OS without importing Platform from react-native, and threw ReferenceError: Platform is not defined on every call, on both platforms:

  • GetApplicationName
  • GetBaseOS
  • GetBatteryLevel
  • GetBootloader
  • GetBrand
  • GetBuildNumber

All six now carry the import, matching the other 48 actions. All 54 actions in the module have been audited: every action that uses Platform.OS imports Platform.

This defect predates the 10.24.17 upgrade — it is present in Version2.0.0 and in the earlier 10.4.1 and 9.24.0 packages. Upgrading from any previous version is recommended.

Notes

No other changes. Studio Pro 10.24.17, imports with 0 errors.

Requires react-native-device-info in the native template your app builds against — see the module documentation.

Import NativeDeviceInfo.mpk via App Explorer > Import module package in Studio Pro 10.24.17 or higher.