react-native-nami-sdk 3.0.12 → 3.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/CI.yaml +3 -571
- package/.github/workflows/app_prod.yaml +28 -7
- package/.github/workflows/app_stg.yaml +22 -1
- package/android/build.gradle +4 -2
- package/android/src/main/java/com/nami/reactlibrary/NamiBridgeModule.kt +15 -1
- package/ios/Nami.m +7 -2
- package/package.json +1 -1
- package/react-native-nami-sdk.podspec +1 -1
- package/src/Nami.d.ts +1 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
name: CI
|
|
1
|
+
name: CI PR Checks
|
|
2
2
|
|
|
3
3
|
on: pull_request
|
|
4
4
|
|
|
@@ -26,7 +26,7 @@ jobs:
|
|
|
26
26
|
yarn install
|
|
27
27
|
working-directory: source/examples/Basic
|
|
28
28
|
|
|
29
|
-
- name:
|
|
29
|
+
- name: Linter Basic
|
|
30
30
|
run: |
|
|
31
31
|
npx eslint . --ext .js,.jsx,.ts,.tsx
|
|
32
32
|
working-directory: source/examples/Basic
|
|
@@ -36,575 +36,7 @@ jobs:
|
|
|
36
36
|
yarn install
|
|
37
37
|
working-directory: source/examples/TestNamiTV
|
|
38
38
|
|
|
39
|
-
- name:
|
|
39
|
+
- name: Linter TestNamiTV
|
|
40
40
|
run: |
|
|
41
41
|
npx eslint . --ext .js,.jsx,.ts,.tsx
|
|
42
42
|
working-directory: source/examples/TestNamiTV
|
|
43
|
-
build-android-stg:
|
|
44
|
-
name: Build Play Store STG
|
|
45
|
-
permissions:
|
|
46
|
-
actions: write
|
|
47
|
-
contents: write
|
|
48
|
-
id-token: write
|
|
49
|
-
runs-on: ubuntu-latest
|
|
50
|
-
steps:
|
|
51
|
-
- uses: actions/setup-node@v3
|
|
52
|
-
with:
|
|
53
|
-
node-version: "16"
|
|
54
|
-
|
|
55
|
-
- name: 'Checkout ${{ inputs.ref }}'
|
|
56
|
-
uses: actions/checkout@v2
|
|
57
|
-
with:
|
|
58
|
-
path: source
|
|
59
|
-
ref: '${{ inputs.ref }}'
|
|
60
|
-
|
|
61
|
-
- name: Install Google API python client
|
|
62
|
-
run: |
|
|
63
|
-
pip install google-api-python-client
|
|
64
|
-
|
|
65
|
-
- name: Get new version code
|
|
66
|
-
run: |
|
|
67
|
-
echo $GOOGLE_PLAY_SERVICE_ACCOUNT > $RUNNER_TEMP/.service_account
|
|
68
|
-
python3 build-utils/get_version_code.py $RUNNER_TEMP/.service_account com.namiml.stg.testreactnative internal --quiet >> $RUNNER_TEMP/.new_version_code
|
|
69
|
-
rm -f .service_account
|
|
70
|
-
env:
|
|
71
|
-
GOOGLE_PLAY_SERVICE_ACCOUNT: '${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT }}'
|
|
72
|
-
working-directory: source
|
|
73
|
-
|
|
74
|
-
- name: Update version code
|
|
75
|
-
working-directory: source/examples/Basic/android/app
|
|
76
|
-
run: |
|
|
77
|
-
NEW_VERSION_CODE=`cat $RUNNER_TEMP/.new_version_code`
|
|
78
|
-
echo $NEW_VERSION_CODE
|
|
79
|
-
sed -i "s/versionCode 1/versionCode $NEW_VERSION_CODE/" build.gradle
|
|
80
|
-
|
|
81
|
-
- name: Create the Keystore
|
|
82
|
-
run: |
|
|
83
|
-
# import keystore from secrets
|
|
84
|
-
echo $KEYSTORE_BASE64 | base64 -d > $RUNNER_TEMP/my_production.keystore
|
|
85
|
-
env:
|
|
86
|
-
KEYSTORE_BASE64: '${{ secrets.KEY_STORE_BASE64 }}'
|
|
87
|
-
|
|
88
|
-
- name: Install test app dependencies
|
|
89
|
-
run: |
|
|
90
|
-
yarn install
|
|
91
|
-
working-directory: source/examples/Basic
|
|
92
|
-
|
|
93
|
-
- name: Build Android App Bundle
|
|
94
|
-
run: |
|
|
95
|
-
./gradlew clean bundleStagingRelease
|
|
96
|
-
working-directory: source/examples/Basic/android
|
|
97
|
-
|
|
98
|
-
- name: Sign Android App Bundle
|
|
99
|
-
run: |
|
|
100
|
-
jarsigner -keystore $RUNNER_TEMP/my_production.keystore -storepass '${{ secrets.KEY_STORE_PASSWORD }}' -keypass '${{ secrets.KEY_PASSWORD }}' -sigalg SHA256withRSA -digestalg SHA-256 -signedjar build/outputs/bundle/stagingRelease/app-staging-release-signed.aab build/outputs/bundle/stagingRelease/app-staging-release.aab '${{ secrets.KEY_ALIAS }}'
|
|
101
|
-
working-directory: source/examples/Basic/android/app
|
|
102
|
-
|
|
103
|
-
- name: Uploading to test track
|
|
104
|
-
uses: r0adkll/upload-google-play@v1.0.17
|
|
105
|
-
with:
|
|
106
|
-
packageName: 'com.namiml.stg.testreactnative'
|
|
107
|
-
releaseFiles: source/examples/Basic/android/app/build/outputs/bundle/stagingRelease/app-staging-release-signed.aab
|
|
108
|
-
serviceAccountJsonPlainText: '${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT }}'
|
|
109
|
-
status: completed
|
|
110
|
-
track: internal
|
|
111
|
-
build-ios-stg:
|
|
112
|
-
name: Build TestNami iOS STG
|
|
113
|
-
permissions:
|
|
114
|
-
actions: write
|
|
115
|
-
contents: write
|
|
116
|
-
id-token: write
|
|
117
|
-
runs-on: macos-12
|
|
118
|
-
timeout-minutes: 40
|
|
119
|
-
steps:
|
|
120
|
-
- uses: actions/setup-node@v3
|
|
121
|
-
with:
|
|
122
|
-
node-version: "16"
|
|
123
|
-
|
|
124
|
-
- name: "Checkout ${{ inputs.ref }}"
|
|
125
|
-
uses: actions/checkout@v2
|
|
126
|
-
with:
|
|
127
|
-
path: source
|
|
128
|
-
ref: "${{ inputs.ref }}"
|
|
129
|
-
|
|
130
|
-
- name: Checkout appstoreconnect-build-tools
|
|
131
|
-
uses: actions/checkout@v2
|
|
132
|
-
with:
|
|
133
|
-
path: appstoreconnect-build-tools
|
|
134
|
-
ref: main
|
|
135
|
-
repository: namiml/appstoreconnect-build-tools
|
|
136
|
-
|
|
137
|
-
- name: Set up Python
|
|
138
|
-
uses: actions/setup-python@v1
|
|
139
|
-
with:
|
|
140
|
-
python-version: "3.10"
|
|
141
|
-
|
|
142
|
-
- name: Get expected build number
|
|
143
|
-
run: |
|
|
144
|
-
pip3 install requests
|
|
145
|
-
pip3 install pydantic
|
|
146
|
-
pip3 install cryptography
|
|
147
|
-
pip3 install PyJWT
|
|
148
|
-
echo "1.0" > $RUNNER_TEMP/.current_version
|
|
149
|
-
export CURRENT_VERSION=`cat $RUNNER_TEMP/.current_version`
|
|
150
|
-
python3 get_next_build.py com.namiml.stg.testreactnative --prerelease --version=$CURRENT_VERSION --platform=IOS > $RUNNER_TEMP/.next_build_number
|
|
151
|
-
working-directory: appstoreconnect-build-tools
|
|
152
|
-
env:
|
|
153
|
-
APPSTORE_API_KEY_ID: "${{ secrets.APPSTORE_API_KEY_ID }}"
|
|
154
|
-
APPSTORE_API_PRIVATE_KEY: "${{ secrets.APPSTORE_API_PRIVATE_KEY }}"
|
|
155
|
-
APPSTORE_ISSUER_ID: "${{ secrets.APPSTORE_ISSUER_ID }}"
|
|
156
|
-
|
|
157
|
-
- name: Install Apple Certificate
|
|
158
|
-
uses: apple-actions/import-codesign-certs@v1
|
|
159
|
-
with:
|
|
160
|
-
p12-file-base64: "${{ secrets.IOS_P12_BASE64 }}"
|
|
161
|
-
p12-password: "${{ secrets.IOS_CERTIFICATE_PASSWORD }}"
|
|
162
|
-
|
|
163
|
-
- name: Install the provisioning profile
|
|
164
|
-
run: |
|
|
165
|
-
PP_PATH=$RUNNER_TEMP/build_pp.mobileprovision
|
|
166
|
-
echo -n "$PROVISIONING_CERTIFICATE_BASE64" | base64 --decode --output $PP_PATH
|
|
167
|
-
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
|
|
168
|
-
cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles
|
|
169
|
-
env:
|
|
170
|
-
PROVISIONING_CERTIFICATE_BASE64: "${{ secrets.IOS_MOBILE_PROVISION_BASE64_TEST_REACT_STG }}"
|
|
171
|
-
|
|
172
|
-
- name: Store App Store Private Key
|
|
173
|
-
run: |
|
|
174
|
-
mkdir ~/.private_keys
|
|
175
|
-
echo '${{ secrets.APPSTORE_API_PRIVATE_KEY }}' > ~/.private_keys/AuthKey_'${{ secrets.APPSTORE_API_KEY_ID }}'.p8
|
|
176
|
-
|
|
177
|
-
- name: Update ExportOptions.plist
|
|
178
|
-
run: |
|
|
179
|
-
sed -i '' -e "s/APPSTORE_TEAM_ID/${{ secrets.APPSTORE_TEAM_ID }}/" ExportOptions.plist
|
|
180
|
-
sed -i '' -e "s/APPSTORE_PROVISIONING_PROFILE_UUID/${{ secrets.APPSTORE_PROV_PROFILE_UUID_TEST_REACT_STG }}/g" ExportOptions.plist
|
|
181
|
-
working-directory: source/examples/Basic/ios
|
|
182
|
-
|
|
183
|
-
- name: Adjust version & build number
|
|
184
|
-
run: |-
|
|
185
|
-
export CURRENT_VERSION=`cat $RUNNER_TEMP/.current_version`
|
|
186
|
-
export BUILD_NUMBER=`cat $RUNNER_TEMP/.next_build_number`
|
|
187
|
-
sed -i '' -e "s/CURRENT_PROJECT_VERSION = 1/CURRENT_PROJECT_VERSION = $BUILD_NUMBER/" ios/Basic.xcodeproj/project.pbxproj
|
|
188
|
-
sed -i '' -e "s/MARKETING_VERSION = 1.0/MARKETING_VERSION = $CURRENT_VERSION/" ios/Basic.xcodeproj/project.pbxproj
|
|
189
|
-
sed -i '' -e "s/<string>1<\/string>/<string>$BUILD_NUMBER<\/string>/" ios/Basic/Info.plist
|
|
190
|
-
working-directory: source/examples/Basic
|
|
191
|
-
|
|
192
|
-
- name: Install test app dependencies
|
|
193
|
-
run: |
|
|
194
|
-
yarn install
|
|
195
|
-
working-directory: source/examples/Basic
|
|
196
|
-
|
|
197
|
-
- name: Install test iOS dependencies
|
|
198
|
-
run: |
|
|
199
|
-
pod install
|
|
200
|
-
working-directory: source/examples/Basic/ios
|
|
201
|
-
|
|
202
|
-
- name: Build resolve Swift dependencies
|
|
203
|
-
run: |
|
|
204
|
-
xcodebuild -resolvePackageDependencies -workspace ios/Basic.xcworkspace -scheme Basic -configuration Release
|
|
205
|
-
working-directory: source/examples/Basic
|
|
206
|
-
|
|
207
|
-
- name: Build xArchive
|
|
208
|
-
run: |
|
|
209
|
-
xcodebuild -workspace ios/Basic.xcworkspace -scheme Basic -configuration Release DEVELOPMENT_TEAM='${{ secrets.APPSTORE_TEAM_ID }}' -sdk 'iphoneos' -destination 'generic/platform=iOS' -archivePath build-output/app-stg.xcarchive PROVISIONING_PROFILE='${{ secrets.APPSTORE_PROV_PROFILE_UUID_TEST_REACT_STG }}' clean archive CODE_SIGN_IDENTITY='${{ secrets.CODE_SIGNING_IDENTITY }}'
|
|
210
|
-
working-directory: source/examples/Basic
|
|
211
|
-
|
|
212
|
-
- name: Export IPA
|
|
213
|
-
run: |
|
|
214
|
-
xcodebuild -exportArchive -archivePath build-output/app-stg.xcarchive -exportPath build-output/ios-stg -exportOptionsPlist ios/ExportOptions.plist
|
|
215
|
-
working-directory: source/examples/Basic
|
|
216
|
-
|
|
217
|
-
- name: Upload app to TestFlight
|
|
218
|
-
run: |
|
|
219
|
-
xcrun altool --upload-app --type ios --file build-output/ios-stg/Basic.ipa --apiKey $APPSTORE_API_KEY_ID --apiIssuer $APPSTORE_ISSUER_ID
|
|
220
|
-
working-directory: source/examples/Basic
|
|
221
|
-
env:
|
|
222
|
-
APPSTORE_API_KEY_ID: "${{ secrets.APPSTORE_API_KEY_ID }}"
|
|
223
|
-
APPSTORE_ISSUER_ID: "${{ secrets.APPSTORE_ISSUER_ID }}"
|
|
224
|
-
build-ios-prod:
|
|
225
|
-
name: Build TestNami iOS PROD
|
|
226
|
-
permissions:
|
|
227
|
-
actions: write
|
|
228
|
-
contents: write
|
|
229
|
-
id-token: write
|
|
230
|
-
runs-on: macos-12
|
|
231
|
-
timeout-minutes: 40
|
|
232
|
-
steps:
|
|
233
|
-
- uses: actions/setup-node@v3
|
|
234
|
-
with:
|
|
235
|
-
node-version: "16"
|
|
236
|
-
|
|
237
|
-
- name: "Checkout ${{ inputs.ref }}"
|
|
238
|
-
uses: actions/checkout@v2
|
|
239
|
-
with:
|
|
240
|
-
path: source
|
|
241
|
-
ref: "${{ inputs.ref }}"
|
|
242
|
-
|
|
243
|
-
- name: Checkout appstoreconnect-build-tools
|
|
244
|
-
uses: actions/checkout@v2
|
|
245
|
-
with:
|
|
246
|
-
path: appstoreconnect-build-tools
|
|
247
|
-
ref: main
|
|
248
|
-
repository: namiml/appstoreconnect-build-tools
|
|
249
|
-
|
|
250
|
-
- name: Set up Python
|
|
251
|
-
uses: actions/setup-python@v1
|
|
252
|
-
with:
|
|
253
|
-
python-version: "3.10"
|
|
254
|
-
|
|
255
|
-
- name: Get expected build number
|
|
256
|
-
run: |
|
|
257
|
-
pip3 install requests
|
|
258
|
-
pip3 install pydantic
|
|
259
|
-
pip3 install cryptography
|
|
260
|
-
pip3 install PyJWT
|
|
261
|
-
echo "1.0" > $RUNNER_TEMP/.current_version
|
|
262
|
-
export CURRENT_VERSION=`cat $RUNNER_TEMP/.current_version`
|
|
263
|
-
python3 get_next_build.py com.namiml.app.testreactnative --prerelease --version=$CURRENT_VERSION --platform=IOS > $RUNNER_TEMP/.next_build_number
|
|
264
|
-
working-directory: appstoreconnect-build-tools
|
|
265
|
-
env:
|
|
266
|
-
APPSTORE_API_KEY_ID: "${{ secrets.APPSTORE_API_KEY_ID }}"
|
|
267
|
-
APPSTORE_API_PRIVATE_KEY: "${{ secrets.APPSTORE_API_PRIVATE_KEY }}"
|
|
268
|
-
APPSTORE_ISSUER_ID: "${{ secrets.APPSTORE_ISSUER_ID }}"
|
|
269
|
-
|
|
270
|
-
- name: Install Apple Certificate
|
|
271
|
-
uses: apple-actions/import-codesign-certs@v1
|
|
272
|
-
with:
|
|
273
|
-
p12-file-base64: "${{ secrets.IOS_P12_BASE64 }}"
|
|
274
|
-
p12-password: "${{ secrets.IOS_CERTIFICATE_PASSWORD }}"
|
|
275
|
-
|
|
276
|
-
- name: Install the provisioning profile
|
|
277
|
-
run: |
|
|
278
|
-
PP_PATH=$RUNNER_TEMP/build_pp.mobileprovision
|
|
279
|
-
echo -n "$PROVISIONING_CERTIFICATE_BASE64" | base64 --decode --output $PP_PATH
|
|
280
|
-
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
|
|
281
|
-
cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles
|
|
282
|
-
env:
|
|
283
|
-
PROVISIONING_CERTIFICATE_BASE64: "${{ secrets.IOS_MOBILE_PROVISION_BASE64_TEST_REACT_PROD }}"
|
|
284
|
-
|
|
285
|
-
- name: Store App Store Private Key
|
|
286
|
-
run: |
|
|
287
|
-
mkdir ~/.private_keys
|
|
288
|
-
echo '${{ secrets.APPSTORE_API_PRIVATE_KEY }}' > ~/.private_keys/AuthKey_'${{ secrets.APPSTORE_API_KEY_ID }}'.p8
|
|
289
|
-
|
|
290
|
-
- name: Update ExportOptions.plist
|
|
291
|
-
run: |
|
|
292
|
-
sed -i '' -e "s/APPSTORE_TEAM_ID/${{ secrets.APPSTORE_TEAM_ID }}/" ExportOptions.plist
|
|
293
|
-
sed -i '' -e "s/APPSTORE_PROVISIONING_PROFILE_UUID/${{ secrets.APPSTORE_PROV_PROFILE_UUID_TEST_REACT_PROD }}/g" ExportOptions.plist
|
|
294
|
-
working-directory: source/examples/Basic/ios
|
|
295
|
-
|
|
296
|
-
- name: Adjust version & build number
|
|
297
|
-
run: |-
|
|
298
|
-
export CURRENT_VERSION=`cat $RUNNER_TEMP/.current_version`
|
|
299
|
-
export BUILD_NUMBER=`cat $RUNNER_TEMP/.next_build_number`
|
|
300
|
-
sed -i '' -e "s/CURRENT_PROJECT_VERSION = 1/CURRENT_PROJECT_VERSION = $BUILD_NUMBER/" ios/Basic.xcodeproj/project.pbxproj
|
|
301
|
-
sed -i '' -e "s/MARKETING_VERSION = 1.0/MARKETING_VERSION = $CURRENT_VERSION/" ios/Basic.xcodeproj/project.pbxproj
|
|
302
|
-
sed -i '' -e "s/<string>1<\/string>/<string>$BUILD_NUMBER<\/string>/" ios/BasicProductionInfo.plist
|
|
303
|
-
working-directory: source/examples/Basic
|
|
304
|
-
|
|
305
|
-
- name: Install test app dependencies
|
|
306
|
-
run: |
|
|
307
|
-
yarn install
|
|
308
|
-
working-directory: source/examples/Basic
|
|
309
|
-
|
|
310
|
-
- name: Install test iOS dependencies
|
|
311
|
-
run: |
|
|
312
|
-
pod install
|
|
313
|
-
working-directory: source/examples/Basic/ios
|
|
314
|
-
|
|
315
|
-
- name: Build resolve Swift dependencies
|
|
316
|
-
run: |
|
|
317
|
-
xcodebuild -resolvePackageDependencies -workspace ios/Basic.xcworkspace -scheme BasicProduction -configuration Release
|
|
318
|
-
working-directory: source/examples/Basic
|
|
319
|
-
|
|
320
|
-
- name: Build xArchive
|
|
321
|
-
run: |
|
|
322
|
-
xcodebuild -workspace ios/Basic.xcworkspace -scheme BasicProduction -configuration Release DEVELOPMENT_TEAM='${{ secrets.APPSTORE_TEAM_ID }}' -sdk 'iphoneos' -destination 'generic/platform=iOS' -archivePath build-output/app-prod.xcarchive PROVISIONING_PROFILE='${{ secrets.APPSTORE_PROV_PROFILE_UUID_TEST_REACT_PROD }}' clean archive CODE_SIGN_IDENTITY='${{ secrets.CODE_SIGNING_IDENTITY }}'
|
|
323
|
-
working-directory: source/examples/Basic
|
|
324
|
-
|
|
325
|
-
- name: Export IPA
|
|
326
|
-
run: |
|
|
327
|
-
xcodebuild -exportArchive -archivePath build-output/app-prod.xcarchive -exportPath build-output/ios-prod -exportOptionsPlist ios/ExportOptions.plist
|
|
328
|
-
working-directory: source/examples/Basic
|
|
329
|
-
|
|
330
|
-
- name: Upload app to TestFlight
|
|
331
|
-
run: |
|
|
332
|
-
xcrun altool --upload-app --type ios --file build-output/ios-prod/BasicProduction.ipa --apiKey $APPSTORE_API_KEY_ID --apiIssuer $APPSTORE_ISSUER_ID
|
|
333
|
-
working-directory: source/examples/Basic
|
|
334
|
-
env:
|
|
335
|
-
APPSTORE_API_KEY_ID: "${{ secrets.APPSTORE_API_KEY_ID }}"
|
|
336
|
-
APPSTORE_ISSUER_ID: "${{ secrets.APPSTORE_ISSUER_ID }}"
|
|
337
|
-
build-tvos-stg:
|
|
338
|
-
name: Build TestNamiTV tvOS STG
|
|
339
|
-
permissions:
|
|
340
|
-
actions: write
|
|
341
|
-
contents: write
|
|
342
|
-
id-token: write
|
|
343
|
-
runs-on: macos-12
|
|
344
|
-
timeout-minutes: 40
|
|
345
|
-
steps:
|
|
346
|
-
- uses: actions/setup-node@v3
|
|
347
|
-
with:
|
|
348
|
-
node-version: "16"
|
|
349
|
-
|
|
350
|
-
- name: "Checkout ${{ inputs.ref }}"
|
|
351
|
-
uses: actions/checkout@v2
|
|
352
|
-
with:
|
|
353
|
-
path: source
|
|
354
|
-
ref: "${{ inputs.ref }}"
|
|
355
|
-
|
|
356
|
-
- name: Checkout appstoreconnect-build-tools
|
|
357
|
-
uses: actions/checkout@v2
|
|
358
|
-
with:
|
|
359
|
-
path: appstoreconnect-build-tools
|
|
360
|
-
ref: main
|
|
361
|
-
repository: namiml/appstoreconnect-build-tools
|
|
362
|
-
|
|
363
|
-
- name: Set up Python
|
|
364
|
-
uses: actions/setup-python@v1
|
|
365
|
-
with:
|
|
366
|
-
python-version: "3.10"
|
|
367
|
-
|
|
368
|
-
- name: Get expected build number
|
|
369
|
-
run: |
|
|
370
|
-
pip3 install requests
|
|
371
|
-
pip3 install pydantic
|
|
372
|
-
pip3 install cryptography
|
|
373
|
-
pip3 install PyJWT
|
|
374
|
-
echo "1.0" > $RUNNER_TEMP/.current_version
|
|
375
|
-
export CURRENT_VERSION=`cat $RUNNER_TEMP/.current_version`
|
|
376
|
-
python3 get_next_build.py com.namiml.stg.testreactnative --prerelease --platform=TV_OS > $RUNNER_TEMP/.next_build_number
|
|
377
|
-
working-directory: appstoreconnect-build-tools
|
|
378
|
-
env:
|
|
379
|
-
APPSTORE_API_KEY_ID: "${{ secrets.APPSTORE_API_KEY_ID }}"
|
|
380
|
-
APPSTORE_API_PRIVATE_KEY: "${{ secrets.APPSTORE_API_PRIVATE_KEY }}"
|
|
381
|
-
APPSTORE_ISSUER_ID: "${{ secrets.APPSTORE_ISSUER_ID }}"
|
|
382
|
-
|
|
383
|
-
- name: Install Apple Certificate
|
|
384
|
-
uses: apple-actions/import-codesign-certs@v1
|
|
385
|
-
with:
|
|
386
|
-
p12-file-base64: "${{ secrets.IOS_P12_BASE64 }}"
|
|
387
|
-
p12-password: "${{ secrets.IOS_CERTIFICATE_PASSWORD }}"
|
|
388
|
-
|
|
389
|
-
- name: Install the provisioning profile
|
|
390
|
-
run: |
|
|
391
|
-
PP_PATH=$RUNNER_TEMP/build_pp.mobileprovision
|
|
392
|
-
echo -n "$PROVISIONING_CERTIFICATE_BASE64" | base64 --decode --output $PP_PATH
|
|
393
|
-
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
|
|
394
|
-
cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles
|
|
395
|
-
env:
|
|
396
|
-
PROVISIONING_CERTIFICATE_BASE64: "${{ secrets.IOS_MOBILE_PROVISION_BASE64_TEST_REACT_TVOS_STG }}"
|
|
397
|
-
|
|
398
|
-
- name: Store App Store Private Key
|
|
399
|
-
run: |
|
|
400
|
-
mkdir ~/.private_keys
|
|
401
|
-
echo '${{ secrets.APPSTORE_API_PRIVATE_KEY }}' > ~/.private_keys/AuthKey_'${{ secrets.APPSTORE_API_KEY_ID }}'.p8
|
|
402
|
-
|
|
403
|
-
- name: Update ExportOptions.plist
|
|
404
|
-
run: |
|
|
405
|
-
sed -i '' -e "s/APPSTORE_TEAM_ID/${{ secrets.APPSTORE_TEAM_ID }}/" ExportOptions.plist
|
|
406
|
-
sed -i '' -e "s/APPSTORE_PROVISIONING_PROFILE_UUID/${{ secrets.APPSTORE_PROV_PROFILE_UUID_TEST_REACT_TVOS_STG }}/g" ExportOptions.plist
|
|
407
|
-
working-directory: source/examples/TestNamiTV/ios
|
|
408
|
-
|
|
409
|
-
- name: Adjust version & build number
|
|
410
|
-
run: |-
|
|
411
|
-
export CURRENT_VERSION=`cat $RUNNER_TEMP/.current_version`
|
|
412
|
-
export BUILD_NUMBER=`cat $RUNNER_TEMP/.next_build_number`
|
|
413
|
-
sed -i '' -e "s/CURRENT_PROJECT_VERSION = 1/CURRENT_PROJECT_VERSION = $BUILD_NUMBER/" ios/Basic.xcodeproj/project.pbxproj
|
|
414
|
-
sed -i '' -e "s/MARKETING_VERSION = 1.0/MARKETING_VERSION = $CURRENT_VERSION/" ios/Basic.xcodeproj/project.pbxproj
|
|
415
|
-
sed -i '' -e "s/<string>1<\/string>/<string>$BUILD_NUMBER<\/string>/" ios/Info-STG.plist
|
|
416
|
-
working-directory: source/examples/TestNamiTV
|
|
417
|
-
|
|
418
|
-
- name: Install test app dependencies
|
|
419
|
-
run: |
|
|
420
|
-
yarn install
|
|
421
|
-
working-directory: source/examples/TestNamiTV
|
|
422
|
-
|
|
423
|
-
- name: Install test tvOS dependencies
|
|
424
|
-
run: |
|
|
425
|
-
RCT_NEW_ARCH_ENABLED=0 SWIFT_VERSION=5 pod install
|
|
426
|
-
working-directory: source/examples/TestNamiTV/ios
|
|
427
|
-
|
|
428
|
-
- name: Build resolve Swift dependencies
|
|
429
|
-
run: |
|
|
430
|
-
xcodebuild -resolvePackageDependencies -workspace ios/Basic.xcworkspace -scheme Basic-tvOS -configuration Release
|
|
431
|
-
working-directory: source/examples/TestNamiTV
|
|
432
|
-
|
|
433
|
-
- name: Build xArchive
|
|
434
|
-
run: |
|
|
435
|
-
xcodebuild -workspace ios/Basic.xcworkspace -scheme Basic-tvOS -configuration Release DEVELOPMENT_TEAM='${{ secrets.APPSTORE_TEAM_ID }}' -sdk 'appletvos' -destination 'generic/platform=tvOS' -archivePath build-output/app-stg.xcarchive PROVISIONING_PROFILE='${{ secrets.APPSTORE_PROV_PROFILE_UUID_TEST_REACT_TVOS_STG }}' clean archive CODE_SIGN_IDENTITY='${{ secrets.CODE_SIGNING_IDENTITY }}'
|
|
436
|
-
working-directory: source/examples/TestNamiTV
|
|
437
|
-
|
|
438
|
-
- name: Export IPA
|
|
439
|
-
run: |
|
|
440
|
-
xcodebuild -exportArchive -archivePath build-output/app-stg.xcarchive -exportPath build-output/tvos-stg -exportOptionsPlist ios/ExportOptions.plist
|
|
441
|
-
working-directory: source/examples/TestNamiTV
|
|
442
|
-
|
|
443
|
-
- name: Upload app to TestFlight
|
|
444
|
-
run: |
|
|
445
|
-
xcrun altool --upload-app --type tvos --file build-output/tvos-stg/Basic-tvOS.ipa --apiKey $APPSTORE_API_KEY_ID --apiIssuer $APPSTORE_ISSUER_ID
|
|
446
|
-
working-directory: source/examples/TestNamiTV
|
|
447
|
-
env:
|
|
448
|
-
APPSTORE_API_KEY_ID: "${{ secrets.APPSTORE_API_KEY_ID }}"
|
|
449
|
-
APPSTORE_ISSUER_ID: "${{ secrets.APPSTORE_ISSUER_ID }}"
|
|
450
|
-
build-tvos-prod:
|
|
451
|
-
name: Build TestNamiTV tvOS PROD
|
|
452
|
-
permissions:
|
|
453
|
-
actions: write
|
|
454
|
-
contents: write
|
|
455
|
-
id-token: write
|
|
456
|
-
runs-on: macos-12
|
|
457
|
-
timeout-minutes: 40
|
|
458
|
-
steps:
|
|
459
|
-
- uses: actions/setup-node@v3
|
|
460
|
-
with:
|
|
461
|
-
node-version: "16"
|
|
462
|
-
|
|
463
|
-
- name: "Checkout ${{ inputs.ref }}"
|
|
464
|
-
uses: actions/checkout@v2
|
|
465
|
-
with:
|
|
466
|
-
path: source
|
|
467
|
-
ref: "${{ inputs.ref }}"
|
|
468
|
-
|
|
469
|
-
- name: Checkout appstoreconnect-build-tools
|
|
470
|
-
uses: actions/checkout@v2
|
|
471
|
-
with:
|
|
472
|
-
path: appstoreconnect-build-tools
|
|
473
|
-
ref: main
|
|
474
|
-
repository: namiml/appstoreconnect-build-tools
|
|
475
|
-
|
|
476
|
-
- name: Set up Python
|
|
477
|
-
uses: actions/setup-python@v1
|
|
478
|
-
with:
|
|
479
|
-
python-version: "3.10"
|
|
480
|
-
|
|
481
|
-
- name: Get expected build number
|
|
482
|
-
run: |
|
|
483
|
-
pip3 install requests
|
|
484
|
-
pip3 install pydantic
|
|
485
|
-
pip3 install cryptography
|
|
486
|
-
pip3 install PyJWT
|
|
487
|
-
echo "1.0" > $RUNNER_TEMP/.current_version
|
|
488
|
-
export CURRENT_VERSION=`cat $RUNNER_TEMP/.current_version`
|
|
489
|
-
python3 get_next_build.py com.namiml.app.testreactnative --prerelease --platform=TV_OS > $RUNNER_TEMP/.next_build_number
|
|
490
|
-
working-directory: appstoreconnect-build-tools
|
|
491
|
-
env:
|
|
492
|
-
APPSTORE_API_KEY_ID: "${{ secrets.APPSTORE_API_KEY_ID }}"
|
|
493
|
-
APPSTORE_API_PRIVATE_KEY: "${{ secrets.APPSTORE_API_PRIVATE_KEY }}"
|
|
494
|
-
APPSTORE_ISSUER_ID: "${{ secrets.APPSTORE_ISSUER_ID }}"
|
|
495
|
-
|
|
496
|
-
- name: Install Apple Certificate
|
|
497
|
-
uses: apple-actions/import-codesign-certs@v1
|
|
498
|
-
with:
|
|
499
|
-
p12-file-base64: "${{ secrets.IOS_P12_BASE64 }}"
|
|
500
|
-
p12-password: "${{ secrets.IOS_CERTIFICATE_PASSWORD }}"
|
|
501
|
-
|
|
502
|
-
- name: Install the provisioning profile
|
|
503
|
-
run: |
|
|
504
|
-
PP_PATH=$RUNNER_TEMP/build_pp.mobileprovision
|
|
505
|
-
echo -n "$PROVISIONING_CERTIFICATE_BASE64" | base64 --decode --output $PP_PATH
|
|
506
|
-
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
|
|
507
|
-
cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles
|
|
508
|
-
env:
|
|
509
|
-
PROVISIONING_CERTIFICATE_BASE64: "${{ secrets.IOS_MOBILE_PROVISION_BASE64_TEST_REACT_TVOS_PROD }}"
|
|
510
|
-
|
|
511
|
-
- name: Store App Store Private Key
|
|
512
|
-
run: |
|
|
513
|
-
mkdir ~/.private_keys
|
|
514
|
-
echo '${{ secrets.APPSTORE_API_PRIVATE_KEY }}' > ~/.private_keys/AuthKey_'${{ secrets.APPSTORE_API_KEY_ID }}'.p8
|
|
515
|
-
|
|
516
|
-
- name: Update ExportOptions.plist
|
|
517
|
-
run: |
|
|
518
|
-
sed -i '' -e "s/APPSTORE_TEAM_ID/${{ secrets.APPSTORE_TEAM_ID }}/" ExportOptions.plist
|
|
519
|
-
sed -i '' -e "s/APPSTORE_PROVISIONING_PROFILE_UUID/${{ secrets.APPSTORE_PROV_PROFILE_UUID_TEST_REACT_TVOS_PROD }}/g" ExportOptions.plist
|
|
520
|
-
working-directory: source/examples/TestNamiTV/ios
|
|
521
|
-
|
|
522
|
-
- name: Adjust version & build number
|
|
523
|
-
run: |-
|
|
524
|
-
export CURRENT_VERSION=`cat $RUNNER_TEMP/.current_version`
|
|
525
|
-
export BUILD_NUMBER=`cat $RUNNER_TEMP/.next_build_number`
|
|
526
|
-
sed -i '' -e "s/CURRENT_PROJECT_VERSION = 1/CURRENT_PROJECT_VERSION = $BUILD_NUMBER/" ios/Basic.xcodeproj/project.pbxproj
|
|
527
|
-
sed -i '' -e "s/MARKETING_VERSION = 1.0/MARKETING_VERSION = $CURRENT_VERSION/" ios/Basic.xcodeproj/project.pbxproj
|
|
528
|
-
sed -i '' -e "s/<string>1<\/string>/<string>$BUILD_NUMBER<\/string>/" ios/Info-PROD.plist
|
|
529
|
-
working-directory: source/examples/TestNamiTV
|
|
530
|
-
|
|
531
|
-
- name: Install test app dependencies
|
|
532
|
-
run: |
|
|
533
|
-
yarn install
|
|
534
|
-
working-directory: source/examples/TestNamiTV
|
|
535
|
-
|
|
536
|
-
- name: Install test tvOS dependencies
|
|
537
|
-
run: |
|
|
538
|
-
RCT_NEW_ARCH_ENABLED=0 SWIFT_VERSION=5 pod install
|
|
539
|
-
working-directory: source/examples/TestNamiTV/ios
|
|
540
|
-
|
|
541
|
-
- name: Build resolve Swift dependencies
|
|
542
|
-
run: |
|
|
543
|
-
xcodebuild -resolvePackageDependencies -workspace ios/Basic.xcworkspace -scheme Basic-tvOS-PROD -configuration Release
|
|
544
|
-
working-directory: source/examples/TestNamiTV
|
|
545
|
-
|
|
546
|
-
- name: Build xArchive
|
|
547
|
-
run: |
|
|
548
|
-
xcodebuild -workspace ios/Basic.xcworkspace -scheme Basic-tvOS-PROD -configuration Release DEVELOPMENT_TEAM='${{ secrets.APPSTORE_TEAM_ID }}' -sdk 'appletvos' -destination 'generic/platform=tvOS' -archivePath build-output/app-prod.xcarchive PROVISIONING_PROFILE='${{ secrets.APPSTORE_PROV_PROFILE_UUID_TEST_REACT_TVOS_PROD }}' clean archive CODE_SIGN_IDENTITY='${{ secrets.CODE_SIGNING_IDENTITY }}'
|
|
549
|
-
working-directory: source/examples/TestNamiTV
|
|
550
|
-
|
|
551
|
-
- name: Export IPA
|
|
552
|
-
run: |
|
|
553
|
-
xcodebuild -exportArchive -archivePath build-output/app-prod.xcarchive -exportPath build-output/tvos-prod -exportOptionsPlist ios/ExportOptions.plist
|
|
554
|
-
working-directory: source/examples/TestNamiTV
|
|
555
|
-
|
|
556
|
-
- name: Upload app to TestFlight
|
|
557
|
-
run: |
|
|
558
|
-
xcrun altool --upload-app --type tvos --file build-output/tvos-prod/Basic-tvOS-PROD.ipa --apiKey $APPSTORE_API_KEY_ID --apiIssuer $APPSTORE_ISSUER_ID
|
|
559
|
-
working-directory: source/examples/TestNamiTV
|
|
560
|
-
env:
|
|
561
|
-
APPSTORE_API_KEY_ID: "${{ secrets.APPSTORE_API_KEY_ID }}"
|
|
562
|
-
APPSTORE_ISSUER_ID: "${{ secrets.APPSTORE_ISSUER_ID }}"
|
|
563
|
-
build-androidtv-stg:
|
|
564
|
-
name: Build TestNamiTV Android STG
|
|
565
|
-
permissions:
|
|
566
|
-
actions: write
|
|
567
|
-
contents: write
|
|
568
|
-
id-token: write
|
|
569
|
-
runs-on: ubuntu-latest
|
|
570
|
-
steps:
|
|
571
|
-
- uses: actions/setup-node@v3
|
|
572
|
-
with:
|
|
573
|
-
node-version: "16"
|
|
574
|
-
|
|
575
|
-
- name: 'Checkout ${{ inputs.ref }}'
|
|
576
|
-
uses: actions/checkout@v2
|
|
577
|
-
with:
|
|
578
|
-
path: source
|
|
579
|
-
ref: '${{ inputs.ref }}'
|
|
580
|
-
|
|
581
|
-
- name: Create the Keystore
|
|
582
|
-
run: |
|
|
583
|
-
# import keystore from secrets
|
|
584
|
-
echo $KEYSTORE_BASE64 | base64 -d > $RUNNER_TEMP/my_production.keystore
|
|
585
|
-
env:
|
|
586
|
-
KEYSTORE_BASE64: '${{ secrets.KEY_STORE_BASE64 }}'
|
|
587
|
-
|
|
588
|
-
- name: Install test app dependencies
|
|
589
|
-
run: |
|
|
590
|
-
yarn install
|
|
591
|
-
working-directory: source/examples/TestNamiTV
|
|
592
|
-
|
|
593
|
-
- name: Build Android App Bundle
|
|
594
|
-
run: |
|
|
595
|
-
./gradlew clean bundleStagingRelease
|
|
596
|
-
working-directory: source/examples/TestNamiTV/android
|
|
597
|
-
|
|
598
|
-
# - name: Sign Android App Bundle
|
|
599
|
-
# run: |
|
|
600
|
-
# jarsigner -keystore $RUNNER_TEMP/my_production.keystore -storepass '${{ secrets.KEY_STORE_PASSWORD }}' -keypass '${{ secrets.KEY_PASSWORD }}' -sigalg SHA256withRSA -digestalg SHA-256 -signedjar build/outputs/bundle/stagingRelease/app-staging-release-signed.aab build/outputs/bundle/stagingRelease/app-staging-release.aab '${{ secrets.KEY_ALIAS }}'
|
|
601
|
-
# working-directory: source/examples/TestNamiTV/android/app
|
|
602
|
-
|
|
603
|
-
# - name: Uploading to test track
|
|
604
|
-
# uses: r0adkll/upload-google-play@v1.0.17
|
|
605
|
-
# with:
|
|
606
|
-
# packageName: 'com.namiml.stg.testreactnative'
|
|
607
|
-
# releaseFiles: source/examples/TestNamiTV/android/app/build/outputs/bundle/stagingRelease/app-staging-release-signed.aab
|
|
608
|
-
# serviceAccountJsonPlainText: '${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT }}'
|
|
609
|
-
# status: completed
|
|
610
|
-
# track: internal
|
|
@@ -20,8 +20,8 @@ on:
|
|
|
20
20
|
required: true
|
|
21
21
|
|
|
22
22
|
jobs:
|
|
23
|
-
build-android:
|
|
24
|
-
name: Generate Play Store
|
|
23
|
+
build-android-prod:
|
|
24
|
+
name: Generate Play Store PROD
|
|
25
25
|
permissions:
|
|
26
26
|
actions: write
|
|
27
27
|
contents: write
|
|
@@ -45,7 +45,7 @@ jobs:
|
|
|
45
45
|
- name: Get new version code
|
|
46
46
|
run: |
|
|
47
47
|
echo $GOOGLE_PLAY_SERVICE_ACCOUNT > $RUNNER_TEMP/.service_account
|
|
48
|
-
python3 build-utils/get_version_code.py $RUNNER_TEMP/.service_account com.namiml.
|
|
48
|
+
python3 build-utils/get_version_code.py $RUNNER_TEMP/.service_account com.namiml.testreact.prod internal --quiet >> $RUNNER_TEMP/.new_version_code
|
|
49
49
|
rm -f .service_account
|
|
50
50
|
env:
|
|
51
51
|
GOOGLE_PLAY_SERVICE_ACCOUNT: '${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT }}'
|
|
@@ -70,21 +70,28 @@ jobs:
|
|
|
70
70
|
yarn install
|
|
71
71
|
working-directory: source/examples/Basic
|
|
72
72
|
|
|
73
|
+
- name: Update App Platform ID
|
|
74
|
+
working-directory: source/examples/Basic/config/
|
|
75
|
+
run: |
|
|
76
|
+
sed -i "s/ANDROID_PROD_APP_PLATFORM_ID/$BASIC_ANDROID_PROD_APP_PLATFORM_ID/" index.ts
|
|
77
|
+
env:
|
|
78
|
+
BASIC_ANDROID_PROD_APP_PLATFORM_ID: '${{ secrets.ANDROID_PROD_APP_PLATFORM_ID }}'
|
|
79
|
+
|
|
73
80
|
- name: Build Android App Bundle
|
|
74
81
|
run: |
|
|
75
|
-
./gradlew clean
|
|
82
|
+
./gradlew clean bundleProductionRelease
|
|
76
83
|
working-directory: source/examples/Basic/android
|
|
77
84
|
|
|
78
85
|
- name: Sign Android App Bundle
|
|
79
86
|
run: |
|
|
80
|
-
jarsigner -keystore $RUNNER_TEMP/my_production.keystore -storepass '${{ secrets.KEY_STORE_PASSWORD }}' -keypass '${{ secrets.KEY_PASSWORD }}' -sigalg SHA256withRSA -digestalg SHA-256 -signedjar build/outputs/bundle/
|
|
87
|
+
jarsigner -keystore $RUNNER_TEMP/my_production.keystore -storepass '${{ secrets.KEY_STORE_PASSWORD }}' -keypass '${{ secrets.KEY_PASSWORD }}' -sigalg SHA256withRSA -digestalg SHA-256 -signedjar build/outputs/bundle/productionRelease/app-production-release-signed.aab build/outputs/bundle/productionRelease/app-production-release.aab '${{ secrets.KEY_ALIAS }}'
|
|
81
88
|
working-directory: source/examples/Basic/android/app
|
|
82
89
|
|
|
83
90
|
- name: Uploading to test track
|
|
84
91
|
uses: r0adkll/upload-google-play@v1.0.17
|
|
85
92
|
with:
|
|
86
|
-
packageName: 'com.namiml.
|
|
87
|
-
releaseFiles: source/examples/Basic/android/app/build/outputs/bundle/
|
|
93
|
+
packageName: 'com.namiml.testreact.prod'
|
|
94
|
+
releaseFiles: source/examples/Basic/android/app/build/outputs/bundle/productionRelease/app-production-release-signed.aab
|
|
88
95
|
serviceAccountJsonPlainText: '${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT }}'
|
|
89
96
|
status: completed
|
|
90
97
|
track: internal
|
|
@@ -174,6 +181,13 @@ jobs:
|
|
|
174
181
|
yarn install
|
|
175
182
|
working-directory: source/examples/Basic
|
|
176
183
|
|
|
184
|
+
- name: Update App Platform ID
|
|
185
|
+
working-directory: source/examples/Basic/config/
|
|
186
|
+
run: |
|
|
187
|
+
sed -i '' -e "s/APPLE_PROD_APP_PLATFORM_ID/$BASIC_APPLE_PROD_APP_PLATFORM_ID/" index.ts
|
|
188
|
+
env:
|
|
189
|
+
BASIC_APPLE_PROD_APP_PLATFORM_ID: '${{ secrets.APPLE_PROD_APP_PLATFORM_ID }}'
|
|
190
|
+
|
|
177
191
|
- name: Install test iOS dependencies
|
|
178
192
|
run: |
|
|
179
193
|
pod install
|
|
@@ -287,6 +301,13 @@ jobs:
|
|
|
287
301
|
yarn install
|
|
288
302
|
working-directory: source/examples/TestNamiTV
|
|
289
303
|
|
|
304
|
+
- name: Update App Platform ID
|
|
305
|
+
working-directory: source/examples/TestNamiTV/config/
|
|
306
|
+
run: |
|
|
307
|
+
sed -i '' -e "s/APPLE_PROD_APP_PLATFORM_ID/$TESTNAMITV_APPLE_PROD_APP_PLATFORM_ID/" index.ts
|
|
308
|
+
env:
|
|
309
|
+
TESTNAMITV_APPLE_PROD_APP_PLATFORM_ID: '${{ secrets.APPLE_PROD_APP_PLATFORM_ID }}'
|
|
310
|
+
|
|
290
311
|
- name: Install test tvOS dependencies
|
|
291
312
|
run: |
|
|
292
313
|
RCT_NEW_ARCH_ENABLED=0 SWIFT_VERSION=5 pod install
|
|
@@ -20,7 +20,7 @@ on:
|
|
|
20
20
|
required: true
|
|
21
21
|
|
|
22
22
|
jobs:
|
|
23
|
-
build-android:
|
|
23
|
+
build-android-stg:
|
|
24
24
|
name: Generate Play Store STG
|
|
25
25
|
permissions:
|
|
26
26
|
actions: write
|
|
@@ -58,6 +58,13 @@ jobs:
|
|
|
58
58
|
echo $NEW_VERSION_CODE
|
|
59
59
|
sed -i "s/versionCode 1/versionCode $NEW_VERSION_CODE/" build.gradle
|
|
60
60
|
|
|
61
|
+
- name: Update App Platform ID
|
|
62
|
+
working-directory: source/examples/Basic/config/
|
|
63
|
+
run: |
|
|
64
|
+
sed -i "s/ANDROID_STG_APP_PLATFORM_ID/$BASIC_ANDROID_STG_APP_PLATFORM_ID/" index.ts
|
|
65
|
+
env:
|
|
66
|
+
BASIC_ANDROID_STG_APP_PLATFORM_ID: '${{ secrets.ANDROID_STG_APP_PLATFORM_ID }}'
|
|
67
|
+
|
|
61
68
|
- name: Create the Keystore
|
|
62
69
|
run: |
|
|
63
70
|
# import keystore from secrets
|
|
@@ -174,6 +181,13 @@ jobs:
|
|
|
174
181
|
yarn install
|
|
175
182
|
working-directory: source/examples/Basic
|
|
176
183
|
|
|
184
|
+
- name: Update App Platform ID
|
|
185
|
+
working-directory: source/examples/Basic/config/
|
|
186
|
+
run: |
|
|
187
|
+
sed -i '' -e "s/APPLE_STG_APP_PLATFORM_ID/$BASIC_APPLE_STG_APP_PLATFORM_ID/" index.ts
|
|
188
|
+
env:
|
|
189
|
+
BASIC_APPLE_STG_APP_PLATFORM_ID: '${{ secrets.APPLE_STG_APP_PLATFORM_ID }}'
|
|
190
|
+
|
|
177
191
|
- name: Install test iOS dependencies
|
|
178
192
|
run: |
|
|
179
193
|
pod install
|
|
@@ -287,6 +301,13 @@ jobs:
|
|
|
287
301
|
yarn install
|
|
288
302
|
working-directory: source/examples/TestNamiTV
|
|
289
303
|
|
|
304
|
+
- name: Update App Platform ID
|
|
305
|
+
working-directory: source/examples/TestNamiTV/config/
|
|
306
|
+
run: |
|
|
307
|
+
sed -i '' -e "s/APPLE_STG_APP_PLATFORM_ID/$TESTNAMITV_APPLE_STG_APP_PLATFORM_ID/" index.ts
|
|
308
|
+
env:
|
|
309
|
+
TESTNAMITV_APPLE_STG_APP_PLATFORM_ID: '${{ secrets.APPLE_STG_APP_PLATFORM_ID }}'
|
|
310
|
+
|
|
290
311
|
- name: Install test tvOS dependencies
|
|
291
312
|
run: |
|
|
292
313
|
RCT_NEW_ARCH_ENABLED=0 SWIFT_VERSION=5 pod install
|
package/android/build.gradle
CHANGED
|
@@ -17,7 +17,6 @@ def safeExtGet(prop, fallback) {
|
|
|
17
17
|
apply plugin: 'com.android.library'
|
|
18
18
|
// apply plugin: 'maven'
|
|
19
19
|
apply plugin: "kotlin-android"
|
|
20
|
-
apply plugin: "kotlin-android-extensions"
|
|
21
20
|
buildscript {
|
|
22
21
|
ext.kotlin_version = '1.6.10'
|
|
23
22
|
// The Android Gradle plugin is only required when opening the android folder stand-alone.
|
|
@@ -58,6 +57,9 @@ android {
|
|
|
58
57
|
dexOptions {
|
|
59
58
|
javaMaxHeapSize "4g"
|
|
60
59
|
}
|
|
60
|
+
buildFeatures {
|
|
61
|
+
viewBinding true
|
|
62
|
+
}
|
|
61
63
|
}
|
|
62
64
|
repositories {
|
|
63
65
|
mavenCentral()
|
|
@@ -82,7 +84,7 @@ dependencies {
|
|
|
82
84
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
|
83
85
|
|
|
84
86
|
implementation 'com.github.jeziellago:compose-markdown:0.3.0'
|
|
85
|
-
implementation "com.namiml:sdk-android:3.0.
|
|
87
|
+
implementation "com.namiml:sdk-android:3.0.16"
|
|
86
88
|
|
|
87
89
|
implementation 'com.facebook.react:react-native:+' // From node_modules
|
|
88
90
|
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:1.1.5"
|
|
@@ -26,6 +26,7 @@ class NamiBridgeModule(reactContext: ReactApplicationContext) :
|
|
|
26
26
|
private const val CONFIG_MAP_BYPASS_STORE_KEY = "bypassStore"
|
|
27
27
|
private const val CONFIG_MAP_NAMI_COMMANDS_KEY = "namiCommands"
|
|
28
28
|
private const val CONFIG_MAP_LANGUAGE_CODE_KEY = "namiLanguageCode"
|
|
29
|
+
private const val CONFIG_MAP_INITIAL_CONFIG_KEY = "initialConfig"
|
|
29
30
|
private const val PLATFORM_ID_ERROR_VALUE = "APPPLATFORMID_NOT_FOUND"
|
|
30
31
|
}
|
|
31
32
|
|
|
@@ -114,13 +115,26 @@ class NamiBridgeModule(reactContext: ReactApplicationContext) :
|
|
|
114
115
|
} else {
|
|
115
116
|
Arguments.createArray()
|
|
116
117
|
}
|
|
117
|
-
val settingsList = mutableListOf("extendedClientInfo:react-native:3.0.
|
|
118
|
+
val settingsList = mutableListOf("extendedClientInfo:react-native:3.0.13")
|
|
118
119
|
namiCommandsReact?.toArrayList()?.filterIsInstance<String>()?.let { commandsFromReact ->
|
|
119
120
|
settingsList.addAll(commandsFromReact)
|
|
120
121
|
}
|
|
121
122
|
Log.i(LOG_TAG, "Nami Configuration command settings are $settingsList")
|
|
122
123
|
builder.settingsList = settingsList
|
|
123
124
|
|
|
125
|
+
val initialConfig = if (configDict.hasKey(CONFIG_MAP_INITIAL_CONFIG_KEY)) {
|
|
126
|
+
configDict.getString(CONFIG_MAP_INITIAL_CONFIG_KEY)
|
|
127
|
+
} else {
|
|
128
|
+
null
|
|
129
|
+
}
|
|
130
|
+
initialConfig?.let { initialConfigString ->
|
|
131
|
+
Log.i(
|
|
132
|
+
LOG_TAG,
|
|
133
|
+
"Nami Configuration initialConfig found.",
|
|
134
|
+
)
|
|
135
|
+
builder.initialConfig = initialConfigString
|
|
136
|
+
}
|
|
137
|
+
|
|
124
138
|
val builtConfig: NamiConfiguration = builder.build()
|
|
125
139
|
Log.i(LOG_TAG, "Nami Configuration object is $builtConfig")
|
|
126
140
|
|
package/ios/Nami.m
CHANGED
|
@@ -41,7 +41,7 @@ RCT_EXPORT_METHOD(configure: (NSDictionary *)configDict completion: (RCTResponse
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
NSString *languageString = configDict[@"namiLanguageCode"];
|
|
44
|
-
if ([
|
|
44
|
+
if ([languageString length] > 0) {
|
|
45
45
|
NSLog(@"Nami language code from config dictionary is %@", languageString);
|
|
46
46
|
if ([[NamiLanguageCodes allAvailableNamiLanguageCodes]
|
|
47
47
|
containsObject:[languageString lowercaseString]] ) {
|
|
@@ -52,7 +52,7 @@ RCT_EXPORT_METHOD(configure: (NSDictionary *)configDict completion: (RCTResponse
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
// Start commands with header iformation for Nami to let them know this is a React client.
|
|
55
|
-
NSMutableArray *namiCommandStrings = [NSMutableArray arrayWithArray:@[@"extendedClientInfo:react-native:3.0.
|
|
55
|
+
NSMutableArray *namiCommandStrings = [NSMutableArray arrayWithArray:@[@"extendedClientInfo:react-native:3.0.13"]];
|
|
56
56
|
|
|
57
57
|
// Add additional namiCommands app may have sent in.
|
|
58
58
|
NSObject *appCommandStrings = configDict[@"namiCommands"];
|
|
@@ -69,6 +69,11 @@ RCT_EXPORT_METHOD(configure: (NSDictionary *)configDict completion: (RCTResponse
|
|
|
69
69
|
|
|
70
70
|
config.namiCommands = namiCommandStrings;
|
|
71
71
|
|
|
72
|
+
NSString *initialConfigString = configDict[@"initialConfig"];
|
|
73
|
+
if ([initialConfigString length] > 0) {
|
|
74
|
+
NSLog(@"Found an initialConfig file to use for Nami SDK setup.");
|
|
75
|
+
config.initialConfig = initialConfigString;
|
|
76
|
+
}
|
|
72
77
|
|
|
73
78
|
[Nami configureWith:config];
|
|
74
79
|
NSDictionary *dict = @{@"success": @YES};
|
package/package.json
CHANGED