From 5eb63f377a7836e1d0eb7266b3dc9e3afed4d622 Mon Sep 17 00:00:00 2001 From: Yohann Prigent Date: Sat, 23 Aug 2025 13:05:13 +0200 Subject: [PATCH 1/2] don't depend of RCT-Folly on RN 0.80+ --- react-native-apple-llm.podspec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/react-native-apple-llm.podspec b/react-native-apple-llm.podspec index 5c1de01..a1c38f0 100644 --- a/react-native-apple-llm.podspec +++ b/react-native-apple-llm.podspec @@ -2,6 +2,7 @@ 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' +use_rn_dep = ENV['RCT_USE_RN_DEP'] == '1' Pod::Spec.new do |s| s.name = package["name"] @@ -21,15 +22,17 @@ Pod::Spec.new do |s| # Don't install the dependencies when we run `pod install` in the old architecture. if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then - s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1" + new_arch_flags = "-DRCT_NEW_ARCH_ENABLED=1" + s.compiler_flags = use_rn_dep ? new_arch_flags : (folly_compiler_flags + " " + new_arch_flags) s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/React-Core/React\" \"$(PODS_ROOT)/React-Core\"", - "OTHER_CPLUSPLUSFLAGS" => folly_compiler_flags, + # Avoid overriding C++ flags when RN provides prebuilt deps + "OTHER_CPLUSPLUSFLAGS" => use_rn_dep ? "$(inherited)" : folly_compiler_flags, "CLANG_CXX_LANGUAGE_STANDARD" => "c++17", "DEFINES_MODULE" => "YES", } s.dependency "React-Codegen" - s.dependency "RCT-Folly" + s.dependency "RCT-Folly" unless use_rn_dep s.dependency "RCTRequired" s.dependency "RCTTypeSafety" s.dependency "ReactCommon/turbomodule/core" From 8be7b9fafd3571b72c6cc8e399f643cdafb5814b Mon Sep 17 00:00:00 2001 From: Yohann Prigent Date: Sat, 23 Aug 2025 13:13:51 +0200 Subject: [PATCH 2/2] use good license file --- react-native-apple-llm.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/react-native-apple-llm.podspec b/react-native-apple-llm.podspec index a1c38f0..6081336 100644 --- a/react-native-apple-llm.podspec +++ b/react-native-apple-llm.podspec @@ -9,7 +9,7 @@ Pod::Spec.new do |s| s.version = package['version'] s.summary = package["description"] s.homepage = "https://github.com/deveix/react-native-apple-llm" - s.license = { :type => package["license"], :file => "LICENSE" } + s.license = { :type => package["license"], :file => "LICENSE.md" } s.authors = { package["author"]["name"] => package["author"]["email"] } s.ios.deployment_target = '13.0'