forked from player-ui/player
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PlayerUI.podspec
372 lines (317 loc) · 12.1 KB
/
PlayerUI.podspec
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
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
# Be sure to run `pod lib lint PlayerUI.podspec' to ensure this is a
# valid spec before submitting.
#
# Any lines starting with a # are optional, but their use is encouraged
# To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html
#
Pod::Spec.new do |s|
s.name = 'PlayerUI'
s.version = '0.0.1-placeholder'
s.summary = 'A native renderer for Player content'
s.swift_versions = ['5.1']
s.description = <<-DESC
This package is used to process semantic JSON in the Player format
and display it as a SwiftUI view comprised of registered assets.
DESC
s.homepage = 'https://github.com/player-ui/player'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'hborawski' => 'harris_borawski@intuit.com' }
s.source = { :http => "https://github.com/player-ui/player/releases/download/#{s.version.to_s}/PlayerUI_Pod.zip" }
s.ios.deployment_target = '14.0'
s.default_subspec = 'Main'
s.subspec 'Main' do |all|
all.dependency 'PlayerUI/SwiftUI'
end
# <INTERNAL>
s.app_spec 'Demo' do |demo|
demo.source_files = 'ios/packages/demo/Sources/**/*'
demo.resources = [
'ios/packages/demo/Resources/Primary.storyboard',
'ios/packages/demo/Resources/Launch.xib',
'ios/packages/demo/Resources/**/*.xcassets'
]
demo.dependency 'PlayerUI/SwiftUI'
demo.dependency 'PlayerUI/BeaconPlugin'
demo.dependency 'PlayerUI/ReferenceAssets'
demo.dependency 'PlayerUI/MetricsPlugin'
demo.dependency 'PlayerUI/TransitionPlugin'
demo.info_plist = {
'UILaunchStoryboardName' => 'Launch',
'CFBundleIdentifier' => 'com.intuit.ios.player',
'UIApplicationSceneManifest' => {
'UIApplicationSupportsMultipleScenes' => true,
'UISceneConfigurations' => {
'UIWindowSceneSessionRoleApplication' => [
{
'UISceneConfigurationName' => 'Default Configuration',
'UISceneDelegateClassName' => 'PlayerUI_Demo.SceneDelegate'
}
]
}
}
}
demo.pod_target_xcconfig = {
'PRODUCT_BUNDLE_IDENTIFIER': 'com.intuit.ios.player',
'CODE_SIGN_STYLE': 'Manual',
'CODE_SIGN_IDENTITY': 'iPhone Distribution',
'PROVISIONING_PROFILE_SPECIFIER': 'match InHouse com.intuit.ios.player',
'DEVELOPMENT_TEAM': 'F6DWWXWEX6',
'SKIP_INSTALL': 'NO',
'SKIP_INSTALLED_PRODUCT': 'YES'
}
demo.script_phases = [
{
:name => 'SwiftLint',
:execution_position => :before_compile,
:script => <<-SCRIPT
cd ${SRCROOT}/../..
${PODS_ROOT}/SwiftLint/swiftlint --config .swiftlint.yml --path ./ios/
SCRIPT
},
{
:name => 'Mock Generation',
:execution_position => :before_compile,
:shell_path => '/bin/zsh',
:script => <<-SCRIPT
cd ${SRCROOT}/../../ios/packages/demo/scripts
if test -f ~/.zshrc; then
source ~/.zshrc
fi
./generateFlowSections.js
SCRIPT
}
]
end
s.subspec 'InternalUnitTestUtilities' do |utils|
utils.dependency 'PlayerUI/Core'
utils.source_files = 'ios/packages/internal-test-utils/Sources/**/*'
utils.weak_framework = 'XCTest'
utils.pod_target_xcconfig = {
'ENABLE_BITCODE' => 'NO',
'ENABLE_TESTING_SEARCH_PATHS' => 'YES'
}
end
s.test_spec 'Unit' do |tests|
tests.requires_app_host = true
tests.app_host_name = 'PlayerUI/Demo'
tests.dependency 'PlayerUI/InternalUnitTestUtilities'
tests.dependency 'PlayerUI/Demo'
tests.dependency 'PlayerUI/TestUtilities'
tests.source_files = [
'ios/packages/*/Tests/**/*.swift',
'ios/plugins/*/Tests/**/*.swift'
]
end
s.test_spec 'ViewInspectorTests' do |tests|
tests.test_type = :ui
tests.requires_app_host = true
tests.app_host_name = 'PlayerUI/Demo'
tests.dependency 'PlayerUI/InternalUnitTestUtilities'
tests.dependency 'PlayerUI/Demo'
tests.dependency 'ViewInspector', '0.9.0'
tests.source_files = [
'ios/packages/*/ViewInspector/**/*',
'ios/plugins/*/ViewInspector/**/*',
# Mocks from demo app
'ios/packages/demo/Sources/MockFlows.swift'
]
# tests.resources = ['ios/packages/test-utils/viewinspector/ui-test/mocks']
tests.pod_target_xcconfig = {
'PRODUCT_BUNDLE_IDENTIFIER': 'com.intuit.ios.PlayerUI-ExampleUITests',
'CODE_SIGN_STYLE': 'Manual',
'CODE_SIGN_IDENTITY[sdk=iphoneos*]': 'iPhone Developer',
'PROVISIONING_PROFILE_SPECIFIER': 'match Development com.intuit.ios.PlayerUI-ExampleUITests*',
'DEVELOPMENT_TEAM': 'F6DWWXWEX6'
}
end
s.test_spec 'XCUITests' do |tests|
tests.test_type = :ui
tests.requires_app_host = true
tests.app_host_name = 'PlayerUI/Demo'
tests.dependency 'PlayerUI/InternalUnitTestUtilities'
tests.dependency 'PlayerUI/Demo'
tests.source_files = [
'ios/packages/*/UITests/**/*',
'ios/plugins/*/UITests/**/*'
]
tests.pod_target_xcconfig = {
'PRODUCT_BUNDLE_IDENTIFIER': 'com.intuit.ios.PlayerUI-ExampleUITests',
'CODE_SIGN_STYLE': 'Manual',
'CODE_SIGN_IDENTITY[sdk=iphoneos*]': 'iPhone Developer',
'PROVISIONING_PROFILE_SPECIFIER': 'match Development com.intuit.ios.PlayerUI-ExampleUITests*',
'DEVELOPMENT_TEAM': 'F6DWWXWEX6'
}
end
# </INTERNAL>
# <PACKAGES>
s.subspec 'Core' do |core|
core.source_files = 'ios/packages/core/Sources/**/*'
core.dependency 'SwiftHooks', '~> 0', '>= 0.1.0'
core.dependency 'PlayerUI/Logger'
core.resource_bundles = {
'PlayerUI' => ['ios/packages/core/Resources/**/*.js']
}
end
s.subspec 'TestUtilitiesCore' do |utils|
utils.dependency 'PlayerUI/Core'
utils.dependency 'PlayerUI/SwiftUI'
utils.source_files = 'ios/packages/test-utils-core/Sources/**/*'
utils.resource_bundles = {
'PlayerUI_TestUtilities' => ['ios/packages/test-utils/Resources/**/*.js']
}
end
s.subspec 'TestUtilities' do |utils|
utils.dependency 'PlayerUI/Core'
utils.dependency 'PlayerUI/SwiftUI'
utils.dependency 'PlayerUI/TestUtilitiesCore'
utils.source_files = 'ios/packages/test-utils/Sources/**/*'
utils.weak_framework = 'XCTest'
utils.pod_target_xcconfig = {
'ENABLE_BITCODE' => 'NO',
'ENABLE_TESTING_SEARCH_PATHS' => 'YES'
}
end
s.subspec 'ReferenceAssets' do |assets|
assets.dependency 'PlayerUI/Core'
assets.dependency 'PlayerUI/SwiftUI'
assets.dependency 'PlayerUI/BeaconPlugin'
assets.dependency 'PlayerUI/SwiftUIPendingTransactionPlugin'
assets.source_files = 'ios/packages/reference-assets/Sources/**/*'
assets.resource_bundles = {
'PlayerUI_ReferenceAssets' => [
'ios/packages/reference-assets/Resources/js/**/*.js',
'ios/packages/reference-assets/Resources/svg/*.xcassets',
# This should be generated by cocoapods-bazel in the build file, but isn't for some reason
'ios/packages/reference-assets/Resources/svg/*.xcassets/**/*'
]
}
end
s.subspec 'SwiftUI' do |swiftui|
swiftui.dependency 'PlayerUI/Core'
swiftui.source_files = 'ios/packages/swiftui/Sources/**/*'
end
s.subspec 'Logger' do |pkg|
pkg.dependency 'SwiftHooks', '~> 0', '>= 0.1.0'
pkg.source_files = 'ios/packages/logger/Sources/**/*'
end
# </PACKAGES>
# <PLUGINS>
s.subspec 'AsyncNodePlugin' do |plugin|
plugin.dependency 'PlayerUI/Core'
plugin.source_files = 'ios/plugins/AsyncNodePlugin/Sources/**/*'
plugin.resource_bundles = {
'PlayerUI_AsyncNodePlugin' => ['ios/plugins/AsyncNodePlugin/Resources/**/*.js']
}
end
s.subspec 'PrintLoggerPlugin' do |plugin|
plugin.dependency 'PlayerUI/Core'
plugin.source_files = 'ios/plugins/PrintLoggerPlugin/Sources/**/*'
end
s.subspec 'TransitionPlugin' do |plugin|
plugin.dependency 'PlayerUI/Core'
plugin.dependency 'PlayerUI/SwiftUI'
plugin.source_files = 'ios/plugins/TransitionPlugin/Sources/**/*'
end
s.subspec 'BaseBeaconPlugin' do |plugin|
plugin.dependency 'PlayerUI/Core'
plugin.source_files = 'ios/plugins/BaseBeaconPlugin/Sources/**/*'
plugin.resource_bundles = {
'PlayerUI_BaseBeaconPlugin' => ['ios/plugins/BaseBeaconPlugin/Resources/**/*.js']
}
end
s.subspec 'BeaconPlugin' do |plugin|
plugin.dependency 'PlayerUI/Core'
plugin.dependency 'PlayerUI/SwiftUI'
plugin.dependency 'PlayerUI/BaseBeaconPlugin'
plugin.source_files = 'ios/plugins/BeaconPlugin/Sources/**/*'
end
s.subspec 'CheckPathPlugin' do |plugin|
plugin.dependency 'PlayerUI/Core'
plugin.source_files = 'ios/plugins/CheckPathPlugin/Sources/**/*'
plugin.resource_bundles = {
'PlayerUI_CheckPathPlugin' => ['ios/plugins/CheckPathPlugin/Resources/**/*.js']
}
end
s.subspec 'CommonTypesPlugin' do |plugin|
plugin.dependency 'PlayerUI/Core'
plugin.source_files = 'ios/plugins/CommonTypesPlugin/Sources/**/*'
plugin.resource_bundles = {
'PlayerUI_CommonTypesPlugin' => ['ios/plugins/CommonTypesPlugin/Resources/**/*.js']
}
end
s.subspec 'ComputedPropertiesPlugin' do |plugin|
plugin.dependency 'PlayerUI/Core'
plugin.source_files = 'ios/plugins/ComputedPropertiesPlugin/Sources/**/*'
plugin.resource_bundles = {
'PlayerUI_ComputedPropertiesPlugin' => ['ios/plugins/ComputedPropertiesPlugin/Resources/**/*.js']
}
end
s.subspec 'CommonExpressionsPlugin' do |plugin|
plugin.dependency 'PlayerUI/Core'
plugin.source_files = 'ios/plugins/CommonExpressionsPlugin/Sources/**/*'
plugin.resource_bundles = {
'PlayerUI_CommonExpressionsPlugin' => ['ios/plugins/CommonExpressionsPlugin/Resources/**/*.js']
}
end
s.subspec 'ExpressionPlugin' do |plugin|
plugin.dependency 'PlayerUI/Core'
plugin.source_files = 'ios/plugins/ExpressionPlugin/Sources/**/*'
plugin.resource_bundles = {
'PlayerUI_ExpressionPlugin' => ['ios/plugins/ExpressionPlugin/Resources/**/*.js']
}
end
s.subspec 'ExternalActionPlugin' do |plugin|
plugin.dependency 'PlayerUI/Core'
plugin.source_files = 'ios/plugins/ExternalActionPlugin/Sources/**/*'
plugin.resource_bundles = {
'PlayerUI_ExternalActionPlugin' => ['ios/plugins/ExternalActionPlugin/Resources/**/*.js']
}
end
s.subspec 'ExternalActionViewModifierPlugin' do |plugin|
plugin.dependency 'PlayerUI/Core'
plugin.dependency 'PlayerUI/SwiftUI'
plugin.dependency 'PlayerUI/ExternalActionPlugin'
plugin.source_files = 'ios/plugins/ExternalActionViewModifierPlugin/Sources/**/*'
end
s.subspec 'MetricsPlugin' do |plugin|
plugin.dependency 'PlayerUI/Core'
plugin.dependency 'PlayerUI/SwiftUI'
plugin.source_files = 'ios/plugins/MetricsPlugin/Sources/**/*'
plugin.resource_bundles = {
'PlayerUI_MetricsPlugin' => ['ios/plugins/MetricsPlugin/Resources/**/*.js']
}
end
s.subspec 'PubSubPlugin' do |plugin|
plugin.dependency 'PlayerUI/Core'
plugin.source_files = 'ios/plugins/PubSubPlugin/Sources/**/*'
plugin.resource_bundles = {
'PlayerUI_PubSubPlugin' => ['ios/plugins/PubSubPlugin/Resources/**/*.js']
}
end
s.subspec 'StageRevertDataPlugin' do |plugin|
plugin.dependency 'PlayerUI/Core'
plugin.source_files = 'ios/plugins/StageRevertDataPlugin/Sources/**/*'
plugin.resource_bundles = {
'PlayerUI_StageRevertDataPlugin' => ['ios/plugins/StageRevertDataPlugin/Resources/**/*.js']
}
end
s.subspec 'SwiftUICheckPathPlugin' do |plugin|
plugin.dependency 'PlayerUI/Core'
plugin.dependency 'PlayerUI/SwiftUI'
plugin.dependency 'PlayerUI/CheckPathPlugin'
plugin.source_files = 'ios/plugins/SwiftUICheckPathPlugin/Sources/**/*'
end
s.subspec 'SwiftUIPendingTransactionPlugin' do |plugin|
plugin.dependency 'PlayerUI/Core'
plugin.dependency 'PlayerUI/SwiftUI'
plugin.source_files = 'ios/plugins/SwiftUIPendingTransactionPlugin/Sources/**/*'
end
s.subspec 'TypesProviderPlugin' do |plugin|
plugin.dependency 'PlayerUI/Core'
plugin.source_files = 'ios/plugins/TypesProviderPlugin/Sources/**/*'
plugin.resource_bundles = {
'PlayerUI_TypesProviderPlugin' => ['ios/plugins/TypesProviderPlugin/Resources/**/*.js']
}
end
# </PLUGINS>
end