1require_relative './podfile_helpers.rb' 2require_relative '../react-native-lab/react-native/scripts/react_native_pods' 3require File.join(File.dirname(`node --print "require.resolve('expo/package.json')"`), "scripts/autolinking") 4 5install! 'cocoapods', 6 :generate_multiple_pod_projects => true, 7 :incremental_installation => true 8platform :ios, '13.0' 9inhibit_all_warnings! 10 11# Disable expo-updates auto create manifest in podspec script_phase 12$expo_updates_create_manifest = false 13 14abstract_target 'Expo Go' do 15 # Expo Client dependencies 16 pod 'CocoaLumberjack', '~> 3.5.3' 17 pod 'GoogleMaps', '~> 7.1' 18 pod 'Google-Maps-iOS-Utils', '~> 4.1.0' 19 pod 'JKBigInteger', :podspec => 'vendored/common/JKBigInteger.podspec.json' 20 pod 'MBProgressHUD', '~> 1.2.0' 21 22 # Required by firebase core versions 9.x / 10.x (included with SDK 47) 23 # See https://github.com/invertase/react-native-firebase/issues/6332#issuecomment-1189734581 24 pod 'FirebaseCore', :modular_headers => true 25 pod 'GoogleUtilities', :modular_headers => true 26 27 # Expo modules 28 use_expo_modules!({ 29 exclude: [ 30 'expo-module-template', 31 'expo-module-template-local', 32 'expo-in-app-purchases', 33 'expo-dev-menu', 34 'expo-dev-menu-interface', 35 'expo-dev-launcher', 36 'expo-dev-client', 37 'expo-maps', 38 'expo-insights', 39 'expo-face-detector', 40 ], 41 includeTests: true, 42 flags: { 43 :inhibit_warnings => false 44 } 45 }) 46 47 # Install vendored pods. 48 use_pods! 'vendored/unversioned/**/*.podspec.json' 49 50 # Unversioned React Native 51 use_react_native!( 52 :path => '../react-native-lab/react-native', 53 :hermes_enabled => true, 54 :fabric_enabled => false, 55 ) 56 setup_jsc!( 57 :react_native_path => '../react-native-lab/react-native', 58 :fabric_enabled => false, 59 ) 60 61 # Build React Native with RCT_DEV enabled and RCT_ENABLE_INSPECTOR and 62 # RCT_ENABLE_PACKAGER_CONNECTION disabled 63 post_install do |installer| 64 # Workaround build error for Folly 65 __apply_Xcode_12_5_M1_post_install_workaround(installer) if installer.pods_project 66 67 # Disabled as of CocoaPods 1.8.0.beta1 since pods_project seems to be nil 68 # installer.pods_project.main_group.tab_width = '2'; 69 # installer.pods_project.main_group.indent_width = '2'; 70 71 installer.target_installation_results.pod_target_installation_results 72 .each do |pod_name, target_installation_result| 73 74 # Run postinstalls actions for versioned dependencies. 75 # These actions are specified in `versioned-react-native/ABI*/postinstalls.rb` files. 76 run_versioned_postinstalls!(pod_name, target_installation_result) 77 78 # This is necessary for Xcode 14 that by default signs resource bundles when building for the device. 79 target_installation_result.resource_bundle_targets.each do |resource_bundle_target| 80 resource_bundle_target.build_configurations.each do |config| 81 config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO' 82 end 83 end 84 85 target_installation_result.native_target.build_configurations.each do |config| 86 config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0' 87 88 # Fix building failures on M1 89 config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64' 90 end 91 92 if pod_name == 'Branch' 93 target_installation_result.native_target.build_configurations.each do |config| 94 config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)'] 95 config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'BRANCH_EXCLUDE_IDFA_CODE=1' 96 end 97 end 98 99 # On iOS, the Stripe dependency StripePaymentsUI can't seem to find a header that should be there. 100 if pod_name == 'StripePaymentsUI' 101 target_installation_result.native_target.build_configurations.each do |config| 102 config.build_settings['HEADER_SEARCH_PATHS'] ||= ['$(inherited)'] 103 config.build_settings['HEADER_SEARCH_PATHS'] << '"$(PODS_ROOT)/Headers/Public/StripePayments"' 104 end 105 end 106 107 if pod_name.end_with?('EXUpdates') 108 target_installation_result.native_target.build_configurations.each do |config| 109 config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)'] 110 config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'SUPPRESS_EXPO_UPDATES_SERVICE=1' 111 end 112 end 113 114 # Build React Native with RCT_DEV enabled and RCT_ENABLE_INSPECTOR and 115 # RCT_ENABLE_PACKAGER_CONNECTION disabled 116 next unless pod_name.start_with?('React') 117 target_installation_result.native_target.build_configurations.each do |config| 118 config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)'] 119 config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'RCT_DEV=1' 120 config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'RCT_ENABLE_INSPECTOR=0' 121 config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'RCT_DEV_SETTINGS_ENABLE_PACKAGER_CONNECTION=0' 122 end 123 end 124 end 125 126 # Target for development, contains only unversioned code 127 target 'Expo Go (unversioned)' do 128 end 129 130 # Release target additionally includes versioned SDKs 131 target 'Expo Go (versioned)' do 132 # Evaluate all files matching `versioned-react-native/ABI*/dependencies.rb` glob pattern 133 # and install ReactABIXX_0_0 pods with all versioned unimodules. 134 use_versioned_abis! 135 end 136 137 # Test targets 138 target 'ExponentIntegrationTests' do 139 inherit! :search_paths 140 end 141 142 target 'Tests' do 143 # `ExpoModulesTestCore` has implicit dependency to `React-Core` which has a resource bundle. 144 # To prevent CocoaPods generating new `React-Core` resource bundle and the strange `React-Core-60309c9c` target, 145 # this test target should inherit all properties from parents. 146 inherit! :complete 147 148 pod 'ExpoModulesTestCore', :path => "../packages/expo-modules-test-core/ios" 149 pod 'Nimble', :podspec => './Nimble.podspec' 150 end 151end 152