Skip to content

Commit

Permalink
fix: use install_modules_dependencies to make fabric build more reliable
Browse files Browse the repository at this point in the history
  • Loading branch information
janicduplessis committed Jul 7, 2023
1 parent c70c8c5 commit 664c518
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions react-native-safe-area-context.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ fabric_enabled = ENV['RCT_NEW_ARCH_ENABLED'] == '1'

package = JSON.parse(File.read(File.join(__dir__, 'package.json')))

folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'

Pod::Spec.new do |s|
s.name = "react-native-safe-area-context"
s.version = package['version']
Expand All @@ -20,29 +18,18 @@ Pod::Spec.new do |s|
s.source_files = "ios/**/*.{h,m,mm}"
s.exclude_files = "ios/Fabric"

s.compiler_flags = folly_compiler_flags

s.pod_target_xcconfig = {
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
}

s.dependency "React-Core"
s.dependency "RCT-Folly"
s.dependency "RCTRequired"
s.dependency "RCTTypeSafety"
s.dependency "ReactCommon/turbomodule/core"

if fabric_enabled
install_modules_dependencies(s)

s.subspec "common" do |ss|
ss.source_files = "common/cpp/**/*.{cpp,h}"
ss.header_dir = "react/renderer/components/safeareacontext"
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/common/cpp\"" }
end

s.subspec "fabric" do |ss|
ss.dependency "React-Codegen"
ss.dependency "React-RCTFabric"
ss.dependency "react-native-safe-area-context/common"
ss.source_files = "ios/Fabric/**/*.{h,m,mm}"
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/common/cpp\"" }
Expand Down

0 comments on commit 664c518

Please sign in to comment.