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