11require_relative '../node_modules/react-native/scripts/react_native_pods'
22require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
33
4- platform :ios , '12.4'
5- install! 'cocoapods' , :deterministic_uuids => false
4+ platform :ios , min_ios_version_supported
5+ prepare_react_native_project!
66
7- production = ENV [ "PRODUCTION" ] == "1"
7+ # If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
8+ # because `react-native-flipper` depends on (FlipperKit,...) that will be excluded
9+ #
10+ # To fix this you can also exclude `react-native-flipper` using a `react-native.config.js`
11+ # ```js
12+ # module.exports = {
13+ # dependencies: {
14+ # ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
15+ # ```
16+ flipper_config = ENV [ 'NO_FLIPPER' ] == "1" ? FlipperConfiguration . disabled : FlipperConfiguration . enabled
17+
18+ linkage = ENV [ 'USE_FRAMEWORKS' ]
19+ if linkage != nil
20+ Pod ::UI . puts "Configuring Pod with #{ linkage } ally linked Frameworks" . green
21+ use_frameworks! :linkage => linkage . to_sym
22+ end
823
924target 'RNTypescriptBoilerplate' do
1025 config = use_native_modules!
@@ -13,12 +28,17 @@ target 'RNTypescriptBoilerplate' do
1328 flags = get_default_flags ( )
1429
1530 use_react_native! (
16- :production => production ,
1731 :path => config [ :reactNativePath ] ,
18- # to enable hermes on iOS, change `false` to `true` and then install pods
32+ # Hermes is now enabled by default. Disable by setting this flag to false.
33+ # Upcoming versions of React Native may rely on get_default_flags(), but
34+ # we make it explicit here to aid in the React Native upgrade process.
1935 :hermes_enabled => flags [ :hermes_enabled ] ,
2036 :fabric_enabled => flags [ :fabric_enabled ] ,
21- :flipper_configuration => FlipperConfiguration . enabled ,
37+ # Enables Flipper.
38+ #
39+ # Note that if you have use_frameworks! enabled, Flipper will not work and
40+ # you should disable the next line.
41+ :flipper_configuration => flipper_config ,
2242 # An absolute path to your application root.
2343 :app_path => "#{ Pod ::Config . instance . installation_root } /.."
2444 )
@@ -29,7 +49,12 @@ target 'RNTypescriptBoilerplate' do
2949 end
3050
3151 post_install do |installer |
32- react_native_post_install ( installer )
52+ react_native_post_install (
53+ installer ,
54+ # Set `mac_catalyst_enabled` to `true` in order to apply patches
55+ # necessary for Mac Catalyst builds
56+ :mac_catalyst_enabled => false
57+ )
3358 __apply_Xcode_12_5_M1_post_install_workaround ( installer )
3459 end
3560end
0 commit comments