Feat/android biometric14 #532
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces several important updates and improvements across Android, iOS, and project configuration files. The main focuses are on enhancing platform compatibility, updating dependencies, improving biometric authentication UX, and ensuring better interoperability between TypeScript and native modules.
Platform Compatibility & API Improvements
The
HybridSensitiveInfoclass in both Android (HybridSensitiveInfo.kt) and iOS (HybridSensitiveInfo.swift) now returns a discriminated union (Variant_NullType_SensitiveInfoItem) instead of nullable types forgetItem, aligning with TypeScript expectations and improving type safety. Constructors and error handling are added to ensure correct variant creation on Android, and all relevant iOS methods are madepublicfor better cross-platform access. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]The Android implementation adds
@DoNotStripand@Keepannotations to prevent code stripping during ProGuard/R8 minification, ensuring the module remains accessible from JavaScript. [1] [2]Biometric Authentication
androidx.biometric:biometric-ktx:1.4.0-alpha02and updates the biometric prompt to disable confirmation where supported, streamlining the user experience while maintaining security. [1] [2]Dependency & Project Configuration Updates
Updates a wide range of dependencies in both root and example
package.jsonfiles, including React, React Native, Nitro Modules, ESLint, Prettier, and others, to their latest versions for improved stability and compatibility. [1] [2] [3] [4]Enables Gradle parallel build for faster Android builds and updates the biometric library version.
Updates iOS project settings for improved build reliability, including corrected
REACT_NATIVE_PATHreferences, shell script quoting, and inheritance of compiler flags. [1] [2] [3] [4] [5]Summary of Most Important Changes
Cross-Platform API Consistency and Safety
Changed
getItemon both Android and iOS to return a discriminated union (Variant_NullType_SensitiveInfoItem) instead of nullable types, ensuring better type safety and alignment with TypeScript expectations. All iOS methods are nowpublicfor improved interoperability. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]Added
@DoNotStripand@Keepannotations to AndroidHybridSensitiveInfoto prevent code stripping by ProGuard/R8. [1] [2]Biometric Authentication Enhancements
biometric-ktx:1.4.0-alpha02and improved biometric prompt UX by disabling confirmation where supported. [1] [2]Dependency Updates
Build & Project Configuration
REACT_NATIVE_PATH, shell script quoting, and compiler flags inheritance). [1] [2] [3] [4] [5] [6]