Repository navigation
Expand file tree
/
Copy pathPodfile
More file actions
146 lines (122 loc) · 4.95 KB
/
Copy pathPodfile
File metadata and controls
146 lines (122 loc) · 4.95 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
require File.join(File.dirname(`node --print "require.resolve('expo/package.json')"`), "scripts/autolinking")
# Set the type of Mapbox SDK to use
# This value is used by $RNMapboxMaps
$RNMapboxMapsImpl = 'mapbox'
$VCDisableFrameProcessors = true
# Compiles react-native-screens' experimental (gamma) iOS code, which ScrollViewMarker needs.
# Without it, rendering ScrollViewMarker crashes on iOS.
ENV['RNS_GAMMA_ENABLED'] = '1'
def node_require(script)
# Resolve script with node to allow for hoisting
require Pod::Executable.execute_command('node', ['-p',
"require.resolve(
'#{script}',
{paths: [process.argv[1]]},
)", __dir__]).strip
end
node_require('react-native/scripts/react_native_pods.rb')
node_require('react-native-permissions/scripts/setup.rb')
# Must come after react_native_pods.rb, which defines ReactNativeCoreUtils.
require_relative '../scripts/artifacts-utils/ios/patched_ios_artifacts.rb'
PatchedIOSArtifacts.setup
MIN_IOS_VERSION = '16.4'
platform :ios, MIN_IOS_VERSION
prepare_react_native_project!
setup_permissions([
'Camera',
'Contacts',
'LocationAccuracy',
'LocationAlways',
'LocationWhenInUse'
])
# As per the official React Native Firebase documentation: https://rnfirebase.io/#altering-cocoapods-to-use-frameworks
use_frameworks! :linkage => :static
$RNFirebaseAsStaticFramework = true
# Force pods to match minimum iOS version for React Native
# Fixes build issue on Xcode Cloud where some pods
# Use iOS 12 calls despite being set as iOS 11
def __apply_Xcode_14_3_RC_post_install_workaround(installer)
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
current_target = config.build_settings['IPHONEOS_DEPLOYMENT_TARGET']
minimum_target = min_ios_version_supported
if current_target.to_f < minimum_target.to_f
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = minimum_target
end
end
end
end
# Configure Mapbox before installing dependencies
pre_install do |installer|
$RNMapboxMaps.pre_install(installer)
# Build RNFB/RNSentry as static libraries when consuming a prebuilt React Core.
PatchedIOSArtifacts.configure_prebuilt_pods(installer)
end
# Declare project globally so all targets inherit the same build configurations
project 'NewExpensify',
'DebugDevelopment' => :debug,
'DebugAdHoc' => :debug,
'DebugProduction' => :debug,
'ReleaseDevelopment' => :release,
'ReleaseAdHoc' => :release,
'ReleaseProduction' => :release,
'Debug' => :debug
target 'NewExpensify' do
# Certificate pinning (Iteration 1 - NewDot). TrustKit swizzles NSURLSession delegates so the
# pinning policy in CertificatePinning.swift applies to all URLSession traffic (fetch(),
# react-native-blob-util, etc.) without per-call code changes.
pod 'TrustKit', '~> 3.0'
pod 'NWWebSocket', '~> 0.5.10'
use_expo_modules!
post_integrate do |installer|
begin
expo_patch_react_imports!(installer)
rescue => e
Pod::UI.warn e
end
end
permissions_path = '../node_modules/react-native-permissions/ios'
config = use_native_modules!(['npx', 'rock', 'config', '-p', 'ios'])
# Flags change depending on the env values.
flags = get_default_flags()
# ENV Variable enables/disables TurboModules
ENV['RCT_NEW_ARCH_ENABLED'] = '1';
use_react_native!(
:path => config[:reactNativePath],
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
post_install do |installer|
# Configure Mapbox after installation
$RNMapboxMaps.post_install(installer)
# https://github.com/facebook/react-native/blob/main/scripts/react_native_pods.rb#L197-L202
react_native_post_install(
installer,
config[:reactNativePath],
:mac_catalyst_enabled => false,
# :ccache_enabled => true
)
__apply_Xcode_14_3_RC_post_install_workaround(installer)
# Build phase keeping the extracted prebuilt React Core in sync with the patched
# artifact version resolved at install (no-op on a source build).
PatchedIOSArtifacts.add_sync_prebuilt_script_phase(installer)
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_ENABLE_EXPLICIT_MODULES'] = 'NO'
config.build_settings['HEADER_SEARCH_PATHS'] ||= '$(inherited) '
config.build_settings['HEADER_SEARCH_PATHS'] << '"${PODS_ROOT}/../../node_modules/react-native/ReactCommon/jsitooling" '
end
if target.respond_to?(:product_type) and target.product_type == "com.apple.product-type.bundle"
target.build_configurations.each do |config|
config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
end
end
end
end
end
target 'NotificationServiceExtension' do
pod 'AirshipServiceExtension'
pod 'GzipSwift'
pod 'AppLogs', :path => '../node_modules/react-native-app-logs/AppLogsPod'
end
pod 'FullStory', :http => 'https://ios-releases.fullstory.com/fullstory-1.76.0-xcframework.tar.gz'