Skip to content

Commit ee2e134

Browse files
authored
refactor: add swift and cpp to source files by default (#904)
1 parent d859a41 commit ee2e134

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

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

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,12 @@ 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" || project.viewConfig === "nitro-view") { -%>
17-
<% if (project.swift) { -%>
18-
s.source_files = "ios/**/*.{h,m,mm,swift}"
19-
<% } else { -%>
20-
s.source_files = "ios/**/*.{h,m,mm,cpp}"
16+
<% if (project.moduleConfig !== "nitro-modules" && project.viewConfig !== "nitro-view") { -%>
17+
s.source_files = "ios/**/*.{h,m,mm,swift,cpp}"
18+
<% if (!project.swift) { -%>
2119
s.private_header_files = "ios/**/*.h"
2220
<% } -%>
23-
<% } -%>
24-
25-
<% if (project.moduleConfig === "nitro-modules" || project.viewConfig === "nitro-view") { -%>
21+
<% } else { -%>
2622
s.source_files = [
2723
"ios/**/*.{swift}",
2824
"ios/**/*.{m,mm}",

0 commit comments

Comments
 (0)