-
Notifications
You must be signed in to change notification settings - Fork 3.1k
/
Copy pathPodfile
58 lines (48 loc) · 1.87 KB
/
Podfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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'
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
def shared
config = use_native_modules!
# Check both symbol and string keys with default value
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
)
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
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! :search_paths
end
target 'OnnxruntimeModule' do
shared
end
target 'OnnxruntimeModuleTest' do
shared
end
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'] = '15.1'
# TODO: remove this once we migrate the Pipelines to use arm64 MacOS
config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = "arm64"
end
end
end
end