From 7c46291753d0bddc8a276d54ceb0cf7f3bd00059 Mon Sep 17 00:00:00 2001 From: Serj Agopian Date: Mon, 16 Jun 2025 23:54:14 +0200 Subject: [PATCH 1/3] Add missing configutation for nitro-modules --- .../native-common/{%- project.name %}.podspec | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/packages/create-react-native-library/templates/native-common/{%- project.name %}.podspec b/packages/create-react-native-library/templates/native-common/{%- project.name %}.podspec index 84fe2266c..512e0600a 100644 --- a/packages/create-react-native-library/templates/native-common/{%- project.name %}.podspec +++ b/packages/create-react-native-library/templates/native-common/{%- project.name %}.podspec @@ -13,13 +13,32 @@ Pod::Spec.new do |s| s.platforms = { :ios => min_ios_version_supported } s.source = { :git => "<%- repo -%>.git", :tag => "#{s.version}" } +<% if (project.moduleConfig !== "nitro-modules") { -%> <% if (project.swift) { -%> s.source_files = "ios/**/*.{h,m,mm,swift}" <% } else { -%> s.source_files = "ios/**/*.{h,m,mm,cpp}" s.private_header_files = "ios/**/*.h" <% } -%> +<% } -%> + <% if (project.moduleConfig === "nitro-modules") { -%> + s.source_files = [ + # Implementation (Swift) + "ios/**/*.{swift}", + # Autolinking/Registration (Objective-C++) + "ios/**/*.{m,mm}", + # Implementation (C++ objects) + "cpp/**/*.{hpp,cpp}", + ] + + s.pod_target_xcconfig = { + # C++ compiler flags, mainly for folly. + "GCC_PREPROCESSOR_DEFINITIONS" => "$(inherited) FOLLY_NO_CONFIG FOLLY_CFG_NO_COROUTINES" + } + + s.dependency 'React-jsi' + s.dependency 'React-callinvoker' load 'nitrogen/generated/ios/<%- project.name -%>+autolinking.rb' add_nitrogen_files(s) From 062d7cc1f9b6c42d731c9d5286766256c3220634 Mon Sep 17 00:00:00 2001 From: Serj Agopian Date: Tue, 17 Jun 2025 08:29:07 +0200 Subject: [PATCH 2/3] Fix indentation --- .../templates/native-common/{%- project.name %}.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/create-react-native-library/templates/native-common/{%- project.name %}.podspec b/packages/create-react-native-library/templates/native-common/{%- project.name %}.podspec index 512e0600a..95fca8571 100644 --- a/packages/create-react-native-library/templates/native-common/{%- project.name %}.podspec +++ b/packages/create-react-native-library/templates/native-common/{%- project.name %}.podspec @@ -44,5 +44,5 @@ Pod::Spec.new do |s| add_nitrogen_files(s) <% } -%> - install_modules_dependencies(s) + install_modules_dependencies(s) end From 1c2d9bb56be5a8f1f10d48ac2353a47512b61e4f Mon Sep 17 00:00:00 2001 From: Satyajit Sahoo Date: Sat, 21 Jun 2025 21:42:43 +0200 Subject: [PATCH 3/3] Update packages/create-react-native-library/templates/native-common/{%- project.name %}.podspec --- .../templates/native-common/{%- project.name %}.podspec | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/create-react-native-library/templates/native-common/{%- project.name %}.podspec b/packages/create-react-native-library/templates/native-common/{%- project.name %}.podspec index 95fca8571..95125f208 100644 --- a/packages/create-react-native-library/templates/native-common/{%- project.name %}.podspec +++ b/packages/create-react-native-library/templates/native-common/{%- project.name %}.podspec @@ -24,11 +24,8 @@ Pod::Spec.new do |s| <% if (project.moduleConfig === "nitro-modules") { -%> s.source_files = [ - # Implementation (Swift) - "ios/**/*.{swift}", - # Autolinking/Registration (Objective-C++) + "ios/**/*.{swift}",= "ios/**/*.{m,mm}", - # Implementation (C++ objects) "cpp/**/*.{hpp,cpp}", ]