Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions packages/analytics/RNFBAnalytics.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,18 @@ Pod::Spec.new do |s|
s.dependency "React-Core"
end

# Wire up prebuilt React-Core (RN 0.83+, default on 0.84+) so the legacy
# <React/...> header imports resolve when RCT_USE_PREBUILT_RNCORE=1.
if defined?(add_rncore_dependency)
add_rncore_dependency(s)
end

# RNFB public headers re-export non-modular <React/...> imports. Required so
# the framework module validates when consumers build with use_frameworks!.
s.pod_target_xcconfig = {
"CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES" => "YES",
}

if defined?($FirebaseSDKVersion)
Pod::UI.puts "#{s.name}: Using user specified Firebase SDK version '#{$FirebaseSDKVersion}'"
firebase_sdk_version = $FirebaseSDKVersion
Expand Down
1 change: 1 addition & 0 deletions packages/analytics/ios/RNFBAnalytics/RNFBAnalyticsModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*
*/

#import <React/RCTBridgeModule.h>
#import <Firebase/Firebase.h>
#import <React/RCTUtils.h>

Expand Down
12 changes: 12 additions & 0 deletions packages/app-check/RNFBAppCheck.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,18 @@ Pod::Spec.new do |s|
s.dependency "React-Core"
end

# Wire up prebuilt React-Core (RN 0.83+, default on 0.84+) so the legacy
# <React/...> header imports resolve when RCT_USE_PREBUILT_RNCORE=1.
if defined?(add_rncore_dependency)
add_rncore_dependency(s)
end

# RNFB public headers re-export non-modular <React/...> imports. Required so
# the framework module validates when consumers build with use_frameworks!.
s.pod_target_xcconfig = {
"CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES" => "YES",
}

if defined?($FirebaseSDKVersion)
Pod::UI.puts "#{s.name}: Using user specified Firebase SDK version '#{$FirebaseSDKVersion}'"
firebase_sdk_version = $FirebaseSDKVersion
Expand Down
1 change: 1 addition & 0 deletions packages/app-check/ios/RNFBAppCheck/RNFBAppCheckModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*
*/

#import <React/RCTBridgeModule.h>
#import <Firebase/Firebase.h>
#import <FirebaseAppCheck/FIRAppCheck.h>

Expand Down
12 changes: 12 additions & 0 deletions packages/app-distribution/RNFBAppDistribution.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,18 @@ Pod::Spec.new do |s|
s.dependency "React-Core"
end

# Wire up prebuilt React-Core (RN 0.83+, default on 0.84+) so the legacy
# <React/...> header imports resolve when RCT_USE_PREBUILT_RNCORE=1.
if defined?(add_rncore_dependency)
add_rncore_dependency(s)
end

# RNFB public headers re-export non-modular <React/...> imports. Required so
# the framework module validates when consumers build with use_frameworks!.
s.pod_target_xcconfig = {
"CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES" => "YES",
}

if defined?($FirebaseSDKVersion)
Pod::UI.puts "#{s.name}: Using user specified Firebase SDK version '#{$FirebaseSDKVersion}'"
firebase_sdk_version = $FirebaseSDKVersion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*
*/

#import <React/RCTBridgeModule.h>
#import <Firebase/Firebase.h>
#import <React/RCTUtils.h>

Expand Down
12 changes: 11 additions & 1 deletion packages/app/RNFBApp.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,13 @@ Pod::Spec.new do |s|
Pod::UI.puts '[react-native-firebase] '.yellow + "Suppress this with environment variable RNFB_SUPPRESS_NEW_ARCHITECTURE_WARNING=1"
end

# App must define modules for static framework integration of other packages to work
# App must define modules for static framework integration of other packages to work.
# CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES is required so RNFB's umbrella,
# which re-exports <React/...> imports, validates when consumers build with use_frameworks!
# (the default on Expo, and required for the firebase-ios-sdk).
s.pod_target_xcconfig = {
"DEFINES_MODULE" => "YES",
"CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES" => "YES",
}
Comment on lines 45 to 48
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

