From 2a37a270304dd1ff8949e720b3cad57d6921d023 Mon Sep 17 00:00:00 2001 From: yungblud Date: Tue, 2 Jul 2024 22:01:10 +0900 Subject: [PATCH 1/2] chore: init commit From 38920d4e6fd6aecfbac20994516ab454b02417f7 Mon Sep 17 00:00:00 2001 From: yungblud Date: Tue, 2 Jul 2024 22:06:19 +0900 Subject: [PATCH 2/2] feat: :sparkles: implemented new architecture settings for podspec --- rive-react-native.podspec | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/rive-react-native.podspec b/rive-react-native.podspec index f43be901..eacbecaf 100644 --- a/rive-react-native.podspec +++ b/rive-react-native.podspec @@ -2,6 +2,10 @@ require "json" 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' + +fabric_enabled = ENV['RCT_NEW_ARCH_ENABLED'] == '1' + Pod::Spec.new do |s| s.name = "rive-react-native" s.version = package["version"] @@ -13,8 +17,33 @@ Pod::Spec.new do |s| s.platforms = { :ios => "14.0" } s.source = { :git => "https://github.com/rive-app/rive-react-native.git", :tag => "#{s.version}" } + if fabric_enabled + s.subspec "Fabric" do |ss| + ss.source_files = "ios/Fabric/**/*.{h,mm}" + end + end + s.source_files = "ios/**/*.{h,m,mm,swift}" + if fabric_enabled + s.dependency "rive-react-native/Fabric" + end + s.dependency "React-Core" s.dependency "RiveRuntime", "5.14.0" + + if fabric_enabled then + s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1" + s.pod_target_xcconfig = { + "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"", + "OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1", + "CLANG_CXX_LANGUAGE_STANDARD" => "c++17" + } + s.dependency "React-RCTFabric" + s.dependency "React-Codegen" + s.dependency "RCT-Folly" + s.dependency "RCTRequired" + s.dependency "RCTTypeSafety" + s.dependency "ReactCommon/turbomodule/core" + end end