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