low

This configuration (adding add_rncore_dependency and setting CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES) is duplicated across 17 podspecs. While podspecs are often independent, centralizing this logic in a shared helper (e.g., in firebase_json.rb or a new shared file) would improve maintainability and reduce future duplication.


# React Native dependencies
Expand All @@ -50,6 +54,12 @@ Pod::Spec.new do |s|
s.dependency "React-Core"
end

# Wire up prebuilt React-Core (RN 0.83+, default on 0.84+) so the legacy
# <React/...> header imports resolve when RCT_USE_PREBUILT_RNCORE=1.
if defined?(add_rncore_dependency)
add_rncore_dependency(s)
end

if (ENV.include?('FIREBASE_SDK_VERSION'))
Pod::UI.puts "#{s.name}: Found Firebase SDK version in environment '#{ENV['FIREBASE_SDK_VERSION']}'"
$FirebaseSDKVersion = ENV['FIREBASE_SDK_VERSION']
Expand Down
1 change: 1 addition & 0 deletions packages/app/ios/RNFBApp/RNFBAppModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*
*/

#import <React/RCTBridgeModule.h>
#import <Firebase/Firebase.h>
#import <React/RCTUtils.h>

Expand Down
1 change: 1 addition & 0 deletions packages/app/ios/RNFBApp/RNFBUtilsModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*
*/

#import <React/RCTBridgeModule.h>
#import <React/RCTUtils.h>

#import "RNFBApp/RNFBSharedUtils.h"
Expand Down
12 changes: 12 additions & 0 deletions packages/auth/RNFBAuth.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,18 @@ Pod::Spec.new do |s|
s.dependency "React-Core"
end

# Wire up prebuilt React-Core (RN 0.83+, default on 0.84+) so the legacy
# <React/...> header imports resolve when RCT_USE_PREBUILT_RNCORE=1.
if defined?(add_rncore_dependency)
add_rncore_dependency(s)
end

# RNFB public headers re-export non-modular <React/...> imports. Required so
# the framework module validates when consumers build with use_frameworks!.
s.pod_target_xcconfig = {
"CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES" => "YES",
}

if defined?($FirebaseSDKVersion)
Pod::UI.puts "#{s.name}: Using user specified Firebase SDK version '#{$FirebaseSDKVersion}'"
firebase_sdk_version = $FirebaseSDKVersion
Expand Down
1 change: 1 addition & 0 deletions packages/auth/ios/RNFBAuth/RNFBAuthModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*
*/

#import <React/RCTBridgeModule.h>
#import <Firebase/Firebase.h>
#import <React/RCTUtils.h>

Expand Down
12 changes: 12 additions & 0 deletions packages/crashlytics/RNFBCrashlytics.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,18 @@ Pod::Spec.new do |s|
s.dependency "React-Core"
end

# Wire up prebuilt React-Core (RN 0.83+, default on 0.84+) so the legacy
# <React/...> header imports resolve when RCT_USE_PREBUILT_RNCORE=1.
if defined?(add_rncore_dependency)
add_rncore_dependency(s)
end

# RNFB public headers re-export non-modular <React/...> imports. Required so
# the framework module validates when consumers build with use_frameworks!.
s.pod_target_xcconfig = {
"CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES" => "YES",
}

if defined?($FirebaseSDKVersion)
Pod::UI.puts "#{s.name}: Using user specified Firebase SDK version '#{$FirebaseSDKVersion}'"
firebase_sdk_version = $FirebaseSDKVersion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <Foundation/Foundation.h>
#include <sys/sysctl.h>

