-
Notifications
You must be signed in to change notification settings - Fork 372
/
project.yml
383 lines (378 loc) · 14.9 KB
/
project.yml
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
373
374
375
376
377
378
379
380
381
382
383
name: AlphaWallet
options:
bundleIdPrefix: com.stormbird
deploymentTarget:
iOS: 14.0
settings:
base:
GENERATE_INFOPLIST_FILE: YES
DEVELOPMENT_TEAM: LRAW5PL536
CODE_SIGN_STYLE: Automatic
CURRENT_PROJECT_VERSION: 514
MARKETING_VERSION: 3.73
targets:
AlphaWallet:
type: application
platform: iOS
sources:
- path: AlphaWallet
excludes:
- Browser/ViewModel/Dapps.swift
- path: AlphaWalletSafariExtension
includes:
- Resources/config.js
- Resources/helpers.js
scheme:
configVariants:
dependencies:
- package: Inject
- package: WalletConnect
products:
- WalletConnectAuth
- WalletConnectChat
- WalletConnectEcho
- WalletConnectNetworking
- WalletConnectPairing
- WalletConnectPush
- WalletConnectRouter
- WalletConnectVerify
- Web3Inbox
- Web3Wallet
- target: AlphaWalletShare
- target: AlphaWalletSafariExtension
settings:
base:
PRODUCT_BUNDLE_IDENTIFIER: com.stormbird.alphawallet
PRODUCT_NAME: AlphaWallet
CODE_SIGN_ENTITLEMENTS: AlphaWallet/AlphaWallet.entitlements
configs:
debug:
OTHER_LDFLAGS: "-Xlinker -interposable"
info:
path: AlphaWallet/Info.plist
properties:
CFBundleDisplayName: AlphaWallet
FirebaseAppDelegateProxyEnabled: false
CFBundleDocumentTypes:
- CFBundleTypeName: TokenScript
LSHandlerRank: Default
LSItemContentTypes:
- public.text
- CFBundleTypeName: TokenScript
LSHandlerRank: Default
LSItemContentTypes:
- com.stormbird.alphawallet.tsml
CFBundleURLTypes:
- CFBundleTypeRole: Editor
CFBundleURLSchemes:
- awallet
- CFBundleTypeRole: Ethereum Links
CFBundleURLSchemes:
- ethereum
- CFBundleTypeRole: WalletConnect Links
CFBundleURLName:
CFBundleURLSchemes:
- wc
ITSAppUsesNonExemptEncryption: false
LSApplicationQueriesSchemes:
- tg
- fb
- twitter
- org-appextension-feature-password-management
LSRequiresIPhoneOS: true
LSSupportsOpeningDocumentsInPlace: true
NSAppTransportSecurity:
NSAllowsArbitraryLoads: true
NSCameraUsageDescription: $(PRODUCT_NAME) uses the camera to scan QR codes
NSFaceIDUsageDescription: Access your wallet
NSLocationWhenInUseUsageDescription: Location data may be accessed when you are using the in-app browser and tap on a link to retrieve your current location
NSMicrophoneUsageDescription: $(PRODUCT_NAME) might capture audio if a website needs to perform KYC (with your permission)
NSPhotoLibraryAddUsageDescription: Sending QR Code to your contacts
NSPhotoLibraryUsageDescription: Sending QR Code to your contacts
NSUserActivityTypes:
- com.alphawallet.ethereum-wallet-qr-code
- com.alphawallet.camera
UIAppFonts:
- SourceSansPro-Black.otf
- SourceSansPro-Italic.ttf
- SourceSansPro-BlackIt.otf
- SourceSansPro-Bold.otf
- SourceSansPro-BoldIt.otf
- SourceSansPro-ExtraLight.otf
- SourceSansPro-ExtraLightIt.otf
- SourceSansPro-It.otf
- SourceSansPro-Light.otf
- SourceSansPro-LightIt.otf
- SourceSansPro-Regular.otf
- SourceSansPro-Semibold.otf
- SourceSansPro-SemiboldIt.otf
UIApplicationShortcutItems:
- UIApplicationShortcutItemIconFile: qr_code_icon
UIApplicationShortcutItemTitle: Scan QR Code
UIApplicationShortcutItemType: $(PRODUCT_BUNDLE_IDENTIFIER).qrScanner
UIBackgroundModes:
- remote-notification
UILaunchStoryboardName: LaunchScreen
UIRequiredDeviceCapabilities:
- armv7
UIStatusBarHidden: true
UIStatusBarStyle: UIStatusBarStyleDefault
UIStatusBarTintParameters:
UINavigationBar:
Style: UIBarStyleDefault
Translucent: false
UISupportedInterfaceOrientations:
- UIInterfaceOrientationPortrait
- UIInterfaceOrientationPortraitUpsideDown
UISupportedInterfaceOrientations~ipad:
- UIInterfaceOrientationPortrait
- UIInterfaceOrientationPortraitUpsideDown
- UIInterfaceOrientationLandscapeLeft
- UIInterfaceOrientationLandscapeRight
UIUserInterfaceStyle: Automatic
UTExportedTypeDeclarations:
- UTTypeConformsTo:
- public.xml
UTTypeDescription: TokenScript file
UTTypeIdentifier: com.stormbird.alphawallet.tsml
UTTypeTagSpecification:
public.filename-extension: tsml
public.mime-type: text/xml
com.apple.security.get-task-allow: true
CFBundleVersion: $(CURRENT_PROJECT_VERSION)
CFBundleShortVersionString: $(MARKETING_VERSION)
entitlements:
path: AlphaWallet/AlphaWallet.entitlements
properties:
aps-environment: development
com.apple.developer.associated-domains:
- applinks:app.awallet.io
- applinks:aw.app
- applinks:classic.aw.app
- applinks:callisto.aw.app
- applinks:kovan.aw.app
- applinks:ropsten.aw.app
- applinks:rinkeby.aw.app
- applinks:poa.aw.app
- applinks:sokol.aw.app
- applinks:xdai.aw.app
- applinks:custom.aw.app
- applinks:goerli.aw.app
- applinks:binance.aw.app
- applinks:test-binance.aw.app
- applinks:www.smartlayer.network
- applinks:smartlayer.network
- applinks:smart-layer.vercel.app
com.apple.developer.default-data-protection: NSFileProtectionComplete
com.apple.security.application-groups:
- group.com.stormbird.alphawallet
preBuildScripts:
- name: "[xcodegen] Check project.yml in-sync"
script: |
diff project.yml ".project-last.yml" > /dev/null
if [ $? != 0 ] ; then
# print error to STDERR
echo "error: project.yml has been modified. Run 'just xcodegen'." >&2
exit 1
fi
basedOnDependencyAnalysis: false
showEnvVars: false
- name: "[CP] Check Pods Manifest.lock"
script: |
diff "${PODS_PODFILE_DIR_PATH}/Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null
if [ $? != 0 ] ; then
# print error to STDERR
echo "error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation." >&2
exit 1
fi
# This output is used by Xcode 'outputs' to avoid re-running this script phase.
echo "SUCCESS" > "${SCRIPT_OUTPUT_FILE_0}"
basedOnDependencyAnalysis: false
showEnvVars: false
- name: Apollo
script: |
# Don't run this during index builds
if [ $ACTION = "indexbuild" ]; then exit 0; fi
SCRIPT_PATH="${PODS_ROOT}/Apollo/scripts"
SCHEMA_PATH="${SRCROOT}/modules/AlphaWalletFoundation/AlphaWalletFoundation/NFT/Enjin"
cd "${SCHEMA_PATH}"
"${SCRIPT_PATH}"/run-bundled-codegen.sh codegen:generate --target=swift --includes=./**/*.graphql --localSchemaFile="${SCHEMA_PATH}/schema.json" API.swift
#Download graphql scheme
#"${SCRIPT_PATH}"/run-bundled-codegen.sh schema:download --endpoint="https://cloud.enjin.io/graphql/default" API.swift
basedOnDependencyAnalysis: false
showEnvVars: false
- name: Check correct credentials used for API keys
script: |
FILE=modules/AlphaWalletFoundation/AlphaWalletFoundation/Settings/Types/Constants+Credentials.swift
if test -f "$FILE"; then
#echo "Found: $FILE"
echo ""
else
echo "Not found credentials file. Could be due to a refactoring and we forgot to update this Run Script Phase: $FILE"
exit 1
fi
if [ "${CONFIGURATION}" = "Release" ]; then
if [ "${PRODUCT_BUNDLE_IDENTIFIER}" = "com.stormbird.alphawallet" ]; then
if grep -q 'static let infuraKey = "3f22' "$FILE"; then
echo ""
else
echo "Expecting production infuraKey. Check credentials"
exit 1
fi
#We use `ag` because grep is much slower. Since this only runs on the Release configuration, this is not a problem for day to day development
if /opt/homebrew/bin/ag --silent 'static let analyticsKey = ""' --ignore project.yml; then
echo "Found development analytics key (which is empty). Check credentials. Probably just need to remove the extension entirely"
exit 1
else
echo ""
fi
fi
fi
basedOnDependencyAnalysis: false
showEnvVars: false
- name: Check correct GoogleService-Info.plist (for Crashlytics)
script: |
if [ "${CONFIGURATION}" = "Release" ]; then
if [ "${PRODUCT_BUNDLE_IDENTIFIER}" = "com.stormbird.alphawallet" ]; then
if grep -q '598539835570' "AlphaWallet/GoogleService-Info.plist"; then
exit 0
else
echo "Make sure GoogleService-Info.plist is for production builds"
exit 1
fi
fi
fi
basedOnDependencyAnalysis: false
showEnvVars: false
- name: R.Swift
script: '"$PODS_ROOT/R.swift/rswift" generate --disable-input-output-files-validation "$SRCROOT/AlphaWallet/R.generated.swift"'
basedOnDependencyAnalysis: false
showEnvVars: false
- name: Swift Format
script: |
if [ "${CONFIGURATION}" = "Debug" ]; then
files_list = ""
while read F; do
files_list+="${F} "
done < $SCRIPT_INPUT_FILE_LIST_0
"${PODS_ROOT}/SwiftFormat/CommandLineTool/swiftformat" $files_list
fi
basedOnDependencyAnalysis: false
showEnvVars: false
postBuildScripts:
- name: Run SwiftLint
script: |
if [ "${CONFIGURATION}" = "Debug" ]; then
"${PODS_ROOT}/SwiftLint/swiftlint"
fi
basedOnDependencyAnalysis: false
showEnvVars: false
- name: Upload debug symbols to Crashlytics
script: |
if [ "${CONFIGURATION}" != "Debug" ]; then
"${PODS_ROOT}/FirebaseCrashlytics/run"
fi
basedOnDependencyAnalysis: false
showEnvVars: false
AlphaWalletShare:
type: app-extension
platform: iOS
sources:
- path: AlphaWalletShare
settings:
base:
PRODUCT_BUNDLE_IDENTIFIER: com.stormbird.alphawallet.AlphaWalletShare
PRODUCT_NAME: AlphaWalletShare
CODE_SIGN_ENTITLEMENTS: AlphaWalletShare/AlphaWalletShare.entitlements
SKIP_INSTALL: YES
info:
path: AlphaWalletShare/Info.plist
properties:
CFBundleDevelopmentRegion: en
CFBundleDisplayName: AlphaWallet
NSExtension:
NSExtensionAttributes:
IntentsSupported:
- Intent
NSExtensionActivationRule:
NSExtensionServiceRoleType: NSExtensionServiceRoleTypeViewer
NSExtensionActivationSupportsText: false
NSExtensionActivationSupportsWebPageWithMaxCount: 1
NSExtensionActivationSupportsWebURLWithMaxCount: 1
NSExtensionActivationDictionaryVersion: 2
NSExtensionPointIdentifier: com.apple.share-services
NSExtensionPrincipalClass: ShareContextHandler
NSExtensionActionWantsFullScreenPresentation: false
CFBundleVersion: $(CURRENT_PROJECT_VERSION)
CFBundleShortVersionString: $(MARKETING_VERSION)
entitlements:
path: AlphaWalletShare/AlphaWalletShare.entitlements
properties:
com.apple.security.application-groups:
- group.com.stormbird.alphawallet
AlphaWalletSafariExtension:
type: app-extension
platform: iOS
sources:
- path: AlphaWalletSafariExtension
excludes:
- Resources
- path: AlphaWalletSafariExtension
includes:
- Resources/*.js
- Resources/*.html
- Resources/*.css
- Resources/manifest.json
- path: AlphaWalletSafariExtension/Resources/_locales
#Keeps the folder in the build output. See it in the Copy Bundle Resources phase in Xcode
type: folder
#Keeps the folder at the right place, instead of at the project root. See it in the Project Navigator in Xcode
createIntermediateGroups: true
- path: AlphaWalletSafariExtension/Resources/images
type: folder
createIntermediateGroups: true
settings:
base:
PRODUCT_BUNDLE_IDENTIFIER: com.stormbird.alphawallet.AlphaWalletSafariExtension
PRODUCT_NAME: AlphaWalletSafariExtension
CODE_SIGN_ENTITLEMENTS: AlphaWalletSafariExtension/AlphaWalletSafariExtension.entitlements
SKIP_INSTALL: YES
info:
path: AlphaWalletSafariExtension/Info.plist
properties:
CFBundleDevelopmentRegion: en
CFBundleDisplayName: AlphaWallet
NSExtension:
NSExtensionPointIdentifier: com.apple.Safari.web-extension
NSExtensionPrincipalClass: $(PRODUCT_MODULE_NAME).SafariWebExtensionHandler
CFBundleVersion: $(CURRENT_PROJECT_VERSION)
CFBundleShortVersionString: $(MARKETING_VERSION)
entitlements:
path: AlphaWalletSafariExtension/AlphaWalletSafariExtension.entitlements
properties:
com.apple.security.application-groups:
- group.com.stormbird.alphawallet
AlphaWalletTests:
type: bundle.unit-test
platform: iOS
sources: [AlphaWalletTests]
scheme:
configVariants:
dependencies:
- target: AlphaWallet
settings:
base:
PRODUCT_BUNDLE_IDENTIFIER: com.stormbird.AlphaWalletTests
PRODUCT_NAME: AlphaWalletTests
info:
path: AlphaWalletTests/Info.plist
properties:
CFBundleVersion: $(CURRENT_PROJECT_VERSION)
CFBundleShortVersionString: $(MARKETING_VERSION)
packages:
Inject:
url: https://github.com/krzysztofzablocki/Inject
from: 1.3.0
WalletConnect:
url: https://github.com/WalletConnect/WalletConnectSwiftV2
exactVersion: 1.6.8