xref: /expo/template-files/ios/ExpoKit-Podfile (revision ab91dd02)
1platform :ios, '13.0'
2
3# Disable expo-updates auto create manifest in podspec script_phase
4$expo_updates_create_manifest = false
5
6# Require autolinking script
7require File.join(File.dirname(`node --print "require.resolve('expo/package.json')"`), "scripts/autolinking")
8
9target 'ExpoKitApp' do
10  pod 'ExpoKit',
11    :path => "../../../ios",
12    :subspecs => [
13      "Core"
14    ],
15    :inhibit_warnings => true
16
17  # Install expo modules
18  use_expo_modules!(
19    searchPaths: ['../../../packages'],
20    exclude: [
21      'expo-bluetooth',
22      'expo-in-app-purchases',
23      'expo-payments-stripe',
24      'expo-module-template',
25      'expo-module-template-local',
26      'expo-image',
27      'expo-dev-menu',
28      'expo-dev-menu-interface',
29      'expo-dev-launcher',
30      'expo-dev-client'
31    ],
32  )
33
34  pod 'Amplitude', :modular_headers => true
35  pod 'CocoaLumberjack', :modular_headers => true
36  pod 'Google-Maps-iOS-Utils', :modular_headers => true
37  pod 'JKBigInteger', :modular_headers => true, :podspec => '../../../ios/vendored/common/JKBigInteger.podspec.json'
38  pod 'MBProgressHUD', :modular_headers => true
39
40  # Install React Native and its dependencies
41  require_relative '../node_modules/react-native/scripts/react_native_pods'
42  use_react_native!(production: true)
43
44  # Install vendored pods.
45  require_relative '../../../ios/podfile_helpers.rb'
46  excluded_pods = ['stripe-react-native']
47  use_pods!('../../../ios/vendored/unversioned/**/*.podspec.json', nil, excluded_pods)
48
49  post_install do |installer|
50    installer.pods_project.main_group.tab_width = '2';
51    installer.pods_project.main_group.indent_width = '2';
52
53    # Workaround build error for Folly
54    __apply_Xcode_12_5_M1_post_install_workaround(installer) if installer.pods_project
55
56    installer.target_installation_results.pod_target_installation_results
57      .each do |pod_name, target_installation_result|
58
59      if pod_name == 'ExpoKit'
60        target_installation_result.native_target.build_configurations.each do |config|
61          config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)']
62          config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'EX_DETACHED=1'
63
64          # Enable Google Maps support
65          config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'HAVE_GOOGLE_MAPS=1'
66          config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'HAVE_GOOGLE_MAPS_UTILS=1'
67
68        end
69      end
70
71
72      if pod_name == 'Branch'
73        target_installation_result.native_target.build_configurations.each do |config|
74          config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)']
75          config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'BRANCH_EXCLUDE_IDFA_CODE=1'
76        end
77      end
78
79
80
81      target_installation_result.native_target.build_configurations.each do |config|
82        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
83      end
84
85
86      # Can't specify this in the React podspec because we need to use those podspecs for detached
87      # projects which don't reference ExponentCPP.
88      if pod_name.start_with?('React')
89        target_installation_result.native_target.build_configurations.each do |config|
90          config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
91          config.build_settings['HEADER_SEARCH_PATHS'] ||= ['$(inherited)']
92        end
93      end
94
95      # Build React Native with RCT_DEV enabled and RCT_ENABLE_INSPECTOR and
96      # RCT_ENABLE_PACKAGER_CONNECTION disabled
97      next unless pod_name.start_with?('React')
98      target_installation_result.native_target.build_configurations.each do |config|
99        config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)']
100        config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'RCT_DEV=1'
101        config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'RCT_ENABLE_INSPECTOR=0'
102        config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'ENABLE_PACKAGER_CONNECTION=0'
103      end
104
105    end
106  end
107end
108