-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNitroPlay.podspec
More file actions
76 lines (60 loc) · 2.48 KB
/
NitroPlay.podspec
File metadata and controls
76 lines (60 loc) · 2.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
require "json"
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
fabric_enabled = ENV['RCT_NEW_ARCH_ENABLED'] == '1'
min_ios_version =
if defined?(min_ios_version_supported)
min_ios_version_supported
else
'13.0'
end
unless defined?(add_dependency)
def add_dependency(spec, dependency_name, _options = {})
spec.dependency dependency_name
end
end
Pod::Spec.new do |s|
s.name = "NitroPlay"
s.version = package["version"]
s.summary = package["description"]
s.homepage = package["homepage"]
s.license = package["license"]
s.authors = package["author"]
s.platforms = { :ios => min_ios_version }
s.source = { :git => "https://github.com/noma4i/nitro-player.git", :tag => "#{s.version}" }
s.source_files = [
"ios/*.{h,m,mm,swift}",
"ios/core/**/*.{h,m,mm,swift}", # Core library files
"ios/hybrids/**/*.{h,m,mm,swift}", # Nitro Hybrid files
"ios/view/**/*.{h,m,mm,swift}", # Video View files
"ios/hls/**/*.{h,m,mm,swift}" # HLS Cache Proxy
]
s.dependency "GCDWebServer", "~> 3.5"
if fabric_enabled
s.exclude_files = ["ios/view/paper/**/*.{h,m,mm,swift}"]
else
s.exclude_files = ["ios/view/fabric/**/*.{h,m,mm,swift}"]
end
# Cxx to Swift bridging helpers
s.public_header_files = ["ios/NitroPlay-Bridging-Header.h"]
s.pod_target_xcconfig = {
"GCC_PREPROCESSOR_DEFINITIONS" => "$(inherited) FOLLY_NO_CONFIG FOLLY_CFG_NO_COROUTINES FOLLY_MOBILE"
}
# Try to manually add the dependencies
# because they are not automatically added by expo
# when USE_FRAMEWORKS is true
if ENV["USE_FRAMEWORKS"]
s.dependency "React-Core"
puts "[NitroPlay] Detected USE_FRAMEWORKS, adding required dependencies..."
add_dependency(s, "React-jsinspector", :framework_name => "jsinspector_modern")
add_dependency(s, "React-rendererconsistency", :framework_name => "React_rendererconsistency")
# We may need to add this as well for newer versions of React Native, but it's not available in older versions
# add_dependency(s, "React-jsinspectortracing", :framework_name => 'jsinspector_moderntracing')
end
# Add all files generated by Nitrogen
load File.join(__dir__, 'nitrogen/generated/ios/NitroPlay+autolinking.rb')
add_nitrogen_files(s)
if defined?(install_modules_dependencies)
install_modules_dependencies(s)
end
end