Skip to content

Commit fc647d2

Browse files
committed
Add missing configutation for nitro-modules
1 parent 240421d commit fc647d2

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

packages/create-react-native-library/templates/native-common/{%- project.name %}.podspec

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,32 @@ Pod::Spec.new do |s|
1313
s.platforms = { :ios => min_ios_version_supported }
1414
s.source = { :git => "<%- repo -%>.git", :tag => "#{s.version}" }
1515

16+
<% if (project.moduleConfig !== "nitro-modules") { -%>
1617
<% if (project.swift) { -%>
1718
s.source_files = "ios/**/*.{h,m,mm,swift}"
1819
<% } else { -%>
1920
s.source_files = "ios/**/*.{h,m,mm,cpp}"
2021
s.private_header_files = "ios/**/*.h"
2122
<% } -%>
23+
<% } -%>
24+
2225
<% if (project.moduleConfig === "nitro-modules") { -%>
26+
s.source_files = [
27+
# Implementation (Swift)
28+
"ios/**/*.{swift}",
29+
# Autolinking/Registration (Objective-C++)
30+
"ios/**/*.{m,mm}",
31+
# Implementation (C++ objects)
32+
"cpp/**/*.{hpp,cpp}",
33+
]
34+
35+
s.pod_target_xcconfig = {
36+
# C++ compiler flags, mainly for folly.
37+
"GCC_PREPROCESSOR_DEFINITIONS" => "$(inherited) FOLLY_NO_CONFIG FOLLY_CFG_NO_COROUTINES"
38+
}
39+
40+
s.dependency 'React-jsi'
41+
s.dependency 'React-callinvoker'
2342

2443
load 'nitrogen/generated/ios/<%- project.name -%>+autolinking.rb'
2544
add_nitrogen_files(s)

0 commit comments

Comments
 (0)