1require_relative './podfile_helpers.rb' 2require File.join(`node --print "require.resolve('react-native/package.json')"`, "../scripts/react_native_pods") 3require File.join(`node --print "require.resolve('@unimodules/react-native-adapter/package.json')"`, "../scripts/autolinking") 4 5install! 'cocoapods', 6 :generate_multiple_pod_projects => true, 7 :incremental_installation => true 8platform :ios, '11.0' 9inhibit_all_warnings! 10 11# Enables Swift modules in Expo Go 12use_swift_modules! 13 14abstract_target 'Expo Go' do 15 # Expo Client dependencies 16 pod 'Amplitude' 17 pod 'CocoaLumberjack', '~> 3.5.3' 18 pod 'GoogleMaps', '~> 3.6' 19 pod 'Google-Maps-iOS-Utils', '~> 2.1.0' 20 pod 'JKBigInteger2', '0.0.5' 21 pod 'MBProgressHUD', '~> 1.2.0' 22 pod 'Quick', :podspec => './Quick.podspec' 23 pod 'Nimble', :podspec => './Nimble.podspec' 24 25 # Expo modules 26 use_expo_modules!({ 27 exclude: [ 28 'expo-module-template', 29 'expo-in-app-purchases', 30 'expo-payments-stripe' 31 ], 32 # Modules for which to include Tests subspec 33 tests: [ 34 'expo-modules-core', 35 'expo-updates', 36 'expo-structured-headers', 37 ], 38 flags: { 39 :inhibit_warnings => false 40 } 41 }) 42 43 # Expo modules that are not unimodules 44 pod 'EXRandom', path: '../packages/expo-random/ios' 45 46 # Install vendored pods. 47 use_pods! 'vendored/unversioned/**/*.podspec.json' 48 49 # Unversioned React Native 50 use_react_native! path: '../react-native-lab/react-native' 51 52 # Build React Native with RCT_DEV enabled and RCT_ENABLE_INSPECTOR and 53 # RCT_ENABLE_PACKAGER_CONNECTION disabled 54 post_install do |installer| 55 # Disabled as of CocoaPods 1.8.0.beta1 since pods_project seems to be nil 56 # installer.pods_project.main_group.tab_width = '2'; 57 # installer.pods_project.main_group.indent_width = '2'; 58 59 installer.target_installation_results.pod_target_installation_results 60 .each do |pod_name, target_installation_result| 61 62 # Run postinstalls actions for versioned dependencies. 63 # These actions are specified in `versioned-react-native/ABI*/postinstalls.rb` files. 64 run_versioned_postinstalls!(pod_name, target_installation_result) 65 66 target_installation_result.native_target.build_configurations.each do |config| 67 config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0' 68 69 # Fix building failures on M1 70 config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64' 71 end 72 73 if pod_name == 'Branch' 74 target_installation_result.native_target.build_configurations.each do |config| 75 config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)'] 76 config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'BRANCH_EXCLUDE_IDFA_CODE=1' 77 end 78 end 79 80 # Build React Native with RCT_DEV enabled and RCT_ENABLE_INSPECTOR and 81 # RCT_ENABLE_PACKAGER_CONNECTION disabled 82 next unless pod_name.start_with?('React') 83 target_installation_result.native_target.build_configurations.each do |config| 84 config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)'] 85 config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'RCT_DEV=1' 86 config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'RCT_ENABLE_INSPECTOR=0' 87 config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'ENABLE_PACKAGER_CONNECTION=0' 88 end 89 end 90 end 91 92 # Target for development, contains only unversioned code 93 target 'Expo Go (unversioned)' do 94 end 95 96 # Release target additionally includes versioned SDKs 97 target 'Expo Go (versioned)' do 98 # Evaluate all files matching `versioned-react-native/ABI*/dependencies.rb` glob pattern 99 # and install ReactABIXX_0_0 pods with all versioned unimodules. 100 use_versioned_abis! 101 end 102 103 # Test targets 104 target 'ExponentIntegrationTests' do 105 inherit! :search_paths 106 end 107 108 target 'Tests' do 109 inherit! :search_paths 110 end 111end 112