#import <React/RCTBridgeModule.h>
#import <React/RCTConvert.h>
#import <React/RCTLog.h>
#import <React/RCTUtils.h>
Expand Down
12 changes: 12 additions & 0 deletions packages/database/RNFBDatabase.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,18 @@ Pod::Spec.new do |s|
s.dependency "React-Core"
end

# Wire up prebuilt React-Core (RN 0.83+, default on 0.84+) so the legacy
# <React/...> header imports resolve when RCT_USE_PREBUILT_RNCORE=1.
if defined?(add_rncore_dependency)
add_rncore_dependency(s)
end

# RNFB public headers re-export non-modular <React/...> imports. Required so
# the framework module validates when consumers build with use_frameworks!.
s.pod_target_xcconfig = {
"CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES" => "YES",
}

if defined?($FirebaseSDKVersion)
Pod::UI.puts "#{s.name}: Using user specified Firebase SDK version '#{$FirebaseSDKVersion}'"
firebase_sdk_version = $FirebaseSDKVersion
Expand Down
1 change: 1 addition & 0 deletions packages/database/ios/RNFBDatabase/RNFBDatabaseModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*
*/

#import <React/RCTBridgeModule.h>
#import <Firebase/Firebase.h>
#import <React/RCTUtils.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*
*/

#import <React/RCTBridgeModule.h>
#import <Firebase/Firebase.h>
#import <React/RCTUtils.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*
*/

#import <React/RCTBridgeModule.h>
#import <React/RCTUtils.h>

#import "RNFBDatabaseCommon.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*
*/

#import <React/RCTBridgeModule.h>
#import <Firebase/Firebase.h>
#import <React/RCTUtils.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*
*/

#import <React/RCTBridgeModule.h>
#import <Firebase/Firebase.h>
#import <React/RCTUtils.h>

Expand Down
12 changes: 12 additions & 0 deletions packages/firestore/RNFBFirestore.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,18 @@ Pod::Spec.new do |s|
s.dependency "React-Core"
end

# Wire up prebuilt React-Core (RN 0.83+, default on 0.84+) so the legacy
# <React/...> header imports resolve when RCT_USE_PREBUILT_RNCORE=1.
if defined?(add_rncore_dependency)
add_rncore_dependency(s)
end

# RNFB public headers re-export non-modular <React/...> imports. Required so
# the framework module validates when consumers build with use_frameworks!.
s.pod_target_xcconfig = {
"CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES" => "YES",
}

if defined?($FirebaseSDKVersion)
Pod::UI.puts "#{s.name}: Using user specified Firebase SDK version '#{$FirebaseSDKVersion}'"
firebase_sdk_version = $FirebaseSDKVersion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*
*/

#import <React/RCTBridgeModule.h>
#import <RNFBApp/RNFBRCTEventEmitter.h>
#if __has_include(<RNFBFirestore/RNFBFirestore-Swift.h>)
// This import will work in situations where `use_frameworks!` is in use
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*
*/

#import <React/RCTBridgeModule.h>
#import <RNFBApp/RNFBRCTEventEmitter.h>
#import <React/RCTUtils.h>

Expand Down
1 change: 1 addition & 0 deletions packages/firestore/ios/RNFBFirestore/RNFBFirestoreModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*
*/

#import <React/RCTBridgeModule.h>
#import "RNFBFirestoreModule.h"
#import <RNFBApp/RNFBRCTEventEmitter.h>
#import <React/RCTUtils.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*
*/

#import <React/RCTBridgeModule.h>
#import <RNFBApp/RNFBRCTEventEmitter.h>
#import <React/RCTUtils.h>

Expand Down
12 changes: 12 additions & 0 deletions packages/functions/RNFBFunctions.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,18 @@ Pod::Spec.new do |s|

install_modules_dependencies(s);

# Wire up prebuilt React-Core (RN 0.83+, default on 0.84+) so the legacy
# <React/...> header imports resolve when RCT_USE_PREBUILT_RNCORE=1.
if defined?(add_rncore_dependency)
add_rncore_dependency(s)
end

