forked from woocommerce/woocommerce-ios
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Podfile
183 lines (153 loc) · 4.37 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
source 'https://cdn.cocoapods.org/'
inhibit_all_warnings!
use_frameworks! # Defaulting to use_frameworks! See pre_install hook below for static linking.
use_modular_headers!
platform :ios, '12.0'
workspace 'WooCommerce.xcworkspace'
# Main Target!
# ============
#
target 'WooCommerce' do
project 'WooCommerce/WooCommerce.xcodeproj'
# Automattic Libraries
# ====================
#
# Use the latest bugfix for coretelephony
#pod 'Automattic-Tracks-iOS', :git => 'https://github.com/Automattic/Automattic-Tracks-iOS.git', :tag => '0.2.4-beta.1'
pod 'Automattic-Tracks-iOS', '~> 0.4.0'
pod 'Gridicons', '~> 0.19'
# To allow pod to pick up beta versions use -beta. E.g., 1.1.7-beta.1
#pod 'WordPressAuthenticator', :git => 'https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git', :branch => 'task/wc-support-site-url-login'
pod 'WordPressAuthenticator', '~> 1.10.5'
# pod 'WordPressShared', :git => 'https://github.com/wordpress-mobile/WordPress-iOS-Shared.git', :branch => 'task/support-swift-5'
pod 'WordPressShared', '~> 1.8.2'
pod 'WordPressUI', '~> 1.4'
pod 'WordPress-Editor-iOS', '~> 1.11.0'
# External Libraries
# ==================
#
pod 'Alamofire', '~> 4.7'
pod 'KeychainAccess', '~> 3.2'
pod 'CocoaLumberjack', '~> 3.5'
pod 'CocoaLumberjack/Swift', '~> 3.5'
pod 'XLPagerTabStrip', '~> 9.0'
pod 'Charts', '~> 3.3.0'
pod 'ZendeskSDK', '~> 4.0'
pod 'Kingfisher', '~> 5.11.0'
pod 'Wormholy', '~> 1.5.1', :configurations => ['Debug']
# Unit Tests
# ==========
#
target 'WooCommerceTests' do
inherit! :search_paths
end
end
# Yosemite Layer:
# ===============
#
def yosemite_pods
pod 'Alamofire', '~> 4.7'
pod 'CocoaLumberjack', '~> 3.5'
pod 'CocoaLumberjack/Swift', '~> 3.5'
end
# Yosemite Target:
# ================
#
target 'Yosemite' do
project 'Yosemite/Yosemite.xcodeproj'
yosemite_pods
end
# Unit Tests
# ==========
#
target 'YosemiteTests' do
project 'Yosemite/Yosemite.xcodeproj'
yosemite_pods
end
# Networking Layer:
# =================
#
def networking_pods
pod 'Alamofire', '~> 4.7'
pod 'CocoaLumberjack', '~> 3.5'
pod 'CocoaLumberjack/Swift', '~> 3.5'
end
# Networking Target:
# ==================
#
target 'Networking' do
project 'Networking/Networking.xcodeproj'
networking_pods
end
# Unit Tests
# ==========
#
target 'NetworkingTests' do
project 'Networking/Networking.xcodeproj'
networking_pods
end
# Storage Layer:
# ==============
#
def storage_pods
pod 'CocoaLumberjack', '~> 3.5'
pod 'CocoaLumberjack/Swift', '~> 3.5'
end
# Storage Target:
# ===============
#
target 'Storage' do
project 'Storage/Storage.xcodeproj'
storage_pods
end
# Unit Tests
# ==========
#
target 'StorageTests' do
project 'Storage/Storage.xcodeproj'
storage_pods
end
# Workarounds:
# ============
#
# Static Frameworks:
# ============
#
# Make all pods that are not shared across multiple targets into static frameworks by overriding the static_framework? function to return true
# Linking the shared frameworks statically would lead to duplicate symbols
# A future version of CocoaPods may make this easier to do. See https://github.com/CocoaPods/CocoaPods/issues/7428
shared_targets = ['Storage', 'Networking', 'Yosemite']
# Statically linking Sentry results in a conflict with `NSDictionary.objectAtKeyPath`, but dynamically
# linking it resolves this.
dynamic_pods = ['Sentry']
pre_install do |installer|
static = []
dynamic = []
installer.pod_targets.each do |pod|
# If this pod is a dependency of one of our shared targets or its explicitly excluded, it must be linked dynamically
if pod.target_definitions.any? { |t| shared_targets.include? t.name } || dynamic_pods.include?(pod.name)
dynamic << pod
next
end
static << pod
def pod.static_framework?;
true
end
end
puts "Installing #{static.count} pods as static frameworks"
puts "Installing #{dynamic.count} pods as dynamic frameworks"
# Force CocoaLumberjack Swift version
installer.analysis_result.specifications.each do |s|
if s.name == 'CocoaLumberjack'
s.swift_version = '5.0'
end
end
end
post_install do |installer|
# Workaround: Drop 32 Bit Architectures
# =====================================
#
installer.pods_project.build_configuration_list.build_configurations.each do |configuration|
configuration.build_settings['VALID_ARCHS'] = '$(ARCHS_STANDARD_64_BIT)'
end
end