Skip to content

Commit c1f5084

Browse files
Documentation added for how to deal with Firebase with static frameworks (#8171)
Co-authored-by: Georgy Steshin <gosha212@gmail.com>
1 parent b9fbb8b commit c1f5084

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

website/docs/docs/docs-Installing.mdx

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,52 @@ In Xcode, you will need to edit this file: `AppDelegate.h`. Its content should l
212212
+ [super application:application didFinishLaunchingWithOptions:launchOptions];
213213
```
214214
215+
### Firebase integration on React-Native 0.79:
216+
217+
For Firebase integration with static frameworks the following change needs to be added to your `podfile`:
218+
219+
`podfile`
220+
```diff
221+
linkage = ENV['USE_FRAMEWORKS']
222+
if linkage != nil
223+
Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
224+
use_frameworks! :linkage => linkage.to_sym
225+
end
226+
227+
+ static_frameworks = [
228+
+ 'FirebaseCore',
229+
+ 'FirebaseCoreExtension',
230+
+ 'GoogleUtilities',
231+
+ 'FirebaseCoreInternal',
232+
+ 'FirebaseInstallations',
233+
+ 'GoogleDataTransport',
234+
+ 'FirebaseFirestoreInternal',
235+
+ 'FirebaseMessagingInternal',
236+
+ 'FirebaseAuth',
237+
+ ]
238+
239+
+ pre_install do |installer|
240+
+ installer.pod_targets.each do |pod|
241+
+ if static_frameworks.include?(pod.name)
242+
+ puts "Configuring #{pod.name} as static framework"
243+
+ def pod.build_type
244+
+ Pod::BuildType.new(:linkage => :static, :packaging => :framework)
245+
+ end
246+
+ end
247+
+ end
248+
+ end
249+
250+
target <ProjectName> do
251+
config = use_native_modules!
252+
253+
+ $RNFirebaseAsStaticFramework = true
254+
255+
+ pod 'FirebaseAuthInterop', :modular_headers => true
256+
+ pod 'FirebaseAppCheckInterop', :modular_headers => true
257+
+ pod 'RecaptchaInterop', :modular_headers => true
258+
...
259+
```
260+
215261
### Android
216262
217263
> Make sure your Android Studio installation is up to date. We recommend editing `gradle` and `kotlin` files in Android Studio as the IDE will suggest fixes and point out errors, this way you avoid most common pitfalls.

0 commit comments

Comments
 (0)