Skip to content

Latest commit

 

History

History
549 lines (327 loc) · 24.6 KB

CHANGELOG.md

File metadata and controls

549 lines (327 loc) · 24.6 KB

Release Notes

3.0.0

  • release: promoted release from 3.0.0-rc.5 without change

3.0.0-rc.5

  • fix: various fixes similar to / prompted by #771 / #768 / #769
  • fix: getSystemName() returns value on ios+android #771 thanks @cmpayc!
  • fix: getUniqueId() only returned value 1st call #768 thanks @tamhv!
  • fix: getModel() not working on iOS #769 Thanks @rnnyrk!

3.0.0-rc.4

  • feat: memoize static return values for performance

3.0.0-rc.3

  • fix: TypeScript getPowerState() return type was Object instaed of PowerState interface
  • fix: TypeScript definition file was missing getPhoneNumberSync()

3.0.0-rc.2

  • Added a sync version of each API call, in practice it is very difficult to consume async APIs during app bootstrap and device info is frequently fundamental to app startup behavior. This still preserves the change away from paying the entire cost of information retrieval at startup - now you will only pay for exactly what you need.

3.0.0-rc.1

  • fix incorrect use of macos for API selection vs ios in rc.3, rendering ios builds mostly useless
  • verified last of the v2->v3 discrepancies, this is a release candidate now

3.0.0-beta.3

  • fix some real android device v2->v3 discrepancies
  • BREAKING CHANGE: more capitalization changes for API calls to standardize (see below)
  • BREAKING CHANGE: more return value changes to standardize return values (see below)
  • feat: you no longer have to be careful with platform-specific APIs, all APIs will work, just returning standard "unknown" return values (see above breaking change, and example App.js usage)

3.0.0-beta.2

  • fix all emulator/simulator v2->v3 discrepancies

3.0.0-beta.1

