@@ -4,6 +4,8 @@ package = JSON.parse(File.read(File.join(__dir__, "package.json")))
4
4
5
5
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
6
6
7
+ fabric_enabled = ENV [ 'RCT_NEW_ARCH_ENABLED' ] == '1'
8
+
7
9
Pod ::Spec . new do |s |
8
10
s . name = 'react-native-video'
9
11
s . version = package [ 'version' ]
@@ -16,8 +18,18 @@ Pod::Spec.new do |s|
16
18
s . source = { :git => "https://github.com/TheWidlarzGroup/react-native-video.git" , :tag => "v#{ s . version } " }
17
19
s . platforms = { :ios => "13.0" , :tvos => "13.0" , :visionos => "1.0" }
18
20
21
+ if fabric_enabled
22
+ s . subspec "Fabric" do |ss |
23
+ ss . source_files = "ios/Fabric/**/*.{h,mm}"
24
+ end
25
+ end
26
+
19
27
s . subspec "Video" do |ss |
20
- ss . source_files = "ios/Video/**/*.{h,m,swift}"
28
+ ss . source_files = "ios/Video/**/*.{h,m,swift,mm}"
29
+
30
+ if fabric_enabled
31
+ ss . dependency "react-native-video/Fabric"
32
+ end
21
33
22
34
if defined? ( $RNVideoUseGoogleIMA)
23
35
Pod ::UI . puts "RNVideo: enable IMA SDK"
@@ -32,7 +44,7 @@ Pod::Spec.new do |s|
32
44
Pod ::UI . puts "RNVideo: enable Video caching"
33
45
ss . dependency "SPTPersistentCache" , "~> 1.1.0"
34
46
ss . dependency "DVAssetLoaderDelegate" , "~> 0.3.1"
35
- ss . source_files = "ios/*/**/*.{h,m,swift}"
47
+ ss . source_files = "ios/*/**/*.{h,m,swift,mm }"
36
48
ss . pod_target_xcconfig = {
37
49
'OTHER_SWIFT_FLAGS' => '$(inherited) -D USE_VIDEO_CACHING'
38
50
}
@@ -47,7 +59,7 @@ Pod::Spec.new do |s|
47
59
s . dependency "React-Core"
48
60
49
61
# Don't install the dependencies when we run `pod install` in the old architecture.
50
- if ENV [ 'RCT_NEW_ARCH_ENABLED' ] == '1' then
62
+ if fabric_enabled then
51
63
s . compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
52
64
s . pod_target_xcconfig = {
53
65
"HEADER_SEARCH_PATHS" => "\" $(PODS_ROOT)/boost\" " ,
0 commit comments