# RNFB public headers re-export non-modular <React/...> imports. Required so
# the framework module validates when consumers build with use_frameworks!.
s.pod_target_xcconfig = {
"CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES" => "YES",
}

# Fail fast for old architecture users, but safely in case the variable goes away
# completely in future react-native versions
if defined?(ENV["RCT_NEW_ARCH_ENABLED"]) != nil && (ENV["RCT_NEW_ARCH_ENABLED"] == '0')
Expand Down
12 changes: 12 additions & 0 deletions packages/in-app-messaging/RNFBInAppMessaging.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,18 @@ Pod::Spec.new do |s|
s.dependency "React-Core"
end

# Wire up prebuilt React-Core (RN 0.83+, default on 0.84+) so the legacy
# <React/...> header imports resolve when RCT_USE_PREBUILT_RNCORE=1.
if defined?(add_rncore_dependency)
add_rncore_dependency(s)
end

# RNFB public headers re-export non-modular <React/...> imports. Required so
# the framework module validates when consumers build with use_frameworks!.
s.pod_target_xcconfig = {
"CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES" => "YES",
}

if defined?($FirebaseSDKVersion)
Pod::UI.puts "#{s.name}: Using user specified Firebase SDK version '#{$FirebaseSDKVersion}'"
firebase_sdk_version = $FirebaseSDKVersion
Expand Down
1 change: 1 addition & 0 deletions packages/in-app-messaging/ios/RNFBFiam/RNFBFiamModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*
*/

#import <React/RCTBridgeModule.h>
#import <Firebase/Firebase.h>
#import <React/RCTConvert.h>
#import <React/RCTUtils.h>
Expand Down
12 changes: 12 additions & 0 deletions packages/installations/RNFBInstallations.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,18 @@ Pod::Spec.new do |s|
s.dependency "React-Core"
end

# Wire up prebuilt React-Core (RN 0.83+, default on 0.84+) so the legacy
# <React/...> header imports resolve when RCT_USE_PREBUILT_RNCORE=1.
if defined?(add_rncore_dependency)
add_rncore_dependency(s)
end

# RNFB public headers re-export non-modular <React/...> imports. Required so
# the framework module validates when consumers build with use_frameworks!.
s.pod_target_xcconfig = {
"CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES" => "YES",
}

if defined?($FirebaseSDKVersion)
Pod::UI.puts "#{s.name}: Using user specified Firebase SDK version '#{$FirebaseSDKVersion}'"
firebase_sdk_version = $FirebaseSDKVersion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*
*/

#import <React/RCTBridgeModule.h>
#import <Firebase/Firebase.h>
#import <React/RCTUtils.h>

Expand Down
12 changes: 12 additions & 0 deletions packages/messaging/RNFBMessaging.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,18 @@ Pod::Spec.new do |s|
s.dependency "React-Core"
end

# Wire up prebuilt React-Core (RN 0.83+, default on 0.84+) so the legacy
# <React/...> header imports resolve when RCT_USE_PREBUILT_RNCORE=1.
if defined?(add_rncore_dependency)
add_rncore_dependency(s)
end

# RNFB public headers re-export non-modular <React/...> imports. Required so
# the framework module validates when consumers build with use_frameworks!.
s.pod_target_xcconfig = {
"CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES" => "YES",
}

if defined?($FirebaseSDKVersion)
Pod::UI.puts "#{s.name}: Using user specified Firebase SDK version '#{$FirebaseSDKVersion}'"
firebase_sdk_version = $FirebaseSDKVersion
Expand Down
1 change: 1 addition & 0 deletions packages/messaging/ios/RNFBMessaging/RNFBMessagingModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*
*/

#import <React/RCTBridgeModule.h>
#import <Firebase/Firebase.h>
#import <RNFBApp/RNFBSharedUtils.h>
#import <React/RCTConvert.h>
Expand Down
Loading
Loading