Each BREAKING CHANGE contains the required information to migrate. The example App.js shows sample usage.

  • BREAKING CHANGE: Every API call returns a Promise now (and thus no more Android constructor with async boolean argument)
    • This was required to improve module load speed, handle dynamic values, and release the main queue for iOS
  • BREAKING CHANGE: Every API call with acronyms ('getIP', 'getABI' etc follows pure camel-case now, e.g. 'getIp', 'getAbi')
    • This naming style is a consensus standard. Previously APIs here were half one way half the other. Now they are consistent
    • isAirPlaneMode -> isAirplaneMode
    • getIPAddress -> getIpAddress
    • getMACAddress -> getMACAddress
    • getAPILevel -> GetApiLevel
    • getBaseOS -> getBaseOs
    • getInstanceID -> getInstanceId
    • getUniqueID -> getUniqueId
    • supportedABIs -> supportedAbis
  • BREAKING CHANGE: all events prefixed with 'RNDeviceInfo_' (react-native-device-info#620)
    • This is required as event names are a global namespace and collisions are inevitable otherwise
    • powerStateDidChange -> RNDeviceInfo_powerStateDidChange
    • batteryLevelDidChange -> RNDeviceInfo_batteryLevelDidChange
    • batteryLevelIsLow -> RNDeviceInfo_batteryLevelIsLow
  • BREAKING CHANGE: Android getBuildNumber returns string like iOS (react-native-device-info#648)
  • BREAKING CHANGE: remove is24Hour, getTimezone, isAutoTimeZone and isAutoDateAndTime, getDeviceLocale, getDeviceCountry, getPreferredLocales
    • This was the result of a survey. It removes API duplication in the react-native-community modules
    • Related PR: zoontek/react-native-localize#65
    • Use yarn add https://github.com/mikehardy/react-native-localize.git#e062f0d2dc3171dc18fdb7b7139d347ad03933dc to maintain isAutoTimeZone + isAutoDateAndTime until merged
  • BREAKING CHANGE: iOS switch deprecated WebView for WebKit / getUserAgent returns Promise (react-native-device-info#757)
    • The change from WebView to WebKit was required as the API is being removed from the iOS platform
  • BREAKING CHANGE: if an API is platform-specific, all non-implementing platforms will return standard values of -1, false, or 'unknown' depending on return type
    • This was how most APIs behaved before but it was not 100% - some returned null or empty string before
    • getPhoneNumber sometimes returned null, now it will be 'unknown' if not known
  • deprecated: IP-address-related methods deprecated - use @react-native-community/netinfo or react-native-network-info or react-native-carrier-info
  • feat: all APIs are now restricted in Javascirpt to the platforms they have full implementations on so the web polyfill is up to date
  • feat: 'getAndroidId' on Android returns android.provider.Settings.Secure.ANDROID_ID, read platform docs for usage
  • feat: getUsedMemory (react-native-device-info#356)
  • feat: getDeviceName() without Bluetooth permission on Android (react-native-device-info#735)
  • feat: TurboModule support (react-native-device-info#745) for these purposes (zoontek/react-native-localize#65)
  • feat: allow for destructured ES6 imports (react-native-device-info#727)
  • feat: update gradle, add react-native devDependency and build.gradle reference to enhance module developer experience
  • fix: remove unnecessary gradle depencies (react-native-device-info#746)
  • chore: de-linted all Java code, all Markdown

2.3.2

2.3.1

2.3.0

2.2.2

2.2.1

2.2.0

2.1.4

2.1.3

2.1.2

2.1.1

2.1.0

  • perf(Android): getConstants() optionally loaded in thread, speedup for most, init MainApplication with RNDeviceInfo(true) (react-native-device-info#680)

2.0.4

2.0.3

2.0.2

2.0.1

2.0.0

  • breaking: no functional change from 1.8.0, but isLocationEnabled requires minCompileSdk 28

1.8.0 (unpublished: unintended breaking change)

1.7.0

1.6.2

1.6.1

1.6.0

1.5.1

1.5.0

1.4.3

1.4.2

iOS notice

This is existing policy but is worth mentioning: The list with device names (returned by getModel()) 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

1.4.1

  • fix: repair flow types from #436 - 'Object' vs 'object'

1.4.0

1.3.0

1.2.0

1.1.0

1.0.1

1.0.0

  • First major version, features (and bugs) copied from 0.29.1

0.29.1

On March 12 2019, this repository was moved from https://github.com/rebeccahughes/react-native-device-info to https://github.com/react-native-community/react-native-device-info

0.29.0

0.28.1

0.28.0

0.27.1

0.27.0

0.26.5

0.26.4

0.26.3

0.26.2

0.26.1

0.26.0

0.25.1

0.25.0

0.24.3

  • Support React Native Windows 0.57, minimal version is now 10.0.14393 for the target platform

0.24.2

0.24.1

0.24.0

0.23.0

0.22.6

0.22.5

0.22.4

0.22.3

0.22.2

0.22.1

0.22.0

0.21.5

  • Rolled back the Pod change made in 0.21.1

0.21.4

0.21.3

0.21.2

0.21.1

0.21.0

0.20.0

  • Made the following methods compatible with UWP: (react-native-device-info#345)
    • getBatteryLevel()
    • getFirstIntallTime()
    • getIPAddress()
    • getMaxMemory()
    • isPinOrFingerprintSet()

0.19.0

0.18.0

0.17.4

0.17.3

  • Fix production build crash on Android introduced in #313

0.17.2

0.17.1

  • Fix bad import for web polyfill

0.17.0

0.16.0

  • Add the googlePlayServicesVersion Gradle build config that allows you to set the Play Services version from the root-project (react-native-device-info#333)

0.15.3

0.15.2

0.15.1

0.15.0

0.14.0

0.13.0

0.12.1

0.12.0

Diff

0.11.0

  • Add support for RN > 0.47
  • Update typescript definitions

Diff

0.10.2

  • Add typescript definitions

Diff

0.10.1

  • Add isPinOrFingerprintSet method
  • Add support for RN > 0.40

Diff

0.10.0

  • Semver fix

Diff

0.9.8

Diff

0.9.7

Several bugfixes and detecting if device is a tablet

0.9.3

adds support for Brand information e.g. apple, htc, etc

0.9.1

adds support for the iPhone SE and new iPad Pro

0.9.0

adds support for device country and changes the iOS device name to match Apple branding

0.8.4

don't use destructuring

0.8.3

removes the default bluetooth permission

0.8.2

change deployment target to iOS 8

0.8.1

removes unnecessary peerDependencies

0.8.0

tweaks how device locale works on Android. If it's available it will use the toLanguageTag that is more inline with iOS. (See #14)

0.7.0

adds two new parameters, Device Locale and User Agent.

0.5.0

adds a new parameter; Device Id. On iOS this is the hardware string for the current device (e.g. "iPhone7,2"). On Android we use the BOARD field which is the name of the underlying board, e.g. "goldfish". The way that the module gets the device model on iOS has also changed to be based on the Device Id; now instead of getting a generic product family e.g. "iPhone", it will return the specific model e.g. "iPhone 6".