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
This guide helps users migrate from older versions of `react-native-biometric-login` to version 2.0.22+ which includes Swift bridging header fixes and React Native 0.81.0+ compatibility.
5
+
6
+
## Breaking Changes
7
+
8
+
### React Native Version Requirement
9
+
-**Before**: Compatible with React Native 0.70.0+
10
+
-**After**: Requires React Native 0.81.0+
11
+
12
+
### iOS Framework Requirements
13
+
-**Before**: Worked with both static and dynamic frameworks
14
+
-**After**: Requires dynamic frameworks for Swift bridging header compatibility
15
+
16
+
## Migration Steps
17
+
18
+
### Step 1: Update React Native Version
19
+
Ensure your project uses React Native 0.81.0+:
20
+
21
+
```bash
22
+
# Check current version
23
+
npx react-native --version
24
+
25
+
# Update if needed (follow React Native upgrade guide)
26
+
npx react-native upgrade
27
+
```
28
+
29
+
### Step 2: Update Library Version
30
+
```bash
31
+
# Using yarn (recommended)
32
+
yarn add react-native-biometric-login@latest
33
+
34
+
# Using npm
35
+
npm install react-native-biometric-login@latest
36
+
```
37
+
38
+
### Step 3: Update iOS Configuration
39
+
40
+
#### Option A: Use Dynamic Frameworks (Recommended)
41
+
Update your `ios/Podfile`:
42
+
43
+
```ruby
44
+
# BEFORE (Old configuration)
45
+
use_frameworks! :linkage => :static
46
+
47
+
# AFTER (New configuration)
48
+
use_frameworks! :linkage => :dynamic
49
+
```
50
+
51
+
#### Option B: Keep Static Frameworks with Selective Dynamic
52
+
If you must keep static frameworks:
53
+
54
+
```ruby
55
+
# Keep static frameworks by default
56
+
use_frameworks! :linkage => :static
57
+
58
+
# Add post-install hook to make BiometricLogin dynamic
Copy file name to clipboardExpand all lines: README.md
+92-20Lines changed: 92 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,22 @@
2
2
3
3
A React Native module that enables biometric authentication and securely stores user credentials using native APIs. This library provides a comprehensive solution for implementing biometric login functionality in React Native applications with support for both iOS and Android platforms.
If you're upgrading from a version before 2.0.22, see the [Migration Guide](./MIGRATION_GUIDE.md) for important changes related to Swift bridging headers and React Native 0.81.0+ compatibility.
47
+
28
48
### ⚠️ Important: Codegen Configuration
29
49
30
50
This library uses React Native's new architecture and requires proper codegen configuration in your consuming app. If you encounter build errors related to missing generated sources, please see the [TROUBLESHOOTING.md](./TROUBLESHOOTING.md) guide.
@@ -56,6 +76,54 @@ cd ios && pod install
56
76
57
77
**💡 Pro tip**: If you're building the example app and encounter Ruby/bundler issues, you may need to run `bundle install` first to install the required Ruby gems for CocoaPods.
58
78
79
+
### ⚠️ Swift Bridging Header Compatibility
80
+
81
+
This library contains Swift code that requires proper framework linkage configuration. If you encounter build errors related to missing `BiometricLogin-Swift.h` files, you need to configure your project to use dynamic frameworks.
82
+
83
+
#### For Projects Using Static Frameworks (e.g., with Firebase)
84
+
85
+
**Option 1: Use Dynamic Frameworks (Recommended)**
86
+
Update your `ios/Podfile`:
87
+
88
+
```ruby
89
+
# Use dynamic frameworks by default for Swift bridging header compatibility
90
+
use_frameworks! :linkage => :dynamic
91
+
92
+
# Firebase configuration - Firebase will handle its own static linkage internally
93
+
$RNFirebaseAsStaticFramework=true
94
+
```
95
+
96
+
**Option 2: Selective Dynamic Frameworks**
97
+
If you need to keep static frameworks for other reasons, you can configure only BiometricLogin to use dynamic linkage:
98
+
99
+
```ruby
100
+
# Keep static frameworks by default
101
+
use_frameworks! :linkage => :static
102
+
103
+
# Add post-install hook to make BiometricLogin dynamic
0 commit comments