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