Podfile 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. require File.join(File.dirname(`node --print "require.resolve('expo/package.json')"`), "scripts/autolinking")
  2. require File.join(File.dirname(`node --print "require.resolve('react-native/package.json')"`), "scripts/react_native_pods")
  3. require 'json'
  4. podfile_properties = JSON.parse(File.read(File.join(__dir__, 'Podfile.properties.json'))) rescue {}
  5. ENV['RCT_NEW_ARCH_ENABLED'] = podfile_properties['newArchEnabled'] == 'true' ? '1' : '0'
  6. ENV['EX_DEV_CLIENT_NETWORK_INSPECTOR'] = podfile_properties['EX_DEV_CLIENT_NETWORK_INSPECTOR']
  7. use_autolinking_method_symbol = ('use' + '_native' + '_modules!').to_sym
  8. origin_autolinking_method = self.method(use_autolinking_method_symbol)
  9. self.define_singleton_method(use_autolinking_method_symbol) do |*args|
  10. if ENV['EXPO_UNSTABLE_CORE_AUTOLINKING'] == '1'
  11. Pod::UI.puts('Using expo-modules-autolinking as core autolinking source'.green)
  12. config_command = [
  13. 'node',
  14. '--no-warnings',
  15. '--eval',
  16. 'require(require.resolve(\'expo-modules-autolinking\', { paths: [require.resolve(\'expo/package.json\')] }))(process.argv.slice(1))',
  17. 'react-native-config',
  18. '--json',
  19. '--platform',
  20. 'ios'
  21. ]
  22. origin_autolinking_method.call(config_command)
  23. else
  24. origin_autolinking_method.call()
  25. end
  26. end
  27. platform :ios, podfile_properties['ios.deploymentTarget'] || '13.4'
  28. install! 'cocoapods',
  29. :deterministic_uuids => false
  30. prepare_react_native_project!
  31. target 'Crazycharge' do
  32. use_expo_modules!
  33. # @generated begin react-native-maps - expo prebuild (DO NOT MODIFY) sync-e9cc66c360abe50bc66d89fffb3c55b034d7d369
  34. pod 'react-native-google-maps', path: File.dirname(`node --print "require.resolve('react-native-maps/package.json')"`)
  35. # @generated end react-native-maps
  36. config = use_native_modules!
  37. use_frameworks! :linkage => podfile_properties['ios.useFrameworks'].to_sym if podfile_properties['ios.useFrameworks']
  38. use_frameworks! :linkage => ENV['USE_FRAMEWORKS'].to_sym if ENV['USE_FRAMEWORKS']
  39. use_react_native!(
  40. :path => config[:reactNativePath],
  41. :hermes_enabled => podfile_properties['expo.jsEngine'] == nil || podfile_properties['expo.jsEngine'] == 'hermes',
  42. # An absolute path to your application root.
  43. :app_path => "#{Pod::Config.instance.installation_root}/..",
  44. :privacy_file_aggregation_enabled => podfile_properties['apple.privacyManifestAggregationEnabled'] != 'false',
  45. )
  46. post_install do |installer|
  47. react_native_post_install(
  48. installer,
  49. config[:reactNativePath],
  50. :mac_catalyst_enabled => false,
  51. :ccache_enabled => podfile_properties['apple.ccacheEnabled'] == 'true',
  52. )
  53. # This is necessary for Xcode 14, because it signs resource bundles by default
  54. # when building for devices.
  55. installer.target_installation_results.pod_target_installation_results
  56. .each do |pod_name, target_installation_result|
  57. target_installation_result.resource_bundle_targets.each do |resource_bundle_target|
  58. resource_bundle_target.build_configurations.each do |config|
  59. config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
  60. end
  61. end
  62. end
  63. end
  64. post_integrate do |installer|
  65. begin
  66. expo_patch_react_imports!(installer)
  67. rescue => e
  68. Pod::UI.warn e
  69. end
  70. end
  71. end