xref: /expo/ios/Podfile (revision bb8f4f99)
1require_relative './podfile_helpers.rb'
2require_relative '../packages/react-native-unimodules/cocoapods.rb'
3require_relative '../react-native-lab/react-native/scripts/react_native_pods'
4
5install! 'cocoapods',
6         :generate_multiple_pod_projects => true,
7         :incremental_installation => true
8platform :ios, '11.0'
9inhibit_all_warnings!
10
11target 'Exponent' do
12  # Expo Client dependencies
13  pod 'Amplitude'
14  pod 'CocoaLumberjack', '~> 3.5.3'
15  pod 'GoogleMaps', '~> 3.6'
16  pod 'Google-Maps-iOS-Utils', '~> 2.1.0'
17  pod 'JKBigInteger2', '0.0.5'
18
19  # Unimodules
20  use_unimodules!({
21    modules_paths: ['../packages'],
22    exclude: [
23      'expo-module-template',
24      'expo-in-app-purchases',
25      'expo-payments-stripe',
26    ],
27    flags: {
28      :inhibit_warnings => false
29    }
30  })
31
32  # Expo modules that are not unimodules
33  pod 'EXRandom', path: '../packages/expo-random/ios'
34
35  # Install vendored pods.
36  use_pods! 'vendored/unversioned/**/*.podspec.json'
37
38  # Unversioned React Native
39  use_react_native! path: '../react-native-lab/react-native'
40
41  # Evaluate all files matching `versioned-react-native/ABI*/dependencies.rb` glob pattern
42  # and install ReactABIXX_0_0 pods with all versioned unimodules.
43  use_versioned_abis!
44
45  # Build React Native with RCT_DEV enabled and RCT_ENABLE_INSPECTOR and
46  # RCT_ENABLE_PACKAGER_CONNECTION disabled
47  post_install do |installer|
48    # Disabled as of CocoaPods 1.8.0.beta1 since pods_project seems to be nil
49    # installer.pods_project.main_group.tab_width = '2';
50    # installer.pods_project.main_group.indent_width = '2';
51
52    installer.target_installation_results.pod_target_installation_results
53      .each do |pod_name, target_installation_result|
54      # Run postinstalls actions for versioned dependencies.
55      # These actions are specified in `versioned-react-native/ABI*/postinstalls.rb` files.
56      run_versioned_postinstalls!(pod_name, target_installation_result)
57
58      target_installation_result.native_target.build_configurations.each do |config|
59        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0'
60      end
61
62      if pod_name == 'Branch'
63        target_installation_result.native_target.build_configurations.each do |config|
64          config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)']
65          config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'BRANCH_EXCLUDE_IDFA_CODE=1'
66        end
67      end
68
69      # Build React Native with RCT_DEV enabled and RCT_ENABLE_INSPECTOR and
70      # RCT_ENABLE_PACKAGER_CONNECTION disabled
71      next unless pod_name.start_with?('React')
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'] << 'RCT_DEV=1'
75        config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'RCT_ENABLE_INSPECTOR=0'
76        config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'ENABLE_PACKAGER_CONNECTION=0'
77      end
78    end
79  end
80
81  # Test targets
82  target 'ExponentIntegrationTests' do
83    inherit! :search_paths
84  end
85
86  target 'Tests' do
87    inherit! :search_paths
88  end
89end
90