require_relative '../node_modules/react-native/scripts/react_native_pods' require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' platform :ios, '15.1' prepare_react_native_project! # use_frameworks need to be loaded before use_react_native! for now use_frameworks! def shared config = use_native_modules! # Flags change depending on the env values. flags = get_default_flags() use_react_native!( :path => config[:reactNativePath], # Hermes is now enabled by default. Disable by setting this flag to false. # Upcoming versions of React Native may rely on get_default_flags(), but # we make it explicit here to aid in the React Native upgrade process. :hermes_enabled => false, :fabric_enabled => false, :app_path => "#{Pod::Config.instance.installation_root}/.." ) ort_c_local_pod_path = ENV['ORT_C_LOCAL_POD_PATH'] if ort_c_local_pod_path != nil print 'Using onnxruntime-c pod at ', ort_c_local_pod_path, "\n" pod 'onnxruntime-c', :path => ort_c_local_pod_path else pod 'onnxruntime-c' end inherit! :complete end target 'OnnxruntimeModule' do shared end target 'OnnxruntimeModuleTest' do shared end post_install do |installer| react_native_post_install( installer, # Set `mac_catalyst_enabled` to `true` in order to apply patches # necessary for Mac Catalyst builds :mac_catalyst_enabled => false ) __apply_Xcode_12_5_M1_post_install_workaround(installer) end