UNPKG

45.7 kBMarkdownView Raw
1# [8.4.0](https://github.com/react-native-device-info/react-native-device-info/compare/v8.3.3...v8.4.0) (2021-10-03)
2
3
4### Features
5
6* **windows:** add isTabletMode/isKeyboardConnected/isMouseConnected/DeviceType:GamingConsole ([#1238](https://github.com/react-native-device-info/react-native-device-info/issues/1238)) ([e186394](https://github.com/react-native-device-info/react-native-device-info/commit/e186394d1b1afc6af74703e52c99192dccc9b9d9))
7
8## [8.3.3](https://github.com/react-native-device-info/react-native-device-info/compare/v8.3.2...v8.3.3) (2021-09-16)
9
10
11### Bug Fixes
12
13* **hasNotch:** Missing device name for iPhone 13 ([#1309](https://github.com/react-native-device-info/react-native-device-info/issues/1309)) ([0bc979e](https://github.com/react-native-device-info/react-native-device-info/commit/0bc979e687ef9ddbbd29410a60980cf536ce6002)), closes [#1307](https://github.com/react-native-device-info/react-native-device-info/issues/1307)
14
15## [8.3.2](https://github.com/react-native-device-info/react-native-device-info/compare/v8.3.1...v8.3.2) (2021-09-15)
16
17
18### Bug Fixes
19
20* **hasNotch:** Add iPhone 13 lineup to list of devices with notch ([#1307](https://github.com/react-native-device-info/react-native-device-info/issues/1307)) ([44193d5](https://github.com/react-native-device-info/react-native-device-info/commit/44193d5addaaa859e09447257a27549ddf8ff7ce))
21
22## [8.3.1](https://github.com/react-native-device-info/react-native-device-info/compare/v8.3.0...v8.3.1) (2021-08-20)
23
24
25### Bug Fixes
26
27* addListener/removeListeners native stubs for react-native 0.65 copmatibility ([3917f33](https://github.com/react-native-device-info/react-native-device-info/commit/3917f339207a5a2b05e3922f7489a0568dfde666)), closes [#1288](https://github.com/react-native-device-info/react-native-device-info/issues/1288)
28
29# [8.3.0](https://github.com/react-native-device-info/react-native-device-info/compare/v8.2.0...v8.3.0) (2021-08-13)
30
31
32### Features
33
34* **windows, device-id:** Added get device id for windows ([#1286](https://github.com/react-native-device-info/react-native-device-info/issues/1286)) ([dce34b7](https://github.com/react-native-device-info/react-native-device-info/commit/dce34b797631f2da3d1fe0fc44c5c112c8abedee))
35
36# [8.2.0](https://github.com/react-native-device-info/react-native-device-info/compare/v8.1.7...v8.2.0) (2021-08-12)
37
38
39### Features
40
41* Added getSerialNumber for windows ([#1287](https://github.com/react-native-device-info/react-native-device-info/issues/1287)) ([5b44183](https://github.com/react-native-device-info/react-native-device-info/commit/5b44183272a5a7730ac06c1b278fe0782ab9d87b))
42
43## [8.1.7](https://github.com/react-native-device-info/react-native-device-info/compare/v8.1.6...v8.1.7) (2021-08-05)
44
45
46### Bug Fixes
47
48* **windows:** react-native-device-info don't work with apps in RNW v0.64 ([#1279](https://github.com/react-native-device-info/react-native-device-info/issues/1279)) ([d1a5c4e](https://github.com/react-native-device-info/react-native-device-info/commit/d1a5c4ecd9be07169ea260ec959fe9499b0dbf66))
49
50## [8.1.6](https://github.com/react-native-device-info/react-native-device-info/compare/v8.1.5...v8.1.6) (2021-08-05)
51
52
53### Bug Fixes
54
55* **hasNotch:** add Redmi Note 8 Pro to hasNotch list ([#1276](https://github.com/react-native-device-info/react-native-device-info/issues/1276)) ([06e2b6c](https://github.com/react-native-device-info/react-native-device-info/commit/06e2b6c6740b10ffa93918c50040f5f9faf9595e))
56
57## [8.1.5](https://github.com/react-native-device-info/react-native-device-info/compare/v8.1.4...v8.1.5) (2021-07-30)
58
59
60### Bug Fixes
61
62* **iOS:** Adds iPad Air 4th gen name description ([#1273](https://github.com/react-native-device-info/react-native-device-info/issues/1273)) ([3c0d766](https://github.com/react-native-device-info/react-native-device-info/commit/3c0d7664c252753178ad5a75a8e395ffd3eacdec))
63
64## [8.1.4](https://github.com/react-native-device-info/react-native-device-info/compare/v8.1.3...v8.1.4) (2021-07-21)
65
66
67### Bug Fixes
68
69* Updated getUsedMemory to pull from ActivityManager debug memory info ([ed99cd3](https://github.com/react-native-device-info/react-native-device-info/commit/ed99cd3e34e97b4766383724cdb336a189647200))
70
71## [8.1.3](https://github.com/react-native-device-info/react-native-device-info/compare/v8.1.2...v8.1.3) (2021-05-05)
72
73
74### Bug Fixes
75
76* **web:** only call navigator methods if navigator is defined ([#1225](https://github.com/react-native-device-info/react-native-device-info/issues/1225)) ([35ffa26](https://github.com/react-native-device-info/react-native-device-info/commit/35ffa26f774e8e6512d070b9a899cc9271ed093f))
77
78## [8.1.2](https://github.com/react-native-device-info/react-native-device-info/compare/v8.1.1...v8.1.2) (2021-04-18)
79
80
81### Bug Fixes
82
83* **notch:** remove `pixel 3a` from devicesWithNotch.ts ([#1221](https://github.com/react-native-device-info/react-native-device-info/issues/1221)) ([ee959d9](https://github.com/react-native-device-info/react-native-device-info/commit/ee959d98e157a691b871a00496c55f4c3605b0d8))
84
85## [8.1.1](https://github.com/react-native-device-info/react-native-device-info/compare/v8.1.0...v8.1.1) (2021-04-18)
86
87
88### Bug Fixes
89
90* **android:** use mavenCentral vs jcenter before jcenter shutdown ([#1220](https://github.com/react-native-device-info/react-native-device-info/issues/1220)) ([bffcce2](https://github.com/react-native-device-info/react-native-device-info/commit/bffcce242ef62e924650788c87bf9b30d8a9181c))
91
92# [8.1.0](https://github.com/react-native-device-info/react-native-device-info/compare/v8.0.8...v8.1.0) (2021-04-12)
93
94
95### Features
96
97* **ios:** add getInstallerPackageName support for iOS ([#1217](https://github.com/react-native-device-info/react-native-device-info/issues/1217)) ([9a844bf](https://github.com/react-native-device-info/react-native-device-info/commit/9a844bf0dfbe0351416a934890a4239886c2d451))
98
99## [8.0.8](https://github.com/react-native-device-info/react-native-device-info/compare/v8.0.7...v8.0.8) (2021-03-31)
100
101
102### Bug Fixes
103
104* **ios:** update getIpAddress to support IPv6-only interfaces ([#1190](https://github.com/react-native-device-info/react-native-device-info/issues/1190)) ([c977f30](https://github.com/react-native-device-info/react-native-device-info/commit/c977f30072c57b73c5e69969d6b5937b0baff042))
105
106## [8.0.7](https://github.com/react-native-device-info/react-native-device-info/compare/v8.0.6...v8.0.7) (2021-03-24)
107
108
109### Bug Fixes
110
111* get legacy serial number for old APIs ([#1056](https://github.com/react-native-device-info/react-native-device-info/issues/1056)) ([40aa45b](https://github.com/react-native-device-info/react-native-device-info/commit/40aa45b021addb329a6b6f652fd8e4ec9fc17a94))
112
113<!-- markdownlint-disable MD024 MD034 MD033 -->
114
115# CHANGELOG
116
117## 8.0.6
118- fix(ios, deviceType): support iOS-compiled app running on macOS (#1181, thanks @user-none!)
119- fix(ios, isEmulator): correct emulator detection for arm64 simulator (#1180, thanks @Arkkeeper!)
120
121## 8.0.5
122
123- fix: remove husky from postinstall entirely
124
125Apparently there is no way to conditionally run postinstall, and while
126we really want husky for contributors here, we must not fail on install
127of library consumers (and we don't want to install husky for everyone,
128even though it's a great package)
129
130## 8.0.4
131
132- fix: prefix husky install with with npm or package install fails
133
134Husky is just a pre-commit hook package we use for QA, quite unfortunate that as
135we ported to the next major version in v8.0.3 I broke the install for everyone. Apologies! @mikehardy
136
137## 8.0.3
138
139- fix(types, PowerState): use Partial<PowerState> vs union with '{}' (#1175, thanks @vvscode!)
140
141## 8.0.2
142
143- fix(hasNotch): fix missing Pixel 4a model name in devicesWithNotch.ts (@zarvedan)
144
145## 8.0.1
146
147- BREAKING: Fix the exporting and importing of typings in ES6 build module (#1164, thanks @diego-antonelli!)
148
149Note, if you use typescript, this requires a minimum version of typescript 3.8
150This change was inadvertently released without realizing it was a breaking change, apologies.
151It is close enough to the 8.0.0 release that it will stand here though, without bumping to 9.0.0
152
153## 8.0.0
154
155- BREAKING(ios, xcode): Xcode 12 required with #1137. Use 7.3.2 if you must use outdated Xcode (#1151)
156- feat(android, hms/gms): add ability to run without play services (#1156, thanks @saghul!)
157
1587.4.0 was inadvertently breaking. I hadn't realized any iOS developers failed to update Xcode to stable
159after an Xcode release. For a variety of reasons, you should always keep Xcode up to date, nevertheless
160dropping Xcode 11 support is breaking. Update your Xcode or use 7.3.2.
161
162## 7.4.0
163
164- feat(android, install referrer): add ability to run without install referrer (#1153, thanks @saghul!)
165- BREAKING feat(ios, catalyst): added DeviceTypeDesktop to getDeviceType() (#1137, thanks @exotexot!)
166- fix(android, install referrer): remove old install referrer api (#1150 @nicoburns!)
167- chore(ci, example): add ios/android CI, lint CI, de-lint project (@mikehardy)
168
169## 7.3.2
170
171- fix: remove deprecated way of retrieving INSTALL_REFERRER on Android (#965) (@Minishlink)
172
173### 7.3.1
174
175- fix(android, test): drop mockito to 3.6.28 to fix android test build break (thanks @jamsch!)
176
177### 7.3.0
178
179- feat(android, build): add ability to specify firebase bill of materials for iid versioning (#1133, thanks @Dimon70007!)
180- fix(notch): add Redmi 9 to hasNotch list (#1140, thanks @esgudnason!)
181- test: Adding more tests and refactoring some getters (#1136, thanks @schie!)
182- chore: dependency updates (@mikehardy)
183
184### 7.2.1
185
186- fix(test, mocks): extra comma syntax error in mock definition (#1134, thanks @DorianGrey!)
187
188### 7.2.0
189
190- feat(windows): implement additional methods (#1122, thanks @jaimecbernardo!)
191- feat(windows): port C# Windows implementation to C++ (#1113, thanks @jaimecbernardo!)
192- feat(test, mocks): adding rest of jest mocks (#1132, thanks @schie!)
193- fix(ios, keychain): change keychain access control to non-deprecated value (#1131, thanks @dmitry-bluescape!)
194
195### 7.1.0
196
197- feat(hasHms): added `hasHms` to indicate if Android device supports Huawei Mobile Services. (#1129, thanks @craig95!)
198- feat(hasGms): added `hasGms` to indicate if Android device supports Google Mobile Services. (#1129, thanks @craig95!)
199
200This release includes a truly enormous amount of testing and internal refactoring work that has made the module much
201easier to maintain, all courtesy of @schie in the form of a pile of PRs implementing the same. Thank you, Dustin Schie!
202
203### 7.0.2
204
205- fix(windows): remove use of Object.fromEntries (#1110, thanks @jaimecbernardo!)
206
207### 7.0.1
208
209- fix(hasNotch): fix missing Redmi 7 and Pixel 3a model name in devicesWithNotch.ts (#1107, thanks @tronin!)
210- fix(hasNotch): fix missing Samsung A21s model in devicesWithNotch (#1106, thanks @djhr!)
211
212### 7.0.0
213
214- BREAKING CHANGE: Increase iOS minimum to iOS 10. Stay on 6.x if you need to support iOS 9
215- fix(iOS): supporting `getFontScale` in App Extensions (#1097, thanks @schie!)
216- feat(mocks): add default set of mocks (#1102, thanks @schie!)
217
218The change to iOS10 minimum was required to fix getFontScale for App Extensions
219react-native 0.63 already requires iOS 10 minimum, so this is in harmony with the ecosystem
220
221### 6.2.0
222
223- feat(hooks): add useIsHeadphonesConnected hook (#1084, thanks again @schie!)
224
225### 6.1.0
226
227- feat(hooks): add useManufacturer hook (#1083, thanks @schie!)
228- fix(types): add returnType to getPowerState (#1082, thanks @ferdicus!)
229
230### 6.0.4
231
232- fix(android): fix swapped data/root values in getFreeDiskStorageSync (#1077, thanks @violetchow2611!)
233
234### 6.0.3
235
236- fix: Xcode 12 compatibility (thanks @radko93! #1075)
237
238### 6.0.2
239
240- fix(windows): Targetplatform change for cpp apps to use this module (#1072, thanks @tero-paananen!)
241
242### 6.0.1
243
244- Added the 2nd generation iPhone SE to the deviceNamesByCode list (#1068, thanks @steve-lorenz!)
245
246## 6.0.0
247
248- BREAKING CHANGE(android, storage): Replace`getTotalDiskCapacity` and `getFreeDiskStorage` implementations, original
249 implementations are `getTotalDiskCapacityOld` and `getFreeDiskStorageOld`. New implementation adds `Root` and `Data` file systems.
250 Old implementations are deprecated, they use deprecated Android APIs, and they will disappear in a future version.
251 This _should_ be a positive change as the resulting calculation should match Android settings storage calculation,
252 but the old API is there if you need it, and you can open an issue to discuss if necessary. (#1054, thanks @gabriel-franzoni-pier!)
253
254- BREAKING CHANGE(windows, vNext): The windows support has been ported from C# (react-native-windows <= 0.59) to C++
255 (react-native-windows >= 0.59). This drops support for react-native-windows lower than 0.59. The port
256 was developed and tested against react-native-windows 0.62.5. (1059#, thanks @tero-paananen!). The getTotalMemory APIs
257 were dropped in the process (it appears react-native-windows vNext does not support them)
258
259## 5.6.5
260
261- fix(hasNotch): add devices Blackview A30 (#1058, thanks @alexnaiman!)
262
263## 5.6.4
264
265- fix(android): fix missing Huawei P30 model name in devicesWithNotch.ts (@tronin)
266
267## 5.6.3
268
269- fix(ios): fix WkWebView crash from parallel getUserAgent calls (#1050, thanks @RojoHub!)
270
271## 5.6.2
272
273- fix(types): import LocationProviderInfo type, export result types (#1041, thanks @mikehardy)
274- fix: power connection and power save events were not triggering correctly (#1042, thanks @mikehardy)
275- fix(ios): correctly calculate ios low battery threshold (#1039, thanks @mikehardy)
276
277## 5.6.1
278
279- fix: react-native-web fix TypeError and battery (#1024) (thanks @jamesst20!)
280
281I want to say I especially appreciate the help on the react-native-web implementation.
282Anyone that wants to help this library work better for react-native-web is more than welcome!
283I (@mikehardy, the currently active maintainer here) do not use react-native-web so I need
284all the help I can get. Cheers!
285
286## 5.6.0
287
288- feat: Added syncUniqueId() for iOS devices (#922) (thanks @Bardiamist!)
289
290## 5.5.8
291
292- fix: iOS check HFP in addition to A2DP in isHeadphonesConnected (thanks @CaptainJeff!)
293
294## 5.5.7
295
296- fix: Android - build issues when building for electron (thanks @rcjmk10!)
297- chore: `yarn upgrade --latest`
298
299## 5.5.6
300
301- fix: Android - safely handle PackageManager death in InstallReferrerClient (@mikehardy)
302- chore: upgrade gradle + gradle-plugin
303- chore: update all javascript dependencies
304- chore: refresh-example to react-native 0.62.2
305- chore: de-lint
306
307## 5.5.5
308
309- fix: getModel on iOS now returns generic device type (e.g. "iPhone") if the specific model is unrecognized (@TheAlmightyBob)
310
311## 5.5.4
312
313- fix: memoization of static boolean return values (@jmheik)
314- fix: add mac catalyst compatibility to getCarrier (#973) (thanks @robertying!)
315- fix: add wider exception handling in install referrer (thanks @jmunozDevsu!)
316
317## 5.5.3
318
319- fix: add Redmi Note 9 to hasNotch list (#959) (thanks @euharrison!)
320
321## 5.5.2
322
323- fix: avoid crash if missing InstallReferrer permission on Android (#955) (@mikehardy)
324
325## 5.5.1
326
327- fix: RNDeviceInfo_powerStateDidChange event argument type error (@mikehardy)
328
329## 5.5.0
330
331- feat: add getInstallerPackageName for android (#912) (thanks @codecog!)
332- fix: switch to InstallReferrer API (#947) (thanks @skantus!)
333
334## 5.4.4
335
336- feat: add Huawei P Smart devices to notch list (#945) (thanks @sanborN!)
337
338## 5.4.3
339
340- fix: only reject once from DeviceCheck APIs (fixes Simulator crash) (@mikehardy)
341
342## 5.4.2
343
344- fix: remove yarn as a requirement (#943) (thanks @gie3d!)
345- chore: update dependencies (@mikehardy)
346
347## 5.4.1
348
349- fix: Fix getDeviceToken crash on IOS simulator (#929) (thanks @Taym95!)
350
351## 5.4.0
352
353- feat + fix: tabbed example, improved types, efficient Platform usage (thanks @zoontek!)
354- feat: Added getDeviceToken() using DeviceCheck API on iOS 11.0+ (thanks @AntoineDoubovetzky!)
355- fix: hasNotch correctly matches Xiaomi Mi 9 (thanks @BogdanTaranenko!)
356- docs: fix upgrade links in README TOC (thanks @Simek!)
357- docs: fix type in README useIsEmulator example (thanks @zusinShinpei!)
358
359## 5.3.1
360
361- types: fix Flow types (thanks @grit96!)
362
363## 5.3.0
364
365- feat: Added web support for isCameraPresent, isLocationEnabled, isAirplaneMode, getBaseOs, getFreeDiskStorage, getMaxMemory, getTotalDiskCapacity, getTotalMemory, getUsedMemory and battery/charging-related APIs. (thanks @robertherber!)
366
367## 5.2.0
368
369- feat: isHeadphonesConnected() / isHeadphonesConnectedSync() (thanks @chakrihacker!)
370
371## 5.1.0
372
373This release allows you to use the firebase iid library for unique ids - it's the backwards-compatible but future direction of unique ids on Android, you should move to it by using firebaseIidVersion in your android/build.gradle file ext{} block to specify the library version
374
375- feat: android native interoperability - determine isTablet from android native (thanks @andresesfm!)
376- feat: android unique ID forward-ported to firebase, w/great backwards-compatibility (thanks @andresesfm and Andres Aguilar!)
377
378## 5.0.1
379
380- re-package of 5.0.0 without change except delete accidental inclusion of example/android/app/build
381
382## 5.0.0
383
384- BREAKING: (from 4.0.2-rc.1) getDeviceType is constant now - no need for getDeviceTypeSync
385 This is a tiny breaking change, easy to adopt:
386 1. getDeviceTypeSync --> getDeviceType
387 1. `getDeviceType.then(type => {});` --> `let type = getDeviceType();`
388- feat: Hooks! Add `useBatteryLevel()`, `useBatteryLevelIsLow()`, `usePowerState` methods (thanks @magrinj!)
389- fix: iOS use CFBundleName if CFBundleDisplayName null (Fixes #846, thanks @rizwankce!)
390- chore: add support for 2019 iPads models in 'model' mapping (thanks Edward Wong!)
391- chore: add support for motorola one vision in hasNotch (thanks @euharrison!)
392- docs(README): Fixed link in TOC (thanks @martinvol!)
393- docs(README): Fixed example code hasNotch() - constant, no Promise (thanks @cereme!)
394- docs(README): Fixed example code getDeviceId() - constant, no Promise (thanks @adambutler!)
395- docs(README): Fixed getReadableVersion() sub-API references (thanks @djorkaeffalexandre!)
396- chore: yarn upgrade --latest to update dependencies (@mikehardy)
397
398## 4.0.2-rc.1
399
400- BREAKING: getDeviceType converted to a constant (minor breaking change, but will release as 5.0.0 just in case)
401
402## 4.0.1
403
404- released from 4.0.1-rc.1 without change
405
406## 4.0.1-rc.1
407
408- docs(README): link to v3->v4 migraiton guide
409- docs(CHANGELOG): entries for rest of 4.0.1-beta series
410
411## 4.0.1-beta.8
412
413- fix: iOS getBundleId incorrectly returning buildId vs bundleId
414- fix: hasNotch correctly matches Nokia 6.1 Plus
415
416## 4.0.1-beta.7
417
418- fix: iOS isTablet was always returning false
419- fix: hasSystemFeatureSync incorrectly returned Promise
420
421## 4.0.1-beta.6
422
423- fix: hasSystemFeatureSync incorrectly returning a Promise on iOS @mikehardy
424- fix: isTablet on iOS always returning false @mikehardy
425
426## 4.0.1-beta.5
427
428- fix: iOS getModel always returned generics @mikehardy
429
430## 4.0.1-beta.4
431
432- BREAKING CHANGE: rename getCameraPresence to isCameraPresent to match other booleans (#810) @mikehardy
433
434## 4.0.1-beta.3
435
436- fix: support Wifi IP address on Apple TV (https://github.com/react-native-community/react-native-device-info/pull/825) @gcesarmza
437
438## 4.0.1-beta.2
439
440- fix: android use googlePlayServicesIidVersion if available (https://github.com/react-native-community/react-native-device-info/pull/804 / Fixes #802) @mikehardy
441
442## 4.0.1-beta.1
443
444- BREAKING CHANGE: DeviceType: Renamed `Unknown` to `unknown` for consistency across the project (@johan-dutoit)
445- fix: typescript conversion mopup (@johan-dutoit)
446
447## 4.0.0 (released / revoked on npm)
448
449This was almost working but had some issues so was revoked on npmjs.com
450
451- Conversion to typescript (https://github.com/react-native-community/react-native-device-info/pull/799) thanks @johan-dutoit!
452
453## 3.1.4
454
455- fix: chain getReadableVersion APIs to JS vs native, protects web from native calls (Fixes #796)
456
457## 3.1.3
458
459- chore: add support for 2019 iPhone models in 'hasNotch' mapping
460
461## 3.1.2
462
463- fix: fix iOS crash in getModel for unknown modules (https://github.com/react-native-community/react-native-device-info/pull/791) thanks @rbscott!
464
465The above PR also included a refresh/update of the iOS model list and improved getModel caching - a thorough job
466
467## 3.1.1
468
469- fix: fix react-native-windows v2->v3 migration (https://github.com/react-native-community/react-native-device-info/pull/787) thanks @acoates-ms!
470
471## 3.1.0
472
473- feat: add power functionality in Android to match iOS (https://github.com/react-native-community/react-native-device-info/pull/775) thanks @Johan-dutoit!
474
475## 3.0.0
476
477- release: promoted release from 3.0.0-rc.5 without change
478
479## 3.0.0-rc.5
480
481- fix: various fixes similar to / prompted by #771 / #768 / #769
482- fix: getSystemName() returns value on ios+android [#771](https://github.com/react-native-community/react-native-device-info/issues/771) thanks @cmpayc!
483- fix: getUniqueId() only returned value 1st call [#768](https://github.com/react-native-community/react-native-device-info/issues/768) thanks @tamhv!
484- fix: getModel() not working on iOS [#769](https://github.com/react-native-community/react-native-device-info/pull/769) Thanks @rnnyrk!
485
486## 3.0.0-rc.4
487
488- feat: memoize static return values for performance
489
490## 3.0.0-rc.3
491
492- fix: TypeScript getPowerState() return type was Object instaed of PowerState interface
493- fix: TypeScript definition file was missing getPhoneNumberSync()
494
495## 3.0.0-rc.2
496
497- Added a sync version of each API call, in practice it is very difficult to consume async
498 APIs during app bootstrap and device info is frequently fundamental to app startup behavior.
499 This still preserves the change away from paying the entire cost of information retrieval at
500 startup - now you will only pay for exactly what you need.
501
502## 3.0.0-rc.1
503
504- fix incorrect use of macos for API selection vs ios in rc.3, rendering ios builds mostly useless
505- verified last of the v2->v3 discrepancies, this is a release candidate now
506
507## 3.0.0-beta.3
508
509- fix some real android device v2->v3 discrepancies
510- BREAKING CHANGE: more capitalization changes for API calls to standardize (see below)
511- BREAKING CHANGE: more return value changes to standardize return values (see below)
512- feat: you no longer have to be careful with platform-specific APIs, all APIs will work, just
513 returning standard "unknown" return values (see above breaking change, and example App.js usage)
514
515## 3.0.0-beta.2
516
517- fix all emulator/simulator v2->v3 discrepancies
518
519## 3.0.0-beta.1
520
521Each BREAKING CHANGE contains the required information to migrate. The example App.js shows sample usage.
522
523- BREAKING CHANGE: Every API call returns a Promise now (and thus no more Android constructor with async boolean argument)
524 - This was required to improve module load speed, handle dynamic values, and release the main queue for iOS
525- BREAKING CHANGE: Every API call with acronyms ('getIP', 'getABI' etc follows pure camel-case now, e.g. 'getIp', 'getAbi')
526 - This naming style is a consensus standard. Previously APIs here were half one way half the other. Now they are consistent
527 - isAirPlaneMode -> isAirplaneMode
528 - getIPAddress -> getIpAddress
529 - getMACAddress -> getMACAddress
530 - getAPILevel -> getApiLevel
531 - getBaseOS -> getBaseOs
532 - getInstanceID -> getInstanceId
533 - getUniqueID -> getUniqueId
534 - supportedABIs -> supportedAbis
535- BREAKING CHANGE: all events prefixed with 'RNDeviceInfo\_' (https://github.com/react-native-community/react-native-device-info/issues/620)
536 - This is required as event names are a global namespace and collisions are inevitable otherwise
537 - powerStateDidChange -> RNDeviceInfo_powerStateDidChange
538 - batteryLevelDidChange -> RNDeviceInfo_batteryLevelDidChange
539 - batteryLevelIsLow -> RNDeviceInfo_batteryLevelIsLow
540- BREAKING CHANGE: Android `getBuildNumber` returns string like iOS (https://github.com/react-native-community/react-native-device-info/pull/648)
541- BREAKING CHANGE: remove is24Hour, getTimezone, isAutoTimeZone and isAutoDateAndTime, getDeviceLocale, getDeviceCountry, getPreferredLocales
542 - This was the result of a survey. It removes API duplication in the react-native-community modules
543 - Related PR: https://github.com/react-native-community/react-native-localize/pull/65
544 - Use `yarn add https://github.com/mikehardy/react-native-localize.git#e062f0d2dc3171dc18fdb7b7139d347ad03933dc` to maintain isAutoTimeZone + isAutoDateAndTime until merged
545- BREAKING CHANGE: iOS switch deprecated WebView for WebKit / getUserAgent returns Promise (https://github.com/react-native-community/react-native-device-info/pull/757)
546 - The change from WebView to WebKit was required as the API is being removed from the iOS platform
547- 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
548 - This was how most APIs behaved before but it was not 100% - some returned null or empty string before
549 - getPhoneNumber sometimes returned null, now it will be 'unknown' if not known
550- deprecated: IP-address-related methods deprecated - use @react-native-community/netinfo or react-native-network-info or react-native-carrier-info
551- feat: all APIs are now restricted in Javascirpt to the platforms they have full implementations on so the web polyfill is up to date
552- feat: 'getAndroidId' on Android returns android.provider.Settings.Secure.ANDROID_ID, read platform docs for usage
553- feat: `getUsedMemory` (https://github.com/rebeccahughes/react-native-device-info/pull/356)
554- feat: getDeviceName() without Bluetooth permission on Android (https://github.com/react-native-community/react-native-device-info/issues/735)
555- feat: TurboModule support (https://github.com/react-native-community/react-native-device-info/pull/745) for these purposes (https://github.com/react-native-community/react-native-localize/pull/65)
556- feat: allow for destructured ES6 imports (https://github.com/react-native-community/react-native-device-info/pull/727)
557- feat: update gradle, add react-native devDependency and build.gradle reference to enhance module developer experience
558- fix: remove unnecessary gradle depencies (https://github.com/react-native-community/react-native-device-info/pull/746)
559- chore: de-linted all Java code, all Markdown
560
561## 2.3.2
562
563- fix: load module async by default with option to load sync (https://github.com/react-native-community/react-native-device-info/pull/741)
564
565## 2.3.1
566
567- fix: add Huawei P30 devices to isNothc list (https://github.com/react-native-community/react-native-device-info/pull/734)
568
569## 2.3.0
570
571- feat: AndroidX support (backwards/forwards compatible) (https://github.com/react-native-community/react-native-device-info/pull/733)
572- fix: isTablet() Android using Google-recommended / robust style (https://github.com/react-native-community/react-native-device-info/pull/730)
573
574## 2.2.2
575
576- fix: re-fix crash PR #714, API level should be 24 (https://github.com/react-native-community/react-native-device-info/pull/715)
577
578## 2.2.1
579
580- fix: crash on android api level less than 23 (https://github.com/react-native-community/react-native-device-info/pull/714)
581
582## 2.2.0
583
584- feat: sync some methods from flutter (https://github.com/react-native-community/react-native-device-info/pull/711)
585
586## 2.1.4
587
588- fix: additional checking in simulation method (https://github.com/react-native-community/react-native-device-info/pull/710)
589- docs(README): Add detail to ios getUniqueID() docs (https://github.com/react-native-community/react-native-device-info/pull/707)
590
591## 2.1.3
592
593- fix: add missing devices to devices with notch list (https://github.com/react-native-community/react-native-device-info/pull/702)
594
595## 2.1.2
596
597- build(Android): constrain play services dependency to pre-AndroidX 16.1.0 (https://github.com/react-native-community/react-native-device-info/pull/693)
598
599## 2.1.1
600
601- fix(Android): Avoid NullpointerException on install referer listener (https://github.com/react-native-community/react-native-device-info/pull/685)
602
603## 2.1.0
604
605- perf(Android): getConstants() optionally loaded in thread, speedup for most, init MainApplication with RNDeviceInfo(true) (https://github.com/react-native-community/react-native-device-info/pull/680)
606
607## 2.0.4
608
609- fix: Add Xiaomi Redmi Note 7 to devicesWithNotch list (https://github.com/react-native-community/react-native-device-info/pull/682)
610
611## 2.0.3
612
613- fix: adding conditions for tvOS location providers (https://github.com/react-native-community/react-native-device-info/pull/678)
614- docs: refresh example app and fix it so it works with tvOS
615- docs: alter API Chart in README.md - isAutoDateAndTime and isAutoTimeZone return Promise (https://github.com/react-native-community/react-native-device-info/pull/677)
616
617## 2.0.2
618
619- fix: checking for tvOS before attempting to get `isBatteryMonitoringEnabled` flag as tvOS doesn't support it (https://github.com/react-native-community/react-native-device-info/pull/673)
620- types: make the typescript location / power returns specific (https://github.com/react-native-community/react-native-device-info/pull/669)
621- chore: move ios device model dictionary from native to javascript (https://github.com/react-native-community/react-native-device-info/pull/670)
622
623## 2.0.1
624
625- fix: `getFreeDiskStorage()` to use `StatFs` methods that return `long` instead of `int` (which are now deprecated)
626 (https://github.com/react-native-community/react-native-device-info/pull/672)
627
628## 2.0.0
629
630- breaking: no functional change from 1.8.0, but isLocationEnabled requires minCompileSdk 28
631
632## 1.8.0 (unpublished: unintended breaking change)
633
634- feat: Add `isLocationEnabled()`, `getAvailableLocationProviders()` methods (https://github.com/react-native-community/react-native-device-info/pull/664)
635
636## 1.7.0
637
638- feat: Add `getCameraPresence()` method (https://github.com/react-native-community/react-native-device-info/pull/474)
639
640## 1.6.2
641
642- fix: added v to tag name in podspec (https://github.com/react-native-community/react-native-device-info/pull/660)
643- docs: Update README.md to have correct Podspec name (https://github.com/react-native-community/react-native-device-info/pull/656)
644
645## 1.6.1
646
647- fix: fix building issue on tvOS / headers on iOS (https://github.com/react-native-community/react-native-device-info/pull/652)
648- chore: fix pointer types in iOS build (https://github.com/react-native-community/react-native-device-info/pull/649)
649
650## 1.6.0
651
652- feat: implement hasSystemFeature() method for Android devices (https://github.com/react-native-community/react-native-device-info/pull/646)
653
654## 1.5.1
655
656- chore: Update deviceinfo.js entry for xioami mi 8 lite (https://github.com/react-native-community/react-native-device-info/pull/644)
657
658## 1.5.0
659
660- feat: Add `getBuildId` method to gets build number of the operating system. (https://github.com/react-native-community/react-native-device-info/pull/640)
661
662## 1.4.3
663
664- chore: Add Xiaomi Mi A2 Lite to devices with notch (https://github.com/react-native-community/react-native-device-info/pull/634)
665- feat: Throw error if native module is null w/steps to help fix (https://github.com/react-native-community/react-native-device-info/pull/630)
666
667## 1.4.2
668
669- fix: Use `RCTSharedApplication` so compile works for ios app extensions (https://github.com/react-native-community/react-native-device-info/pull/408)
670- chore: Add 3rd generation iPad pro to device/model list (https://github.com/react-native-community/react-native-device-info/pull/618)
671- feat: Support `getUserAgent()` on old androids (API level <= 16) (https://github.com/react-native-community/react-native-device-info/pull/545)
672- chore: Add Huweai INE-LX1 to devices with notch (https://github.com/react-native-community/react-native-device-info/pull/624)
673
674### iOS notice
675
676This 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
677
678## 1.4.1
679
680- fix: repair flow types from #436 - 'Object' vs 'object'
681
682## 1.4.0
683
684- feat: add battery monitoring and detailed power state getter (https://github.com/react-native-community/react-native-device-info/pull/436)
685
686## 1.3.0
687
688- feat: Add support for preferred languages function (https://github.com/react-native-community/react-native-device-info/pull/610)
689
690## 1.2.0
691
692- feat: Support 'dom' Platform.OS for react-native-dom (https://github.com/react-native-community/react-native-device-info/pull/406)
693- feat: Add support for jest snapshot testing (https://github.com/react-native-community/react-native-device-info/pull/375)
694- fix: Use API-specific permissions to get phone number (https://github.com/react-native-community/react-native-device-info/pull/269)
695- fix: Add OnePlus A6010 to devicesWithNothc list (https://github.com/react-native-community/react-native-device-info/pull/604)
696- fix: use reactContext vs getApplicationContext() (https://github.com/react-native-community/react-native-device-info/pull/382)
697- fix: dynamic reference path on windows depending on environment (https://github.com/react-native-community/react-native-device-info/pull/608)
698
699## 1.1.0
700
701- Add `supportedABIs()` (https://github.com/react-native-community/react-native-device-info/pull/598)
702
703## 1.0.1
704
705- fix: Add Nokia 7.1 to devicesWithNotch list (https://github.com/react-native-community/react-native-device-info/pull/597)
706
707## 1.0.0
708
709- First major version, features (and bugs) copied from 0.29.1
710
711## 0.29.1
712
713- Fix lint errors (library dependences, ignore permissions) (https://github.com/react-native-community/react-native-device-info/pull/590)
714
715> On March 12 2019, this repository was moved from https://github.com/rebeccahughes/react-native-device-info
716> to https://github.com/react-native-community/react-native-device-info
717
718## 0.29.0
719
720- Add `isAutoDateAndTime()` and `isAutoTimeZone()` (https://github.com/react-native-community/react-native-device-info/pull/583)
721
722## 0.28.1
723
724- Add 'POCOPHONE F1' to list of notch devices (https://github.com/react-native-community/react-native-device-info/pull/584)
725
726## 0.28.0
727
728- Updated Android SDK to version 28 (https://github.com/react-native-community/react-native-device-info/pull/548)
729
730## 0.27.1
731
732- Enabled battery monitoring mode to get actual battery data (https://github.com/react-native-community/react-native-device-info/pull/404)
733
734## 0.27.0
735
736- Added `isBatteryCharging()` (https://github.com/react-native-community/react-native-device-info/pull/514)
737
738## 0.26.5
739
740- Use BigInteger to avoid overflow in Disk related functions (https://github.com/react-native-community/react-native-device-info/pull/587)
741
742## 0.26.4
743
744- Fix hasNotch() support for LG phones (https://github.com/react-native-community/react-native-device-info/pull/573)
745
746## 0.26.3
747
748- Fixed getDeviceType method (https://github.com/react-native-community/react-native-device-info/pull/571)
749
750## 0.26.2
751
752- Added Huawei P20 Lite to notch devices (https://github.com/react-native-community/react-native-device-info/pull/568)
753
754## 0.26.1
755
756- Added OnePlus 6T to notch devices (https://github.com/react-native-community/react-native-device-info/pull/563)
757
758## 0.26.0
759
760- Added `getDeviceType()` and used it in `isTablet()` (https://github.com/react-native-community/react-native-device-info/pull/560)
761
762## 0.25.1
763
764- Added Google Pixel 3XL to notch devices (https://github.com/react-native-community/react-native-device-info/pull/535)
765
766## 0.25.0
767
768- Added `isAirPlaneMode()` (https://github.com/react-native-community/react-native-device-info/pull/524)
769- Compare `hasNotch()` devices with lowercase (https://github.com/react-native-community/react-native-device-info/pull/537)
770- Added several devices to `hasNotch()` (#533, #549, #550)
771
772## 0.24.3
773
774- Support React Native Windows 0.57, minimal version is now 10.0.14393 for the target platform
775
776## 0.24.2
777
778- Update typescript definitions (https://github.com/react-native-community/react-native-device-info/pull/498)
779
780## 0.24.1
781
782- Update build.gradle to remove compile warning (https://github.com/react-native-community/react-native-device-info/pull/520)
783
784## 0.24.0
785
786- Added `isLandscape()` (https://github.com/react-native-community/react-native-device-info/pull/504)
787
788## 0.23.0
789
790- Add `hasNotch()` (https://github.com/react-native-community/react-native-device-info/pull/500)
791
792## 0.22.6
793
794- Support new models (XR, XS, XS Max) and iPad 6th Gen (https://github.com/react-native-community/react-native-device-info/pull/499)
795
796## 0.22.5
797
798- Fix typescript declaration export (https://github.com/react-native-community/react-native-device-info/pull/478)
799
800## 0.22.4
801
802- Shrank the npm package size (https://github.com/react-native-community/react-native-device-info/issues/477)
803
804## 0.22.3
805
806- Fixed `eslint-plugin-import` error (https://github.com/react-native-community/react-native-device-info/pull/466)
807
808## 0.22.2
809
810- Fixed Android build error introduced in 0.22.1 (https://github.com/react-native-community/react-native-device-info/pull/460)
811
812## 0.22.1
813
814- Fix deprecated code on Android in the following methods (https://github.com/react-native-community/react-native-device-info/pull/426)
815- getDeviceCountry
816- getDeviceLocale
817
818## 0.22.0
819
820- Add support for `getIpAddress` and `getMacAddress` on iOS (https://github.com/react-native-community/react-native-device-info/commit/41735bd0b2efe1f626afc066604f27073acb9d4c)
821
822## 0.21.5
823
824- Rolled back the Pod change made in 0.21.1
825
826## 0.21.4
827
828- Move back the podspec file to the root directory (https://github.com/react-native-community/react-native-device-info/pull/376)
829
830## 0.21.3
831
832- Moved the IOS code to an ios/ directory (https://github.com/react-native-community/react-native-device-info/pull/374)
833
834## 0.21.2
835
836- Fix getBatteryLevel() for tvOS (always return 1) (https://github.com/react-native-community/react-native-device-info/pull/363)
837
838## 0.21.1
839
840- Remove deprecated React pod dependency (https://github.com/react-native-community/react-native-device-info/pull/361)
841
842## 0.21.0
843
844- Add more gradle configuration properties `compileSdkVersion`, `buildToolsVersion`, `targetSdkVersion` (https://github.com/react-native-community/react-native-device-info/pull/343)
845
846## 0.20.0
847
848- Made the following methods compatible with UWP: (https://github.com/react-native-community/react-native-device-info/pull/345)
849 - `getBatteryLevel()`
850 - `getFirstIntallTime()`
851 - `getIPAddress()`
852 - `getMaxMemory()`
853 - `isPinOrFingerprintSet()`
854
855## 0.19.0
856
857- Add `getInstallReferrer` (https://github.com/react-native-community/react-native-device-info/pull/344)
858
859## 0.18.0
860
861- Add `getBatteryLevel` (https://github.com/react-native-community/react-native-device-info/pull/359)
862
863## 0.17.4
864
865- Fix `getMACAddress` for Android > 6 (https://github.com/react-native-community/react-native-device-info/pull/349)
866
867## 0.17.3
868
869- Fix production build crash on Android introduced in #313
870
871## 0.17.2
872
873- Enhance `isTablet()` for android by checking display density (https://github.com/react-native-community/react-native-device-info/pull/313)
874- Changed iOS target deployment from 9.0 to 8.0 for broader device support (https://github.com/react-native-community/react-native-device-info/issues/19)
875
876## 0.17.1
877
878- Fix bad import for web polyfill
879
880## 0.17.0
881
882- Add an empty polyfill for `react-native-web` users (https://github.com/react-native-community/react-native-device-info/pull/339)
883
884## 0.16.0
885
886- Add the `googlePlayServicesVersion` Gradle build config that allows you to set the Play Services version from the root-project (https://github.com/react-native-community/react-native-device-info/pull/333)
887
888## 0.15.3
889
890- Fix crash on iOS: prevent insertion of nil values in the dictionary (https://github.com/react-native-community/react-native-device-info/pull/328)
891
892## 0.15.2
893
894- Fix crash on `getFreeDiskStorage` and `getTotalDiskCapacity` from invalid filesystem path (https://github.com/react-native-community/react-native-device-info/issues/320)
895
896## 0.15.1
897
898- Fix Android compatibility for `getFreeDiskStorage` and `getTotalDiskCapacity` (https://github.com/react-native-community/react-native-device-info/pull/319)
899
900## 0.15.0
901
902- Add `getFontScale` (https://github.com/react-native-community/react-native-device-info/pull/278)
903- Add `getFreeDiskStorage` and `getTotalDiskCapacity` (https://github.com/react-native-community/react-native-device-info/pull/302)
904- Fix missing flow definition for `getApplicationName`
905
906## 0.14.0
907
908- Fix tvOS support (https://github.com/react-native-community/react-native-device-info/pull/283)
909- Introduced `getApplicationName` to see the name of the app both on ios, android and win
910 - https://github.com/react-native-community/react-native-device-info/pull/210
911 - https://github.com/react-native-community/react-native-device-info/pull/295
912- Added `getTotalMemory` and `getMaxMemory` (https://github.com/react-native-community/react-native-device-info/pull/289)
913- Fix iOS undefined native module error (https://github.com/react-native-community/react-native-device-info/pull/276)
914- Fix crash on `getUserAgent` when Webview is not installed (https://github.com/react-native-community/react-native-device-info/pull/273)
915
916## 0.13.0
917
918- Add `getCarrier` (https://github.com/react-native-community/react-native-device-info/pull/261)
919- Disable `isPinOrFingerprintSet` for tvOS (https://github.com/react-native-community/react-native-device-info/pull/270)
920- Add `is24Hour` (https://github.com/react-native-community/react-native-device-info/pull/265)
921- Remove unused windows dependency (https://github.com/react-native-community/react-native-device-info/pull/263)
922- Add missing typescript definitions (https://github.com/react-native-community/react-native-device-info/pull/254)
923- Make play-services optional (https://github.com/react-native-community/react-native-device-info/pull/226)
924
925## 0.12.1
926
927- Critical fix on WIFI STATE (https://github.com/react-native-community/react-native-device-info/pull/249)
928
929## 0.12.0
930
931- Get real WebView UserAgent on Android (https://github.com/react-native-community/react-native-device-info/pull/207)
932- Add DeviceUID.h to public headers (https://github.com/react-native-community/react-native-device-info/pull/217)
933- Add `getPhoneNumber` (https://github.com/react-native-community/react-native-device-info/pull/174)
934- Fix typescript definitions (https://github.com/react-native-community/react-native-device-info/pull/221)
935- Add `getFirstInstallTime` and `getLastUpdateTime` (https://github.com/react-native-community/react-native-device-info/pull/222)
936- Added version check and permission to work with Android API >= 16 (https://github.com/react-native-community/react-native-device-info/pull/225)
937- Added device detection even when in an iOS emulator (https://github.com/react-native-community/react-native-device-info/pull/224)
938- Add support for new iPhone, iPad, and Apple TV models (https://github.com/react-native-community/react-native-device-info/pull/230)
939- Add android only `getAPILevel` method (https://github.com/react-native-community/react-native-device-info/pull/232)
940- Add Android support for serial number, IP, and MAC address (https://github.com/react-native-community/react-native-device-info/pull/150)
941- Add tvOS support (https://github.com/react-native-community/react-native-device-info/pull/235)
942- Add flow types
943- Fix getCurrentActivity() null crash in Android (https://github.com/react-native-community/react-native-device-info/pull/247)
944
945[Diff](https://github.com/react-native-community/react-native-device-info/compare/1aafc6f0b20d7cd6f0939ea5370e9899e4914c93...master)
946
947## 0.11.0
948
949- Add support for RN > 0.47
950- Update typescript definitions
951
952[Diff](https://github.com/react-native-community/react-native-device-info/compare/5b869cdd5e16b65cbe4e85a565aa331bd7546b89...1aafc6f0b20d7cd6f0939ea5370e9899e4914c93)
953
954## 0.10.2
955
956- Add typescript definitions
957
958[Diff](https://github.com/react-native-community/react-native-device-info/compare/f3967862711892615e7f51d49d0034ee134f3e3d...5b869cdd5e16b65cbe4e85a565aa331bd7546b89)
959
960## 0.10.1
961
962- Add `isPinOrFingerprintSet` method
963- Add support for RN > 0.40
964
965[Diff](https://github.com/react-native-community/react-native-device-info/compare/c843144ea872a79f4d53a53b32f72511fbfc8d8b...f3967862711892615e7f51d49d0034ee134f3e3d)
966
967## 0.10.0
968
969- Semver fix
970
971[Diff](https://github.com/react-native-community/react-native-device-info/compare/e8bfe5ea8d5f5414f2f97f35a5d02b611cbe39e3...c843144ea872a79f4d53a53b32f72511fbfc8d8b)
972
973## 0.9.8
974
975[Diff](https://github.com/react-native-community/react-native-device-info/compare/668996c64e23f477fc8156cdc43a49198b4fdd20...e8bfe5ea8d5f5414f2f97f35a5d02b611cbe39e3)
976
977## 0.9.7
978
979Several bugfixes and detecting if device is a tablet
980
981## 0.9.3
982
983adds support for Brand information e.g. apple, htc, etc
984
985## 0.9.1
986
987adds support for the iPhone SE and new iPad Pro
988
989## 0.9.0
990
991adds support for device country and changes the iOS device name to match Apple branding
992
993## 0.8.4
994
995don't use destructuring
996
997## 0.8.3
998
999removes the default bluetooth permission
1000
1001## 0.8.2
1002
1003change deployment target to iOS 8
1004
1005## 0.8.1
1006
1007removes unnecessary peerDependencies
1008
1009## 0.8.0
1010
1011tweaks how device locale works on Android. If it's available it will use the toLanguageTag that is more inline with iOS. (See #14)
1012
1013## 0.7.0
1014
1015adds two new parameters, Device Locale and User Agent.
1016
1017## 0.5.0
1018
1019adds 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".