@@ -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|
115115end
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**
119181After making changes to the Podfile:
120182
0 commit comments