-
-
Notifications
You must be signed in to change notification settings - Fork 238
Feat/v6 #449
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ndroid - Updated CMakeLists.txt to link additional libraries. - Enhanced build.gradle to include androidx.security:security-crypto for secure storage. - Modified gradle.properties to update Kotlin and SDK versions. - Refactored SensitiveInfo.kt to utilize EncryptedSharedPreferences for secure data storage. - Created SensitiveInfoPackage.kt for module registration. - Updated example app to demonstrate secure storage features with a comprehensive UI. - Added performance testing and demo data loading functionalities in the example app. - Improved iOS implementation in SensitiveInfo.swift for secure storage using Keychain. - Updated package.json version to 6.0.0 and adjusted dependencies. - Added unit tests for the secure storage API.
…torage options - Introduced `BiometricSecurityDemo` component for demonstrating biometric storage and retrieval. - Updated `App.tsx` to include the new biometric security demo component. - Enhanced iOS `SensitiveInfo` implementation to support biometric and StrongBox security levels. - Updated `SensitiveInfo.nitro.ts` to define new security levels and options for biometric authentication. - Created `useSensitiveInfo` hook to manage sensitive data with biometric capabilities. - Implemented utility functions for biometric authentication in `BiometricAuthenticator.ts`. - Updated existing storage methods to accept security level options. - Added comprehensive error handling and user feedback for biometric operations.
…security status display - Updated project.pbxproj to include PrivacyInfo.xcprivacy file. - Removed unnecessary PBXContainerItemProxy and PBXTargetDependency sections. - Enhanced SensitiveInfo.swift with conditional imports and improved error handling. - Introduced SecurityLevel and StorageOptions structs for better configuration. - Implemented async/await pattern for keychain operations. - Added SwiftUI views for displaying sensitive info security status and demo operations. - Improved biometric and strongbox availability checks. - Updated demo view to allow storing, retrieving, and removing sensitive data with selected security levels.
…apabilities checks - Updated package.json to include new dependencies for navigation and security context. - Introduced SecurityCapabilitiesDemo component to display device security capabilities and test smart fallback functionality. - Enhanced App component to include SecurityCapabilitiesDemo. - Implemented getSecurityCapabilities function to retrieve device security features. - Modified iOS SensitiveInfo.swift to support smart fallback for security levels. - Updated index.ts to export new security capabilities function.
…and modify module name in nitro.json
Upgraded Android and iOS build tools, Gradle, and React Native dependencies to latest versions. Refactored Android SensitiveInfo implementation for improved documentation and clarity, and updated example app to use new React Native entry points. Removed deprecated biometric and storage demo components, added new SecurityDemo, and updated project configuration for edge-to-edge support and immersive UI.
Added display of device security capabilities (biometric, strongbox, recommended level) and an explanation of storage selection logic. The UI now also shows which store is expected to be used for each operation, improving transparency for users testing secure storage behavior.
- Implemented AndroidBiometricModule and AndroidBiometricPackage for biometric authentication on Android. - Created TransparentBiometricActivity to handle biometric prompts in a transparent manner. - Added HybridBiometricPromptView and HybridBiometricPromptViewManager for React Native integration. - Updated SensitiveInfo class to include biometric authentication checks before accessing sensitive data. - Enhanced iOS support with LocalAuthenticationModule and HybridBiometricPromptView for biometric prompts. - Updated README.md with troubleshooting tips for Face ID on iOS and biometric prompts on Android. - Added styles for transparent activity in Android. - Updated Podfile.lock and Info.plist for necessary permissions and dependencies. - Modified SecurityDemo component to utilize new biometric authentication features.
…n storage functions
Removed legacy configuration, scripts, and code related to the previous project structure, including old Android and iOS modules, React Native config, and various setup files. Introduced new GitHub Actions workflows for Android and iOS builds, added release workflow, and updated .gitignore and project metadata. Migrated Android and iOS source files to new locations and updated example app structure to match new module organization.
Introduces a new Android implementation for secure storage using the Android Keystore, supporting biometric authentication and device credentials. Adds internal modules for cryptography, storage, and utility functions, and updates the main HybridSensitiveInfo module to use these. Updates dependencies to include androidx.biometric. Refactors package initialization to manage React context. Example app minor cleanup.
Added detailed KDoc and Swift doc comments to core SensitiveInfo classes and methods for both Android and iOS, improving maintainability and developer understanding. Introduced custom exception handling for not-found errors on Android, with matching error mapping in the TypeScript bridge to return null for missing items. Updated the example app to better handle value inclusion and UI state. These changes enhance cross-platform consistency, error reporting, and code clarity.
Added .prettierrc.js and eslint.config.mts for code formatting and linting. Upgraded Yarn to 4.10.3 and updated .yarnrc.yml and package.json. Made code and dependency updates in android, example, and src files to align with new tooling.
Enhanced the README with new section icons, improved table of contents, and added helpful tips and notes for users. Updated section headers for clarity, included usage tips, and provided additional guidance for simulators, Expo, and development workflows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR represents a major architectural overhaul of the react-native-sensitive-info library, migrating from a traditional React Native bridge-based implementation to a modern Nitro Modules architecture for version 6.0.
Key changes include:
- Complete migration from React Native bridge to Nitro Modules for better performance and type safety
- Removal of legacy Windows C++/C# implementations and iOS Objective-C code
- Introduction of new TypeScript-first API with enhanced security features and metadata tracking
Reviewed Changes
Copilot reviewed 196 out of 229 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Updated to v6.0.0-rc.1 with Nitro dependencies and modern build tooling |
| src/index.ts | New TypeScript API implementation with Promise-based methods and enhanced options |
| src/views/sensitive-info.nitro.ts | Nitro module type definitions with comprehensive security and metadata interfaces |
| ios/HybridSensitiveInfo.swift | New Swift implementation using iOS Keychain with hardware security support |
| nitro.json | Nitro module configuration for cross-platform code generation |
| release.config.cjs | Semantic release configuration for automated publishing |
Files not reviewed (2)
- example/ios/SensitiveInfoExample.xcworkspace/contents.xcworkspacedata: Language not supported
- ios/RNSensitiveInfo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: Language not supported
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
No description provided.