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'
|
|
|
|
|
|
2024-06-04 17:15:20 +00:00
|
|
|
platform :ios, '13.0'
|
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-06-15 20:36:05 +00:00
|
|
|
def shared
|
2021-05-11 17:34:40 +00:00
|
|
|
config = use_native_modules!
|
|
|
|
|
|
|
|
|
|
use_react_native!(:path => config["reactNativePath"])
|
2021-06-15 20:36:05 +00:00
|
|
|
|
|
|
|
|
# Comment the next line if you don't want to use dynamic frameworks
|
|
|
|
|
use_frameworks!
|
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
|
2022-02-10 05:37:05 +00:00
|
|
|
else
|
2022-09-22 21:20:03 +00:00
|
|
|
pod 'onnxruntime-c'
|
2022-02-10 05:37:05 +00:00
|
|
|
end
|
2021-06-15 20:36:05 +00:00
|
|
|
|
|
|
|
|
inherit! :search_paths
|
2021-05-11 17:34:40 +00:00
|
|
|
end
|
|
|
|
|
|
2021-06-15 20:36:05 +00:00
|
|
|
target 'OnnxruntimeModule' do
|
|
|
|
|
shared
|
|
|
|
|
end
|
2021-05-11 17:34:40 +00:00
|
|
|
|
2021-06-15 20:36:05 +00:00
|
|
|
target 'OnnxruntimeModuleTest' do
|
|
|
|
|
shared
|
2021-05-11 17:34:40 +00:00
|
|
|
end
|
2024-09-17 17:07:30 +00:00
|
|
|
|
|
|
|
|
post_install do |installer|
|
|
|
|
|
installer.generated_projects.each do |project|
|
|
|
|
|
project.targets.each do |target|
|
|
|
|
|
target.build_configurations.each do |config|
|
|
|
|
|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|