You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(android): prevent crash in getHasGms() when play-services-base is missing (#42)
* fix(android): prevent crash in getHasGms() when play-services-base is missing
* refactor(android): catch NoClassDefFoundError explicitly instead of Throwable
Address PR review feedback: catching Throwable is too broad and can mask
serious JVM errors like OutOfMemoryError or StackOverflowError.
Now catches Exception and NoClassDefFoundError separately for more
explicit error handling.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,19 @@ All notable changes to this project will be documented in this file.
5
5
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
8
+
## [1.4.1]
9
+
10
+
### Fixed
11
+
12
+
-**iOS**: `getIpAddress()` and `getIpAddressSync()` now consistently return IPv4 addresses when available ([#39](https://github.com/l2hyunwoo/react-native-nitro-device-info/issues/39))
13
+
- Previously, the functions could return IPv6 addresses inconsistently due to network interface enumeration order
14
+
- IPv4 addresses are now prioritized, with IPv6 used only as a fallback when no IPv4 is available
15
+
16
+
-**Android**: `getHasGms()` no longer crashes when `play-services-base` dependency is not included ([#40](https://github.com/l2hyunwoo/react-native-nitro-device-info/issues/40))
17
+
- Previously, calling `getHasGms()` without the GMS dependency would throw a JNI exception (`NoClassDefFoundError`)
18
+
- The function now catches `NoClassDefFoundError` explicitly (not `Throwable`) to avoid masking serious JVM errors
19
+
- This allows apps distributed on non-GMS stores (Amazon, Huawei AppGallery) to safely use this API
All getter functions have been converted to readonly properties for cleaner, more intuitive access ([#20](https://github.com/l2hyunwoo/react-native-nitro-device-info/pull/20)):
0 commit comments