Skip to content

Commit 24936ad

Browse files
committed
fix: improve podspec and Podfile
1 parent 08bfbc2 commit 24936ad

File tree

2 files changed

+16
-11
lines changed

2 files changed

+16
-11
lines changed

example/ios/Podfile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,13 @@ target 'NitroSQLiteExample' do
3131
installer,
3232
config[:reactNativePath],
3333
:mac_catalyst_enabled => false,
34-
# :ccache_enabled => true
34+
:ccache_enabled => ENV['USE_CCACHE'] == '1'
3535
)
3636

37-
installer.pods_project.build_configurations.each do |config|
38-
config.build_settings['DEAD_CODE_STRIPPING'] = 'YES'
39-
end
40-
4137
installer.pods_project.targets.each do |target|
4238
target.build_configurations.each do |config|
4339
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '16.6'
40+
config.build_settings['DEAD_CODE_STRIPPING'] = 'YES'
4441
end
4542
end
4643
end

package/RNNitroSQLite.podspec

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,29 @@ Pod::Spec.new do |s|
1414
s.homepage = package["homepage"]
1515
s.license = package["license"]
1616
s.authors = package["author"]
17-
1817
s.platforms = { :ios => min_ios_version_supported, :visionos => "1.0" }
1918
s.source = { :git => "https://github.com/margelo/react-native-nitro-sqlite.git", :tag => "#{s.version}" }
2019

21-
# s.header_mappings_dir = "cpp"
22-
s.source_files = "ios/**/*.{h,hpp,m,mm}", "cpp/**/*.{h,hpp,c,cpp}"
20+
s.source_files = [
21+
# Implementation (Swift)
22+
"ios/**/*.{swift}",
23+
# Autolinking/Registration (Objective-C++)
24+
"ios/**/*.{h,hpp,m,mm}",
25+
# Implementation (C++ objects)
26+
"cpp/**/*.{h,hpp,c,cpp}"
27+
]
2328

2429
s.pod_target_xcconfig = {
2530
:GCC_PREPROCESSOR_DEFINITIONS => "HAVE_FULLFSYNC=1",
2631
:WARNING_CFLAGS => "-Wno-shorten-64-to-32 -Wno-comma -Wno-unreachable-code -Wno-conditional-uninitialized -Wno-deprecated-declarations",
27-
:USE_HEADERMAP => "No",
2832
'CLANG_CXX_LANGUAGE_STANDARD' => 'c++20',
2933
'CLANG_CXX_LIBRARY' => 'libc++',
30-
'DEFINES_MODULE' => 'YES'
31-
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/fast_float/include\" \"$(PODS_ROOT)/fmt/include\"",
34+
'DEFINES_MODULE' => 'YES',
35+
"HEADER_SEARCH_PATHS" => [
36+
"${PODS_ROOT}/RCT-Folly",
37+
],
38+
"GCC_PREPROCESSOR_DEFINITIONS" => "$(inherited) FOLLY_NO_CONFIG FOLLY_CFG_NO_COROUTINES",
39+
"OTHER_CPLUSPLUSFLAGS" => folly_compiler_flags,
3240
}
3341

3442
load 'nitrogen/generated/ios/RNNitroSQLite+autolinking.rb'

0 commit comments

Comments
 (0)