# Resolve react_native_pods.rb with node to allow for hoisting require Pod::Executable.execute_command('node', ['-p', 'require.resolve( "react-native/scripts/react_native_pods.rb", {paths: [process.argv[1]]}, )', __dir__]).strip require File.join(File.dirname(`node --print "require.resolve('expo/package.json')"`), "scripts/autolinking") platform :ios, '17.0' prepare_react_native_project! linkage = ENV['USE_FRAMEWORKS'] if linkage != nil Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green use_frameworks! :linkage => linkage.to_sym end target 'CodepadExample' do use_expo_modules! if ENV['EXPO_USE_COMMUNITY_AUTOLINKING'] == '1' config_command = ['node', '-e', "process.argv=['', '', 'config'];require('@react-native-community/cli').run()"]; else config_command = [ 'node', '--no-warnings', '--eval', 'require(\'expo/bin/autolinking\')', 'expo-modules-autolinking', 'react-native-config', '--json', '--platform', 'ios' ] end config = use_native_modules!(config_command) use_react_native!( :path => config[:reactNativePath], # An absolute path to your application root. :app_path => "#{Pod::Config.instance.installation_root}/.." ) target 'CodepadTests' do inherit! :search_paths end post_install do |installer| # ExpoModulesCore imports the prebuilt React framework, whose headers include non-modular ones. installer.pods_project.targets.each do |target| next unless target.name.start_with?('Expo') target.build_configurations.each do |config| config.build_settings['CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES'] = 'YES' end end react_native_post_install( installer, config[:reactNativePath], :mac_catalyst_enabled => false, # :ccache_enabled => true ) end end