1install! 'cocoapods', 2 :generate_multiple_pod_projects => true, 3 :incremental_installation => true, 4 :deterministic_uuids => false 5source 'https://cdn.cocoapods.org/' 6platform :ios, '13.0' 7inhibit_all_warnings! 8 9# Import the auto-linking packages 10require File.join(File.dirname(`node --print "require.resolve('react-native/package.json')"`), "scripts/react_native_pods") 11require File.join(File.dirname(`node --print "require.resolve('expo/package.json')"`), "scripts/autolinking") 12 13require 'json' 14podfile_properties = JSON.parse(File.read('./Podfile.properties.json')) rescue {} 15ENV['EX_DEV_CLIENT_NETWORK_INSPECTOR'] = podfile_properties['EX_DEV_CLIENT_NETWORK_INSPECTOR'] 16 17prepare_react_native_project! 18 19# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set. 20# because `react-native-flipper` depends on (FlipperKit,...) that will be excluded 21# 22# To fix this you can also exclude `react-native-flipper` using a `react-native.config.js` 23# ```js 24# module.exports = { 25# dependencies: { 26# ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}), 27# ``` 28flipper_config = ENV['NO_FLIPPER'] == "1" || ENV['CI'] ? FlipperConfiguration.disabled : FlipperConfiguration.enabled 29 30abstract_target 'BareExpoMain' do 31 pod 'expo-dev-menu', path: '../../../packages/expo-dev-menu', :testspecs => ['Tests', 'UITests'] 32 33 use_expo_modules!( 34 includeTests: true, 35 ) 36 37 use_frameworks! :linkage => podfile_properties['ios.useFrameworks'].to_sym if podfile_properties['ios.useFrameworks'] 38 use_frameworks! :linkage => ENV['USE_FRAMEWORKS'].to_sym if ENV['USE_FRAMEWORKS'] 39 40 # Flags change depending on the env values. 41 flags = get_default_flags() 42 43 config = use_native_modules! 44 45 # Fix Google Sign-in and Flipper 46 post_install do |installer| 47 # `installer.pods_project` might be nil for `incremental_installation: true` and no new project generated 48 if installer.pods_project 49 react_native_post_install( 50 installer, 51 config[:reactNativePath], 52 :mac_catalyst_enabled => false 53 ) 54 __apply_Xcode_12_5_M1_post_install_workaround(installer) 55 end 56 57 # This is necessary for Xcode 14, because it signs resource bundles by default 58 # when building for devices. 59 installer.target_installation_results.pod_target_installation_results 60 .each do |pod_name, target_installation_result| 61 target_installation_result.resource_bundle_targets.each do |resource_bundle_target| 62 resource_bundle_target.build_configurations.each do |config| 63 config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO' 64 end 65 end 66 end 67 end 68 69 post_integrate do |installer| 70 begin 71 expo_patch_react_imports!(installer) 72 rescue => e 73 Pod::UI.warn e 74 end 75 end 76 77 target 'BareExpo' do 78 use_react_native!( 79 :path => config[:reactNativePath], 80 :hermes_enabled => podfile_properties['expo.jsEngine'] == nil || podfile_properties['expo.jsEngine'] == 'hermes', 81 :fabric_enabled => flags[:fabric_enabled], 82 # An absolute path to your application root. 83 :app_path => "#{Pod::Config.instance.installation_root}/..", 84 # 85 # Uncomment to opt-in to using Flipper 86 # Note that if you have use_frameworks! enabled, Flipper will not work 87 # :flipper_configuration => flipper_config, 88 ) 89 end 90 91 target 'BareExpoDetox' do 92 use_react_native!( 93 :path => config[:reactNativePath], 94 :hermes_enabled => podfile_properties['expo.jsEngine'] == nil || podfile_properties['expo.jsEngine'] == 'hermes', 95 :fabric_enabled => flags[:fabric_enabled], 96 # An absolute path to your application root. 97 :app_path => "#{Pod::Config.instance.installation_root}/..", 98 :flipper_configuration => FlipperConfiguration.disabled, 99 ) 100 end 101 102 target 'BareExpoTests' do 103 use_react_native!( 104 :path => config[:reactNativePath], 105 :hermes_enabled => podfile_properties['expo.jsEngine'] == nil || podfile_properties['expo.jsEngine'] == 'hermes', 106 :fabric_enabled => flags[:fabric_enabled], 107 # An absolute path to your application root. 108 :app_path => "#{Pod::Config.instance.installation_root}/..", 109 :flipper_configuration => FlipperConfiguration.disabled, 110 ) 111 112 pod 'ExpoModulesTestCore', :path => "../../../packages/expo-modules-test-core/ios" 113 pod 'Nimble', :podspec => './../../../ios/Nimble.podspec' 114 end 115end 116