Podfile 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. platform :ios, min_ios_version_supported
  8. prepare_react_native_project!
  9. # If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
  10. # because `react-native-flipper` depends on (FlipperKit,...) that will be excluded
  11. #
  12. # To fix this you can also exclude `react-native-flipper` using a `react-native.config.js`
  13. # ```js
  14. # module.exports = {
  15. # dependencies: {
  16. # ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
  17. # ```
  18. flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled
  19. linkage = ENV['USE_FRAMEWORKS']
  20. if linkage != nil
  21. Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
  22. use_frameworks! :linkage => linkage.to_sym
  23. end
  24. target 'Newscout' do
  25. config = use_native_modules!
  26. # Flags change depending on the env values.
  27. flags = get_default_flags()
  28. use_react_native!(
  29. :path => config[:reactNativePath],
  30. # Hermes is now enabled by default. Disable by setting this flag to false.
  31. :hermes_enabled => flags[:hermes_enabled],
  32. :fabric_enabled => flags[:fabric_enabled],
  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. target 'NewscoutTests' do
  42. inherit! :complete
  43. # Pods for testing
  44. end
  45. post_install do |installer|
  46. # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
  47. react_native_post_install(
  48. installer,
  49. config[:reactNativePath],
  50. :mac_catalyst_enabled => false
  51. )
  52. __apply_Xcode_12_5_M1_post_install_workaround(installer)
  53. end
  54. end