2021-05-11 17:34:40 +00:00
|
|
|
require_relative '../node_modules/react-native/scripts/react_native_pods'
|
|
|
|
|
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
|
|
|
|
|
|
2025-01-09 00:02:45 +00:00
|
|
|
platform :ios, '15.1'
|
2021-05-11 17:34:40 +00:00
|
|
|
|
2024-09-17 17:07:30 +00:00
|
|
|
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
|
|
|
|
|
|
2021-05-11 17:34:40 +00:00
|
|
|
target 'OnnxruntimeModuleExample' do
|
|
|
|
|
config = use_native_modules!
|
|
|
|
|
|
2025-01-14 22:09:49 +00:00
|
|
|
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}/.."
|
|
|
|
|
)
|
2021-05-11 17:34:40 +00:00
|
|
|
|
2021-06-15 20:36:05 +00:00
|
|
|
use_frameworks!
|
2021-12-14 03:02:10 +00:00
|
|
|
|
2023-04-21 16:46:26 +00:00
|
|
|
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
|
2021-12-14 03:02:10 +00:00
|
|
|
end
|
2022-07-27 22:15:45 +00:00
|
|
|
pod 'onnxruntime-react-native', :path => '../node_modules/onnxruntime-react-native'
|
2021-06-15 20:36:05 +00:00
|
|
|
|
|
|
|
|
inherit! :search_paths
|
2025-01-14 22:09:49 +00:00
|
|
|
post_install do |installer|
|
|
|
|
|
# https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
|
|
|
|
|
react_native_post_install(
|
|
|
|
|
installer,
|
|
|
|
|
config[:reactNativePath],
|
|
|
|
|
:mac_catalyst_enabled => false,
|
|
|
|
|
)
|
|
|
|
|
__apply_Xcode_12_5_M1_post_install_workaround(installer)
|
|
|
|
|
end
|
2025-01-09 00:02:45 +00:00
|
|
|
end
|