1
0
Code Issues Pull Requests Packages Projects Releases Wiki Activity GitHub Gitee
react-native-pushy/react-native-update.podspec

67 lines
2.4 KiB
Plaintext
Raw Permalink Normal View History

2019-07-06 21:53:08 +08:00
require 'json'
2024-01-18 00:22:17 +08:00
new_arch_enabled = ENV['RCT_NEW_ARCH_ENABLED'] == '1'
2019-07-06 21:53:08 +08:00
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
2023-09-02 22:35:45 +08:00
2019-07-06 21:53:08 +08:00
Pod::Spec.new do |s|
s.name = package['name']
s.version = package['version']
s.summary = package['description']
s.license = package['license']
s.authors = package['author']
s.homepage = package['homepage']
s.cocoapods_version = '>= 1.6.0'
2019-11-16 00:31:30 +08:00
s.platform = :ios, "8.0"
2023-02-19 18:20:21 +08:00
s.platforms = { :ios => "11.0" }
2019-07-06 21:53:08 +08:00
s.source = { :git => 'https://github.com/reactnativecn/react-native-pushy.git', :tag => '#{s.version}' }
2023-02-19 18:20:21 +08:00
s.source_files = "ios/**/*.{h,m,mm,swift}"
2019-07-06 21:53:08 +08:00
s.libraries = 'bz2', 'z'
2019-11-16 00:31:30 +08:00
s.vendored_libraries = 'RCTPushy/libRCTPushy.a'
2019-07-06 21:53:08 +08:00
s.pod_target_xcconfig = { 'USER_HEADER_SEARCH_PATHS' => '"$(SRCROOT)/../node_modules/react-native-update/ios"' }
2019-10-06 22:20:57 +08:00
s.resource = 'ios/pushy_build_time.txt'
s.script_phase = { :name => 'Generate build time', :script => 'set -x;date +%s > ${PODS_ROOT}/../../node_modules/react-native-update/ios/pushy_build_time.txt', :execution_position => :before_compile }
2019-10-06 21:56:58 +08:00
2019-07-06 21:53:08 +08:00
s.dependency 'React'
2023-02-19 18:20:21 +08:00
s.dependency "React-Core"
s.dependency 'SSZipArchive'
2019-07-06 21:53:08 +08:00
2019-11-16 00:31:30 +08:00
s.subspec 'RCTPushy' do |ss|
2023-02-19 18:20:21 +08:00
ss.source_files = 'ios/RCTPushy/*.{h,m,mm,swift}'
2019-11-16 00:31:30 +08:00
ss.public_header_files = ['ios/RCTPushy/RCTPushy.h']
2019-07-06 21:53:08 +08:00
end
2021-04-14 17:29:35 +08:00
2021-04-09 19:37:56 +08:00
s.subspec 'HDiffPatch' do |ss|
2021-04-09 21:35:10 +08:00
ss.source_files = ['ios/RCTPushy/HDiffPatch/**/*.{h,m,c}',
'android/jni/hpatch.{h,c}',
'android/jni/HDiffPatch/libHDiffPatch/HPatch/*.{h,c}',
'android/jni/HDiffPatch/file_for_patch.{h,c}',
'android/jni/lzma/C/LzmaDec.{h,c}',
'android/jni/lzma/C/Lzma2Dec.{h,c}']
2021-04-09 19:37:56 +08:00
ss.private_header_files = 'ios/RCTPushy/HDiffPatch/**/*.h'
end
2024-01-18 00:22:17 +08:00
if defined?(install_modules_dependencies()) != nil
install_modules_dependencies(s);
else
if new_arch_enabled
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
s.pod_target_xcconfig = {
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
}
s.dependency "React-Codegen"
s.dependency "RCT-Folly"
s.dependency "RCTRequired"
s.dependency "RCTTypeSafety"
s.dependency "ReactCommon/turbomodule/core"
end
end
2019-07-06 21:53:08 +08:00
end