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