1require File.join(File.dirname(`node --print "require.resolve('expo/package.json')"`), "scripts/autolinking") 2# Resolve react_native_pods.rb with node to allow for hoisting 3require Pod::Executable.execute_command('node', ['-p', 4 'require.resolve( 5 "react-native/scripts/react_native_pods.rb", 6 {paths: [process.argv[1]]}, 7 )', __dir__]).strip 8 9platform :ios, min_ios_version_supported 10prepare_react_native_project! 11 12linkage = ENV['USE_FRAMEWORKS'] 13if linkage != nil 14 Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green 15 use_frameworks! :linkage => linkage.to_sym 16end 17 18target 'MusicFree' do 19 use_expo_modules! 20 post_integrate do |installer| 21 begin 22 expo_patch_react_imports!(installer) 23 rescue => e 24 Pod::UI.warn e 25 end 26 end 27 if ENV['EXPO_USE_COMMUNITY_AUTOLINKING'] == '1' 28 config_command = ['node', '-e', "process.argv=['', '', 'config'];require('@react-native-community/cli').run()"]; 29 else 30 config_command = [ 31 'node', 32 '--no-warnings', 33 '--eval', 34 'require(require.resolve(\'expo-modules-autolinking\', { paths: [require.resolve(\'expo/package.json\')] }))(process.argv.slice(1))', 35 'react-native-config', 36 '--json', 37 '--platform', 38 'ios' 39 ] 40 end 41 42 config = use_native_modules!(config_command) 43 44 use_react_native!( 45 :path => config[:reactNativePath], 46 # An absolute path to your application root. 47 :app_path => "#{Pod::Config.instance.installation_root}/.." 48 ) 49 50 target 'MusicFreeTests' do 51 inherit! :complete 52 # Pods for testing 53 end 54 55 post_install do |installer| 56 # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202 57 react_native_post_install( 58 installer, 59 config[:reactNativePath], 60 :mac_catalyst_enabled => false, 61 # :ccache_enabled => true 62 ) 63 end 64end 65