forked from ProtonVPN/ios-mac-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPodfile
250 lines (199 loc) · 8.42 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
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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
workspace 'ProtonVPN'
# ignore all warnings from all pods
inhibit_all_warnings!
def proton_url
'git@' + ENV["PROTON_GIT_URL"]
end
def proton_core_path
proton_url + ':apple/shared/protoncore.git'
end
def proton_core_version
'3.26.2'
end
def openvpn
pod 'TunnelKit', :git => proton_url + ':apple/vpn/tunnelkit.git', :branch => 'develop'
end
def pm_automation
pod 'pmtest', :git => proton_url + ':apple/shared/pmtestautomation.git', :commit => '56581413f76841d7f0d9f6ba555e03a6cc7b8d94'
end
def keychain_access
pod 'KeychainAccess', '3.2.1'
end
def reachability
pod 'ReachabilitySwift', '5.0.0'
end
def sd_web_image
pod 'SDWebImage', '5.12.6'
end
def crypto_variant
"Crypto+VPN-Go1.15.15"
end
def vpn_core
use_frameworks!
pod 'Sentry', :git => 'https://github.com/getsentry/sentry-cocoa.git', :tag => '7.16.0'
reachability
keychain_access
# Checks code style and bad practices
pod 'SwiftLint', '0.48.0'
pod 'SwiftGen', '~> 6.5'
# Certificates pinning
pod 'TrustKit', :git => 'https://github.com/ProtonMail/TrustKit', :branch => 'release/1.0.3', :commit => 'd107d7cc825f38ae2d6dc7c54af71d58145c3506'
openvpn
# Core
pod 'ProtonCore-Log', :git => proton_core_path, :tag => proton_core_version
pod 'ProtonCore-Doh', :git => proton_core_path, :tag => proton_core_version
pod 'ProtonCore-Services', :git => proton_core_path, :tag => proton_core_version
pod 'ProtonCore-Environment', :git => proton_core_path, :tag => proton_core_version
pod 'ProtonCore-Networking', :git => proton_core_path, :tag => proton_core_version
pod "ProtonCore-Authentication/#{crypto_variant}", :git => proton_core_path, :tag => proton_core_version
pod "ProtonCore-GoLibs/#{crypto_variant}", :git => proton_core_path, :tag => proton_core_version
pod "ProtonCore-Payments/#{crypto_variant}", :git => proton_core_path, :tag => proton_core_version
pod 'ProtonCore-UIFoundations', :git => proton_core_path, :tag => proton_core_version
# Third party pods
sd_web_image
end
abstract_target 'Core' do
project 'libraries/vpncore/Core.xcodeproj'
vpn_core
target 'vpncore-ios' do
platform :ios, '14.0'
end
target 'vpncore-macos' do
platform :osx, '10.15'
end
target 'vpncore-iosTests' do
platform :ios, '14.0'
pod 'ProtonCore-TestingToolkit/UnitTests/Core', :git => proton_core_path, :tag => proton_core_version
end
target 'vpncore-macosTests' do
platform :osx, '10.15'
pod 'ProtonCore-TestingToolkit/UnitTests/Core', :git => proton_core_path, :tag => proton_core_version
end
end
# iOS
target 'ProtonVPN' do
project 'apps/ios/iOS.xcodeproj'
platform :ios, '14.0'
use_frameworks!
vpn_core
pod 'GSMessages', '~> 1.0'
pod 'AlamofireImage', '~> 4.1'
pod 'Alamofire', '5.4.4'
pod 'OHHTTPStubs/Swift', '9.1.0', :configurations => ['Debug', 'Staging'] # Staging builds also have set DEBUG flag
reachability
pod 'ProtonCore-Challenge', :git => proton_core_path, :tag => proton_core_version
pod 'ProtonCore-Foundations', :git => proton_core_path, :tag => proton_core_version
pod "ProtonCore-Login/#{crypto_variant}", :git => proton_core_path, :tag => proton_core_version
pod "ProtonCore-GoLibs/#{crypto_variant}", :git => proton_core_path, :tag => proton_core_version
pod "ProtonCore-LoginUI/#{crypto_variant}", :git => proton_core_path, :tag => proton_core_version
pod 'ProtonCore-Log', :git => proton_core_path, :tag => proton_core_version
pod 'ProtonCore-OpenPGP', :git => proton_core_path, :tag => proton_core_version
pod 'ProtonCore-DataModel', :git => proton_core_path, :tag => proton_core_version
pod 'ProtonCore-CoreTranslation', :git => proton_core_path, :tag => proton_core_version
pod "ProtonCore-Authentication-KeyGeneration/#{crypto_variant}", :git => proton_core_path, :tag => proton_core_version
pod 'ProtonCore-FeatureSwitch', :git => proton_core_path, :tag => proton_core_version
pod 'ProtonCore-HumanVerification', :git => proton_core_path, :tag => proton_core_version
pod "ProtonCore-Payments/#{crypto_variant}", :git => proton_core_path, :tag => proton_core_version
pod "ProtonCore-PaymentsUI/#{crypto_variant}", :git => proton_core_path, :tag => proton_core_version
pod 'ProtonCore-APIClient', :git => proton_core_path, :tag => proton_core_version
pod 'ProtonCore-Utilities', :git => proton_core_path, :tag => proton_core_version
pod 'ProtonCore-Hash', :git => proton_core_path, :tag => proton_core_version
pod 'ProtonCore-ForceUpgrade', :git => proton_core_path, :tag => proton_core_version
pod "ProtonCore-AccountDeletion/#{crypto_variant}", :git => proton_core_path, :tag => proton_core_version
pod 'ProtonCore-TroubleShooting', :git => proton_core_path, :tag => proton_core_version
target 'OpenVPN Extension' do
openvpn
inherit! :search_paths
end
target 'Quick Connect Widget' do
inherit! :search_paths
end
target 'Siri Shortcut Handler' do
inherit! :search_paths
end
target 'ProtonVPNTests' do
pod 'ProtonCore-ForceUpgrade', :git => proton_core_path, :tag => proton_core_version
inherit! :search_paths
end
target 'ProtonVPNUITests' do
platform :ios, '14.0'
pm_automation
pod 'ProtonCore-QuarkCommands', :git => proton_core_path, :tag => proton_core_version
pod 'ProtonCore-TestingToolkit/UITests/HumanVerification', :git => proton_core_path, :tag => proton_core_version
pod 'ProtonCore-TestingToolkit/UITests/PaymentsUI', :git => proton_core_path, :tag => proton_core_version
pod 'ProtonCore-TestingToolkit/UITests/Core', :git => proton_core_path, :tag => proton_core_version
pod 'ProtonCore-TestingToolkit/UITests/Login', :git => proton_core_path, :tag => proton_core_version
pod 'swift-snapshot-testing', :git => proton_core_path, :tag => proton_core_version
pod 'SwiftOTP'
end
end
target 'WireGuardiOS Extension' do
project 'apps/ios/iOS.xcodeproj'
platform :ios, '14.0'
use_frameworks!
keychain_access
end
# macOS
target 'ProtonVPN-mac' do
project 'apps/macos/macOS.xcodeproj'
vpn_core
pod 'ProtonCore-UIFoundations', :git => proton_core_path, :tag => proton_core_version
pod "ProtonCore-Login/#{crypto_variant}", :git => proton_core_path, :tag => proton_core_version
pod "ProtonCore-GoLibs/#{crypto_variant}", :git => proton_core_path, :tag => proton_core_version
end
target 'ProtonVPN OpenVPN' do
project 'apps/macos/macOS.xcodeproj'
use_frameworks!
openvpn
end
target 'ProtonVPN WireGuard' do
project 'apps/macos/macOS.xcodeproj'
use_frameworks!
keychain_access
end
target 'ProtonVPNmacOSTests' do
project 'apps/macos/macOS.xcodeproj'
inherit! :search_paths
vpn_core
end
# Other
post_install do |installer|
# Create plist with info about used frameworks
plugin 'cocoapods-acknowledgements'
require 'fileutils'
FileUtils.cp_r('Pods/Target Support Files/Pods-ProtonVPN/Pods-ProtonVPN-acknowledgements.markdown', 'ACKNOWLEDGEMENTS.md')
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '14.0'
config.build_settings['ENABLE_BITCODE'] = 'NO'
# Reset deployment targets to use the one we have on the main project
config.build_settings.delete 'MACOSX_DEPLOYMENT_TARGET'
# The swift version setting can be removed once we move to lottie 3.4.2 or higher
if target.name == 'lottie-ios'
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '5.0'
end
end
end
end
# Fix bundle signing problems started with Xcode 14: https://github.com/CocoaPods/CocoaPods/issues/11402
## Get main project development team id
dev_team = ""
project = installer.aggregate_targets[0].user_project
project.targets.each do |target|
target.build_configurations.each do |config|
if dev_team.empty? and !config.build_settings['DEVELOPMENT_TEAM'].nil?
dev_team = config.build_settings['DEVELOPMENT_TEAM']
end
end
end
## Fix bundle targets' 'Signing Certificate' to 'Sign to Run Locally'
installer.pods_project.targets.each do |target|
if target.respond_to?(:product_type) and target.product_type == "com.apple.product-type.bundle"
target.build_configurations.each do |config|
config.build_settings['DEVELOPMENT_TEAM'] = dev_team
end
end
end
# End of fix
end