summaryrefslogtreecommitdiffstats
path: root/ios/Podfile
diff options
context:
space:
mode:
Diffstat (limited to 'ios/Podfile')
-rw-r--r--ios/Podfile55
1 files changed, 55 insertions, 0 deletions
diff --git a/ios/Podfile b/ios/Podfile
new file mode 100644
index 0000000..1c2cf48
--- /dev/null
+++ b/ios/Podfile
@@ -0,0 +1,55 @@
1# Resolve react_native_pods.rb with node to allow for hoisting
2require 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
8platform :ios, min_ios_version_supported
9prepare_react_native_project!
10
11# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
12# because `react-native-flipper` depends on (FlipperKit,...) that will be excluded
13#
14# To fix this you can also exclude `react-native-flipper` using a `react-native.config.js`
15# ```js
16# module.exports = {
17# dependencies: {
18# ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
19# ```
20flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled
21
22linkage = ENV['USE_FRAMEWORKS']
23if linkage != nil
24 Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
25 use_frameworks! :linkage => linkage.to_sym
26end
27
28target 'cyberbadge_mobile' do
29 config = use_native_modules!
30
31 use_react_native!(
32 :path => config[:reactNativePath],
33 # Enables Flipper.
34 #
35 # Note that if you have use_frameworks! enabled, Flipper will not work and
36 # you should disable the next line.
37 :flipper_configuration => flipper_config,
38 # An absolute path to your application root.
39 :app_path => "#{Pod::Config.instance.installation_root}/.."
40 )
41
42 target 'cyberbadge_mobileTests' do
43 inherit! :complete
44 # Pods for testing
45 end
46
47 post_install do |installer|
48 # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
49 react_native_post_install(
50 installer,
51 config[:reactNativePath],
52 :mac_catalyst_enabled => false
53 )
54 end
55end