1fd56468cSTomasz Sapetarequire_relative './podfile_helpers.rb' 2c0a96678SKudo Chienrequire_relative '../react-native-lab/react-native/packages/react-native/scripts/react_native_pods' 39188a28eSTomasz Sapetarequire File.join(File.dirname(`node --print "require.resolve('expo/package.json')"`), "scripts/autolinking") 4fd56468cSTomasz Sapeta 5fd56468cSTomasz Sapetainstall! 'cocoapods', 6fd56468cSTomasz Sapeta :generate_multiple_pod_projects => true, 7fd56468cSTomasz Sapeta :incremental_installation => true 8c88b85cfSTomasz Sapetaplatform :ios, '13.0' 9fd56468cSTomasz Sapetainhibit_all_warnings! 10fd56468cSTomasz Sapeta 112f6287e1SKudo Chien# Disable expo-updates auto create manifest in podspec script_phase 122f6287e1SKudo Chien$expo_updates_create_manifest = false 132f6287e1SKudo Chien 14cf276e6eSTomasz Sapetaabstract_target 'Expo Go' do 15fd56468cSTomasz Sapeta pod 'CocoaLumberjack', '~> 3.5.3' 164ab2fd68Saleqsio pod 'GoogleMaps', '~> 7.3.0' 174ab2fd68Saleqsio pod 'Google-Maps-iOS-Utils', :git => 'https://github.com/googlemaps/google-maps-ios-utils.git' 187d4a8a19SKudo Chien pod 'JKBigInteger', :podspec => 'vendored/common/JKBigInteger.podspec.json' 199fcddb20Sandy pod 'MBProgressHUD', '~> 1.2.0' 20fd56468cSTomasz Sapeta 2160ad5af1SKudo Chien # transitive dependency of React-Core and we use it to get the `RCTInspectorPackagerConnection` state 2260ad5af1SKudo Chien pod 'SocketRocket' 2360ad5af1SKudo Chien 24d27f77b9SKeith Kurak # Required by firebase core versions 9.x / 10.x (included with SDK 47) 25819418b0STomasz Sapeta # See https://github.com/invertase/react-native-firebase/issues/6332#issuecomment-1189734581 26819418b0STomasz Sapeta pod 'FirebaseCore', :modular_headers => true 27819418b0STomasz Sapeta pod 'GoogleUtilities', :modular_headers => true 28819418b0STomasz Sapeta 29066dfbc2STomasz Sapeta # Expo modules 30066dfbc2STomasz Sapeta use_expo_modules!({ 31fd56468cSTomasz Sapeta exclude: [ 32fd56468cSTomasz Sapeta 'expo-module-template', 33ab91dd02Saleqsio 'expo-module-template-local', 3432f56664SŁukasz Kosmaty 'expo-in-app-purchases', 3532f56664SŁukasz Kosmaty 'expo-dev-menu', 3632f56664SŁukasz Kosmaty 'expo-dev-menu-interface', 3732f56664SŁukasz Kosmaty 'expo-dev-launcher', 383e3d04c8SBrent Vatne 'expo-dev-client', 3902091ff0STomasz Sapeta 'expo-maps', 4008402879SKudo Chien 'expo-network-addons', 4102091ff0STomasz Sapeta 'expo-insights', 426c1c31e3STomasz Sapeta 'expo-face-detector' 43fd56468cSTomasz Sapeta ], 44ecd81e7dSTomasz Sapeta includeTests: true, 45fd56468cSTomasz Sapeta flags: { 46fd56468cSTomasz Sapeta :inhibit_warnings => false 47fd56468cSTomasz Sapeta } 48fd56468cSTomasz Sapeta }) 49fd56468cSTomasz Sapeta 506fdef252STomasz Sapeta # Install vendored pods. 516ab0274bSTomasz Sapeta use_pods! 'vendored/unversioned/**/*.podspec.json' 526fdef252STomasz Sapeta 53fd56468cSTomasz Sapeta # Unversioned React Native 549eae8a6aSKudo Chien use_react_native!( 55c0a96678SKudo Chien :path => '../react-native-lab/react-native/packages/react-native', 569eae8a6aSKudo Chien :hermes_enabled => true, 579eae8a6aSKudo Chien :fabric_enabled => false, 589eae8a6aSKudo Chien ) 5984f418d7SKudo Chien setup_jsc!( 60c0a96678SKudo Chien :react_native_path => '../react-native-lab/react-native/packages/react-native', 6184f418d7SKudo Chien :fabric_enabled => false, 6284f418d7SKudo Chien ) 63fd56468cSTomasz Sapeta 64fd56468cSTomasz Sapeta post_install do |installer| 652ed31047SKudo Chien # Workaround build error for Folly 662ed31047SKudo Chien __apply_Xcode_12_5_M1_post_install_workaround(installer) if installer.pods_project 672ed31047SKudo Chien 68fd56468cSTomasz Sapeta # Disabled as of CocoaPods 1.8.0.beta1 since pods_project seems to be nil 69fd56468cSTomasz Sapeta # installer.pods_project.main_group.tab_width = '2'; 70fd56468cSTomasz Sapeta # installer.pods_project.main_group.indent_width = '2'; 71fd56468cSTomasz Sapeta 72fd56468cSTomasz Sapeta installer.target_installation_results.pod_target_installation_results 73fd56468cSTomasz Sapeta .each do |pod_name, target_installation_result| 74cf276e6eSTomasz Sapeta 75fd56468cSTomasz Sapeta # Run postinstalls actions for versioned dependencies. 76fd56468cSTomasz Sapeta # These actions are specified in `versioned-react-native/ABI*/postinstalls.rb` files. 77fd56468cSTomasz Sapeta run_versioned_postinstalls!(pod_name, target_installation_result) 78fd56468cSTomasz Sapeta 7947221151STomasz Sapeta # This is necessary for Xcode 14 that by default signs resource bundles when building for the device. 8047221151STomasz Sapeta target_installation_result.resource_bundle_targets.each do |resource_bundle_target| 8147221151STomasz Sapeta resource_bundle_target.build_configurations.each do |config| 8247221151STomasz Sapeta config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO' 8347221151STomasz Sapeta end 8447221151STomasz Sapeta end 8547221151STomasz Sapeta 86*b7576b8aSAlan Hughes # Xcode 15 build error workaround. Remove after updating RN 87*b7576b8aSAlan Hughes target_installation_result.native_target.build_configurations.each do |config| 88*b7576b8aSAlan Hughes # unary_function and binary_function are no longer provided in C++17 and newer standard modes as part of Xcode 15. They can be re-enabled with setting _LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION 89*b7576b8aSAlan Hughes # Ref: https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes#Deprecations 90*b7576b8aSAlan Hughes config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)'] 91*b7576b8aSAlan Hughes config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << '"_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION" ' 92*b7576b8aSAlan Hughes end 93*b7576b8aSAlan Hughes 94fd56468cSTomasz Sapeta target_installation_result.native_target.build_configurations.each do |config| 95c88b85cfSTomasz Sapeta config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0' 96f3c0307aSKudo Chien 97fd56468cSTomasz Sapeta end 98fd56468cSTomasz Sapeta 99de56ef51SStanisław Chmiela if pod_name == 'Branch' 100de56ef51SStanisław Chmiela target_installation_result.native_target.build_configurations.each do |config| 101de56ef51SStanisław Chmiela config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)'] 102de56ef51SStanisław Chmiela config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'BRANCH_EXCLUDE_IDFA_CODE=1' 103de56ef51SStanisław Chmiela end 104de56ef51SStanisław Chmiela end 105de56ef51SStanisław Chmiela 10686dbd8e0Saleqsio # On iOS, the Stripe dependency StripePaymentsUI can't seem to find a header that should be there. 10786dbd8e0Saleqsio if pod_name == 'StripePaymentsUI' 10886dbd8e0Saleqsio target_installation_result.native_target.build_configurations.each do |config| 10986dbd8e0Saleqsio config.build_settings['HEADER_SEARCH_PATHS'] ||= ['$(inherited)'] 11086dbd8e0Saleqsio config.build_settings['HEADER_SEARCH_PATHS'] << '"$(PODS_ROOT)/Headers/Public/StripePayments"' 11186dbd8e0Saleqsio end 11286dbd8e0Saleqsio end 11386dbd8e0Saleqsio 1142852f59dSDouglas Lowder if pod_name.end_with?('EXUpdates') 1152852f59dSDouglas Lowder target_installation_result.native_target.build_configurations.each do |config| 1162852f59dSDouglas Lowder config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)'] 1172852f59dSDouglas Lowder config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'SUPPRESS_EXPO_UPDATES_SERVICE=1' 1182852f59dSDouglas Lowder end 1192852f59dSDouglas Lowder end 1202852f59dSDouglas Lowder 121fd56468cSTomasz Sapeta # Build React Native with RCT_DEV enabled and RCT_ENABLE_INSPECTOR and 122fd56468cSTomasz Sapeta # RCT_ENABLE_PACKAGER_CONNECTION disabled 123d8ac1fd4SStanisław Chmiela next unless pod_name.start_with?('React') 124fd56468cSTomasz Sapeta target_installation_result.native_target.build_configurations.each do |config| 125fd56468cSTomasz Sapeta config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)'] 126fd56468cSTomasz Sapeta config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'RCT_DEV=1' 127fd56468cSTomasz Sapeta config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'RCT_ENABLE_INSPECTOR=0' 128c0a96678SKudo Chien config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'RCT_REMOTE_PROFILE=0' 1296e345e04SKudo Chien config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'RCT_DEV_SETTINGS_ENABLE_PACKAGER_CONNECTION=0' 130fd56468cSTomasz Sapeta end 131fd56468cSTomasz Sapeta end 132fd56468cSTomasz Sapeta end 133fd56468cSTomasz Sapeta 134cf276e6eSTomasz Sapeta # Target for development, contains only unversioned code 135cf276e6eSTomasz Sapeta target 'Expo Go (unversioned)' do 136cf276e6eSTomasz Sapeta end 137cf276e6eSTomasz Sapeta 138cf276e6eSTomasz Sapeta # Release target additionally includes versioned SDKs 139cf276e6eSTomasz Sapeta target 'Expo Go (versioned)' do 140cf276e6eSTomasz Sapeta # Evaluate all files matching `versioned-react-native/ABI*/dependencies.rb` glob pattern 141cf276e6eSTomasz Sapeta # and install ReactABIXX_0_0 pods with all versioned unimodules. 142cf276e6eSTomasz Sapeta use_versioned_abis! 143cf276e6eSTomasz Sapeta end 144cf276e6eSTomasz Sapeta 145fd56468cSTomasz Sapeta # Test targets 146fd56468cSTomasz Sapeta target 'ExponentIntegrationTests' do 147fd56468cSTomasz Sapeta inherit! :search_paths 148fd56468cSTomasz Sapeta end 149fd56468cSTomasz Sapeta 150fd56468cSTomasz Sapeta target 'Tests' do 1511daa2a2bSKudo Chien # `ExpoModulesTestCore` has implicit dependency to `React-Core` which has a resource bundle. 1521daa2a2bSKudo Chien # To prevent CocoaPods generating new `React-Core` resource bundle and the strange `React-Core-60309c9c` target, 1531daa2a2bSKudo Chien # this test target should inherit all properties from parents. 1541daa2a2bSKudo Chien inherit! :complete 155e200a1adSTomasz Sapeta 156e229380eSŁukasz Kosmaty pod 'ExpoModulesTestCore', :path => "../packages/expo-modules-test-core/ios" 157e200a1adSTomasz Sapeta pod 'Nimble', :podspec => './Nimble.podspec' 158fd56468cSTomasz Sapeta end 159fd56468cSTomasz Sapetaend 160