Skip to content

Commit f1f1db3

Browse files
committed
update readme
1 parent 09643c0 commit f1f1db3

4 files changed

Lines changed: 67 additions & 5 deletions

File tree

README.md

Lines changed: 63 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ A React Native module that enables biometric authentication and securely stores
77
- [Features](#features)
88
- [Installation](#installation)
99
- [iOS Setup](#ios-setup)
10-
- [Swift Bridging Header Compatibility](#-swift-bridging-header-compatibility)
10+
- [Swift Bridging Header Compatibility](#swift-bridging-header-compatibility)
1111
- [Android Setup](#android-setup)
1212
- [API Reference](#api-reference)
1313
- [Usage](#usage)
@@ -115,6 +115,68 @@ post_install do |installer|
115115
end
116116
```
117117

118+
**Option 3: Complete Podfile Example**
119+
Here's a complete Podfile example that demonstrates proper configuration for Swift bridging header compatibility in a project that implements both React Native Firebase and this biometric login package:
120+
121+
```ruby
122+
# Resolve react_native_pods.rb with node to allow for hoisting
123+
require Pod::Executable.execute_command('node', ['-p',
124+
'require.resolve(
125+
"react-native/scripts/react_native_pods.rb",
126+
{paths: [process.argv[1]]},
127+
)', __dir__]).strip
128+
129+
platform :ios, min_ios_version_supported
130+
prepare_react_native_project!
131+
132+
# Specify the Xcode project to use
133+
project 'bioTest.xcodeproj'
134+
135+
linkage = ENV['USE_FRAMEWORKS']
136+
if linkage != nil
137+
Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
138+
use_frameworks! :linkage => linkage.to_sym
139+
end
140+
141+
# Use dynamic frameworks by default for Swift bridging header compatibility
142+
use_frameworks! :linkage => :dynamic
143+
144+
# Firebase configuration - Firebase will handle its own static linkage internally
145+
$RNFirebaseAsStaticFramework = true
146+
147+
target 'bioTest' do
148+
config = use_native_modules!
149+
150+
use_react_native!(
151+
:path => config[:reactNativePath],
152+
# An absolute path to your application root.
153+
:app_path => "#{Pod::Config.instance.installation_root}/.."
154+
)
155+
156+
# Fix for Swift pod integration issue with FirebaseCoreInternal and GoogleUtilities
157+
pod 'GoogleUtilities', :modular_headers => true
158+
159+
post_install do |installer|
160+
# Ensure Firebase modules are properly configured
161+
installer.pods_project.targets.each do |target|
162+
if target.name.include?('Firebase')
163+
target.build_configurations.each do |config|
164+
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
165+
config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
166+
end
167+
end
168+
end
169+
# https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
170+
react_native_post_install(
171+
installer,
172+
config[:reactNativePath],
173+
:mac_catalyst_enabled => false,
174+
# :ccache_enabled => true
175+
)
176+
end
177+
end
178+
```
179+
118180
**Clean Installation Steps**
119181
After making changes to the Podfile:
120182

example/ios/Podfile.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
PODS:
2-
- BiometricLogin (2.0.23):
2+
- BiometricLogin (2.0.24):
33
- boost
44
- DoubleConversion
55
- fast_float
@@ -2572,7 +2572,7 @@ EXTERNAL SOURCES:
25722572
:path: "../node_modules/react-native/ReactCommon/yoga"
25732573

25742574
SPEC CHECKSUMS:
2575-
BiometricLogin: 4887aa2fcfb2fc2d15995d75994ecff925355555
2575+
BiometricLogin: 1860349512c9da4eb862134eddf5095a0d1d8f7b
25762576
boost: 7e761d76ca2ce687f7cc98e698152abd03a18f90
25772577
DoubleConversion: cb417026b2400c8f53ae97020b2be961b59470cb
25782578
fast_float: b32c788ed9c6a8c584d114d0047beda9664e7cc6
@@ -2649,4 +2649,4 @@ SPEC CHECKSUMS:
26492649

26502650
PODFILE CHECKSUM: 03430b6ad5369d3484cd406f416c75940ac94f74
26512651

2652-
COCOAPODS: 1.15.2
2652+
COCOAPODS: 1.16.2

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-biometric-login",
3-
"version": "2.0.23",
3+
"version": "2.0.24",
44
"description": "A React-Native module to enable biometric login and securely store a user's credentials using native apis.",
55
"main": "./lib/module/index.js",
66
"types": "./lib/typescript/src/index.d.ts",

0 commit comments

Comments
 (0)