mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-17 21:10:43 +00:00
### Description <!-- Describe your changes. --> Upgrading RN to 0.71.19, including Android and iOS changes.. This PR also include the E2E test changes. Used React-Native upgrade [helper](https://react-native-community.github.io/upgrade-helper/?from=0.70.15&to=0.71.19&package=onnxruntime-android&name=onnxruntime) as the reference. ### Motivation and Context Need newer RN version to fix S360 work items.
57 lines
1.9 KiB
Ruby
57 lines
1.9 KiB
Ruby
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!
|
|
|
|
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
|
|
|
|
pre_install do |installer|
|
|
# Custom pre-install script or commands
|
|
puts "Running pre-install script..."
|
|
|
|
# Recommended fix for https://github.com/facebook/react-native/issues/32483
|
|
# from https://github.com/facebook/react-native/issues/32483#issuecomment-966784501
|
|
system("sed -i '' 's/typedef uint8_t clockid_t;//' \"./Pods/RCT-Folly/folly/portability/Time.h\"")
|
|
end
|
|
|
|
target 'OnnxruntimeModuleExample' do
|
|
config = use_native_modules!
|
|
|
|
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,
|
|
# :flipper_configuration => FlipperConfiguration.enabled,
|
|
: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
|
|
end
|
|
pod 'onnxruntime-react-native', :path => '../node_modules/onnxruntime-react-native'
|
|
|
|
inherit! :search_paths
|
|
post_install do |installer|
|
|
react_native_post_install(
|
|
installer,
|
|
config[:reactNativePath],
|
|
# 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
|
|
end
|