Skip to content

Commit 987be4b

Browse files
fix(ios): swfit modular headers (TheWidlarzGroup#4527)
1 parent 1c95041 commit 987be4b

File tree

10 files changed

+250
-63
lines changed

10 files changed

+250
-63
lines changed

.github/workflows/build-ios.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,11 +190,14 @@ jobs:
190190
restore-keys: |
191191
${{ runner.os }}-pods-
192192
193+
- name: Install gem dependencies
194+
run: bundle install
195+
193196
- name: Generate Native Project
194-
run: export RNV_SAMPLE_VIDEO_CACHING=true && pod install
197+
run: export RNV_SAMPLE_VIDEO_CACHING=true && bundle exec pod install
195198

196199
- name: Install Pods
197-
run: export RNV_SAMPLE_VIDEO_CACHING=true && pod install
200+
run: export RNV_SAMPLE_VIDEO_CACHING=true && bundle exec pod install
198201

199202
- name: Install xcpretty
200203
run: gem install xcpretty

docs/pages/installation.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,21 @@ $RNVideoUseGoogleIMA=true
5151

5252
**If you are using Expo, you can use the [Expo plugin](other/expo.md).**
5353

54+
> **Note:** If you are enabling video caching (using `$RNVideoUseVideoCaching`), you must add the following to your `Gemfile`:
55+
>
56+
> ```ruby
57+
> gem "cocoapods-swift-modular-headers"
58+
> ```
59+
>
60+
> Then, install dependencies using:
61+
>
62+
> ```sh
63+
> bundle install
64+
> bundle exec pod install
65+
> ```
66+
>
67+
> This enables Swift modular headers for Swift dependencies.
68+
5469
</details>
5570
5671
<details>

docs/pages/other/caching.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,18 @@ You will see warnings in the Xcode logs when using `debug` mode. If you're unsur
3131
By default, files expire after 30 days, and the maximum cache size is 100MB.
3232

3333
Future updates may include more configurable caching options.
34+
35+
> **Note:** If you are enabling video caching (using `$RNVideoUseVideoCaching`), you must add the following to your `Gemfile`:
36+
>
37+
> ```ruby
38+
> gem "cocoapods-swift-modular-headers"
39+
> ```
40+
>
41+
> Then, install dependencies using:
42+
>
43+
> ```sh
44+
> bundle install
45+
> bundle exec pod install
46+
> ```
47+
>
48+
> This enables Swift modular headers for Swift dependencies.

docs/pages/updating.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,21 @@ You can remove the following lines from your Podfile as they are no longer neede
3737

3838
If you were previously using VideoCaching, you should set the `$RNVideoUseVideoCaching` flag in your Podspec. See the [installation section](https://docs.thewidlarzgroup.com/react-native-video/installation#video-caching) for details.
3939

40+
> **Note:** If you are enabling video caching (using `$RNVideoUseVideoCaching`), you must add the following to your `Gemfile`:
41+
>
42+
> ```ruby
43+
> gem "cocoapods-swift-modular-headers"
44+
> ```
45+
>
46+
> Then, install dependencies using:
47+
>
48+
> ```sh
49+
> bundle install
50+
> bundle exec pod install
51+
> ```
52+
>
53+
> This enables Swift modular headers for Swift dependencies.
54+
4055
### Android
4156
4257
If you were using ExoPlayer on V5, remove the patch from **android/settings.gradle**:

examples/bare/.bundle/config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
BUNDLE_PATH: "vendor/bundle"
2+
BUNDLE_FORCE_RUBY_PLATFORM: 1

examples/bare/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
.xcode.env
1010
Pods/
1111
build/
12+
vendor/bundle/
1213
dist/*
1314
!dist/.gitignore
1415
local.properties

examples/bare/Gemfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
source 'https://rubygems.org'
2+
3+
ruby ">= 2.6.10"
4+
5+
gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
6+
gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
7+
gem 'xcodeproj', '< 1.26.0'
8+
gem 'concurrent-ruby', '< 1.3.4'
9+
gem 'cocoapods-swift-modular-headers'

examples/bare/Gemfile.lock

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
CFPropertyList (3.0.7)
5+
base64
6+
nkf
7+
rexml
8+
activesupport (6.1.7.10)
9+
concurrent-ruby (~> 1.0, >= 1.0.2)
10+
i18n (>= 1.6, < 2)
11+
minitest (>= 5.1)
12+
tzinfo (~> 2.0)
13+
zeitwerk (~> 2.3)
14+
addressable (2.8.7)
15+
public_suffix (>= 2.0.2, < 7.0)
16+
algoliasearch (1.27.5)
17+
httpclient (~> 2.8, >= 2.8.3)
18+
json (>= 1.5.1)
19+
atomos (0.1.3)
20+
base64 (0.2.0)
21+
claide (1.1.0)
22+
cocoapods (1.15.2)
23+
addressable (~> 2.8)
24+
claide (>= 1.0.2, < 2.0)
25+
cocoapods-core (= 1.15.2)
26+
cocoapods-deintegrate (>= 1.0.3, < 2.0)
27+
cocoapods-downloader (>= 2.1, < 3.0)
28+
cocoapods-plugins (>= 1.0.0, < 2.0)
29+
cocoapods-search (>= 1.0.0, < 2.0)
30+
cocoapods-trunk (>= 1.6.0, < 2.0)
31+
cocoapods-try (>= 1.1.0, < 2.0)
32+
colored2 (~> 3.1)
33+
escape (~> 0.0.4)
34+
fourflusher (>= 2.3.0, < 3.0)
35+
gh_inspector (~> 1.0)
36+
molinillo (~> 0.8.0)
37+
nap (~> 1.0)
38+
ruby-macho (>= 2.3.0, < 3.0)
39+
xcodeproj (>= 1.23.0, < 2.0)
40+
cocoapods-core (1.15.2)
41+
activesupport (>= 5.0, < 8)
42+
addressable (~> 2.8)
43+
algoliasearch (~> 1.0)
44+
concurrent-ruby (~> 1.1)
45+
fuzzy_match (~> 2.0.4)
46+
nap (~> 1.0)
47+
netrc (~> 0.11)
48+
public_suffix (~> 4.0)
49+
typhoeus (~> 1.0)
50+
cocoapods-deintegrate (1.0.5)
51+
cocoapods-downloader (2.1)
52+
cocoapods-plugins (1.0.0)
53+
nap
54+
cocoapods-search (1.0.1)
55+
cocoapods-swift-modular-headers (0.0.2)
56+
cocoapods-trunk (1.6.0)
57+
nap (>= 0.8, < 2.0)
58+
netrc (~> 0.11)
59+
cocoapods-try (1.2.0)
60+
colored2 (3.1.2)
61+
concurrent-ruby (1.3.3)
62+
escape (0.0.4)
63+
ethon (0.16.0)
64+
ffi (>= 1.15.0)
65+
ffi (1.17.2)
66+
fourflusher (2.3.1)
67+
fuzzy_match (2.0.4)
68+
gh_inspector (1.1.3)
69+
httpclient (2.9.0)
70+
mutex_m
71+
i18n (1.14.7)
72+
concurrent-ruby (~> 1.0)
73+
json (2.7.6)
74+
minitest (5.25.4)
75+
molinillo (0.8.0)
76+
mutex_m (0.3.0)
77+
nanaimo (0.3.0)
78+
nap (1.1.0)
79+
netrc (0.11.0)
80+
nkf (0.2.0)
81+
public_suffix (4.0.7)
82+
rexml (3.4.1)
83+
ruby-macho (2.5.1)
84+
typhoeus (1.4.1)
85+
ethon (>= 0.9.0)
86+
tzinfo (2.0.6)
87+
concurrent-ruby (~> 1.0)
88+
xcodeproj (1.25.1)
89+
CFPropertyList (>= 2.3.3, < 4.0)
90+
atomos (~> 0.1.3)
91+
claide (>= 1.0.2, < 2.0)
92+
colored2 (~> 3.1)
93+
nanaimo (~> 0.3.0)
94+
rexml (>= 3.3.6, < 4.0)
95+
zeitwerk (2.6.18)
96+
97+
PLATFORMS
98+
ruby
99+
100+
DEPENDENCIES
101+
activesupport (>= 6.1.7.5, != 7.1.0)
102+
cocoapods (>= 1.13, != 1.15.1, != 1.15.0)
103+
cocoapods-swift-modular-headers
104+
concurrent-ruby (< 1.3.4)
105+
xcodeproj (< 1.26.0)
106+
107+
RUBY VERSION
108+
ruby 2.6.10p210
109+
110+
BUNDLED WITH
111+
1.17.2

examples/bare/ios/Podfile

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,28 @@ ws_dir = ws_dir.parent until
44
ws_dir.expand_path.to_s == '/'
55
require "#{ws_dir}/node_modules/react-native-test-app/test_app.rb"
66

7-
workspace 'BareExample.xcworkspace'
7+
if ENV['RCT_NEW_ARCH_ENABLED'].nil?
8+
ENV['RCT_NEW_ARCH_ENABLED'] = '0'
9+
end
810

9-
use_test_app!
11+
if ENV['RCT_NEW_ARCH_ENABLED'] == '1'
12+
Pod::UI.puts "New Architecture is ENABLED".green
13+
else
14+
Pod::UI.puts "New Architecture is DISABLED".red
15+
end
1016

1117
# This is used by CI to test different configurations
1218
# If you want to enable it look to README.md
1319
if ENV['RNV_SAMPLE_ENABLE_ADS']
1420
$RNVideoUseGoogleIMA = true
1521
end
22+
1623
if ENV['RNV_SAMPLE_VIDEO_CACHING']
24+
plugin 'cocoapods-swift-modular-headers'
1725
$RNVideoUseVideoCaching = true
26+
apply_modular_headers_for_swift_dependencies()
1827
end
1928

20-
# Chache dependencies need to have modular headers
21-
if defined?($RNVideoUseVideoCaching)
22-
use_modular_headers!
23-
end
29+
workspace 'BareExample.xcworkspace'
30+
31+
use_test_app!

0 commit comments

Comments
 (0)