MovixOpenSource/app/ios/Podfile

51 lines
1.6 KiB
Ruby

# 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
platform :ios, min_ios_version_supported
prepare_react_native_project!
linkage = ENV['USE_FRAMEWORKS']
if linkage != nil
Pod::UI.puts "Configuring Pod with #{linkage}ing framework linking."
use_frameworks! :linkage => linkage.to_sym
end
target 'MovixApp' do
config = use_native_modules!
use_react_native!(
:path => config[:reactNativePath],
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
post_install do |installer|
react_native_post_install(
installer,
config[:reactNativePath],
:mac_catalyst_enabled => false
)
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['CLANG_CXX_LIBRARY'] = 'libc++'
config.build_settings['OTHER_CPLUSPLUSFLAGS'] = '$(inherited) -include "$(PODS_ROOT)/../char_traits_fix.h"'
config.build_settings['CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES'] = 'YES'
end
end
# Remove Expo build phases injected by react-native (no expo in this project)
installer.aggregate_targets.each do |agg_target|
agg_target.user_project.targets.each do |target|
target.build_phases.select { |p|
p.is_a?(Xcodeproj::Project::Object::PBXShellScriptBuildPhase) &&
p.name.to_s.include?("[Expo]")
}.each(&:remove_from_project)
end
agg_target.user_project.save
end
end
end