Skip to content

Commit 9d17937

Browse files
committed
Add Podfile for iOS project setup and React Native integration
1 parent c30b00c commit 9d17937

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

test/template/ios/Podfile

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Resolve react_native_pods.rb with node to allow for hoisting
2+
require Pod::Executable.execute_command('node', ['-p',
3+
'require.resolve(
4+
"react-native/scripts/react_native_pods.rb",
5+
{paths: [process.argv[1]]},
6+
)', __dir__]).strip
7+
8+
platform :ios, '15.5'
9+
prepare_react_native_project!
10+
11+
linkage = ENV['USE_FRAMEWORKS']
12+
if linkage != nil
13+
Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
14+
use_frameworks! :linkage => linkage.to_sym
15+
end
16+
17+
target 'TestCodePush' do
18+
config = use_native_modules!
19+
20+
use_react_native!(
21+
:path => config[:reactNativePath],
22+
# An absolute path to your application root.
23+
:app_path => "#{Pod::Config.instance.installation_root}/.."
24+
)
25+
26+
post_install do |installer|
27+
# https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
28+
react_native_post_install(
29+
installer,
30+
config[:reactNativePath],
31+
:mac_catalyst_enabled => false,
32+
# :ccache_enabled => true
33+
)
34+
end
35+
end

0 commit comments

Comments
 (0)