react-native-nami-sdk 3.0.10 → 3.0.12

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.
@@ -201,116 +201,116 @@ jobs:
201
201
  env:
202
202
  APPSTORE_API_KEY_ID: "${{ secrets.APPSTORE_API_KEY_ID }}"
203
203
  APPSTORE_ISSUER_ID: "${{ secrets.APPSTORE_ISSUER_ID }}"
204
- build-tvos-prod:
205
- name: Build TestNamiTV tvOS PROD
206
- permissions:
207
- actions: write
208
- contents: write
209
- id-token: write
210
- runs-on: macos-12
211
- timeout-minutes: 40
212
- steps:
213
- - uses: actions/setup-node@v3
214
- with:
215
- node-version: "16"
216
-
217
- - name: "Checkout ${{ inputs.ref }}"
218
- uses: actions/checkout@v2
219
- with:
220
- path: source
221
- ref: "${{ inputs.ref }}"
222
-
223
- - name: Checkout appstoreconnect-build-tools
224
- uses: actions/checkout@v2
225
- with:
226
- path: appstoreconnect-build-tools
227
- ref: main
228
- repository: namiml/appstoreconnect-build-tools
229
-
230
- - name: Set up Python
231
- uses: actions/setup-python@v1
232
- with:
233
- python-version: "3.10"
234
-
235
- - name: Get expected build number
236
- run: |
237
- pip3 install requests
238
- pip3 install pydantic
239
- pip3 install cryptography
240
- pip3 install PyJWT
241
- echo "1.0" > $RUNNER_TEMP/.current_version
242
- export CURRENT_VERSION=`cat $RUNNER_TEMP/.current_version`
243
- python3 get_next_build.py com.namiml.stg.testreactnative --prerelease --platform=TV_OS > $RUNNER_TEMP/.next_build_number
244
- working-directory: appstoreconnect-build-tools
245
- env:
246
- APPSTORE_API_KEY_ID: "${{ secrets.APPSTORE_API_KEY_ID }}"
247
- APPSTORE_API_PRIVATE_KEY: "${{ secrets.APPSTORE_API_PRIVATE_KEY }}"
248
- APPSTORE_ISSUER_ID: "${{ secrets.APPSTORE_ISSUER_ID }}"
249
-
250
- - name: Install Apple Certificate
251
- uses: apple-actions/import-codesign-certs@v1
252
- with:
253
- p12-file-base64: "${{ secrets.IOS_P12_BASE64 }}"
254
- p12-password: "${{ secrets.IOS_CERTIFICATE_PASSWORD }}"
255
-
256
- - name: Install the provisioning profile
257
- run: |
258
- PP_PATH=$RUNNER_TEMP/build_pp.mobileprovision
259
- echo -n "$PROVISIONING_CERTIFICATE_BASE64" | base64 --decode --output $PP_PATH
260
- mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
261
- cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles
262
- env:
263
- PROVISIONING_CERTIFICATE_BASE64: "${{ secrets.IOS_MOBILE_PROVISION_BASE64_TEST_REACT_TVOS_PROD }}"
264
-
265
- - name: Store App Store Private Key
266
- run: |
267
- mkdir ~/.private_keys
268
- echo '${{ secrets.APPSTORE_API_PRIVATE_KEY }}' > ~/.private_keys/AuthKey_'${{ secrets.APPSTORE_API_KEY_ID }}'.p8
269
-
270
- - name: Update ExportOptions.plist
271
- run: |
272
- sed -i '' -e "s/APPSTORE_TEAM_ID/${{ secrets.APPSTORE_TEAM_ID }}/" ExportOptions.plist
273
- sed -i '' -e "s/APPSTORE_PROVISIONING_PROFILE_UUID/${{ secrets.APPSTORE_PROV_PROFILE_UUID_TEST_REACT_TVOS_PROD }}/g" ExportOptions.plist
274
- working-directory: source/examples/TestNamiTV/ios
275
-
276
- - name: Adjust version & build number
277
- run: |-
278
- export CURRENT_VERSION=`cat $RUNNER_TEMP/.current_version`
279
- export BUILD_NUMBER=`cat $RUNNER_TEMP/.next_build_number`
280
- sed -i '' -e "s/CURRENT_PROJECT_VERSION = 1/CURRENT_PROJECT_VERSION = $BUILD_NUMBER/" ios/Basic.xcodeproj/project.pbxproj
281
- sed -i '' -e "s/MARKETING_VERSION = 1.0/MARKETING_VERSION = $CURRENT_VERSION/" ios/Basic.xcodeproj/project.pbxproj
282
- sed -i '' -e "s/<string>1<\/string>/<string>$BUILD_NUMBER<\/string>/" ios/Info-PROD.plist
283
- working-directory: source/examples/TestNamiTV
284
-
285
- - name: Install test app dependencies
286
- run: |
287
- yarn install
288
- working-directory: source/examples/TestNamiTV
289
-
290
- - name: Install test tvOS dependencies
291
- run: |
292
- RCT_NEW_ARCH_ENABLED=0 SWIFT_VERSION=5 pod install
293
- working-directory: source/examples/TestNamiTV/ios
294
-
295
- - name: Build resolve Swift dependencies
296
- run: |
297
- xcodebuild -resolvePackageDependencies -workspace ios/Basic.xcworkspace -scheme Basic-tvOS-PROD -configuration Release
298
- working-directory: source/examples/TestNamiTV
299
-
300
- - name: Build xArchive
301
- run: |
302
- 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 }}'
303
- working-directory: source/examples/TestNamiTV
304
-
305
- - name: Export IPA
306
- run: |
307
- xcodebuild -exportArchive -archivePath build-output/app-prod.xcarchive -exportPath build-output/tvos-prod -exportOptionsPlist ios/ExportOptions.plist
308
- working-directory: source/examples/TestNamiTV
309
-
310
- - name: Upload app to TestFlight
311
- run: |
312
- xcrun altool --upload-app --type tvos --file build-output/tvos-prod/Basic-tvOS-PROD.ipa --apiKey $APPSTORE_API_KEY_ID --apiIssuer $APPSTORE_ISSUER_ID
313
- working-directory: source/examples/TestNamiTV
314
- env:
315
- APPSTORE_API_KEY_ID: "${{ secrets.APPSTORE_API_KEY_ID }}"
316
- APPSTORE_ISSUER_ID: "${{ secrets.APPSTORE_ISSUER_ID }}"
204
+ build-tvos-prod:
205
+ name: Build TestNamiTV tvOS PROD
206
+ permissions:
207
+ actions: write
208
+ contents: write
209
+ id-token: write
210
+ runs-on: macos-12
211
+ timeout-minutes: 40
212
+ steps:
213
+ - uses: actions/setup-node@v3
214
+ with:
215
+ node-version: "16"
216
+
217
+ - name: "Checkout ${{ inputs.ref }}"
218
+ uses: actions/checkout@v2
219
+ with:
220
+ path: source
221
+ ref: "${{ inputs.ref }}"
222
+
223
+ - name: Checkout appstoreconnect-build-tools
224
+ uses: actions/checkout@v2
225
+ with:
226
+ path: appstoreconnect-build-tools
227
+ ref: main
228
+ repository: namiml/appstoreconnect-build-tools
229
+
230
+ - name: Set up Python
231
+ uses: actions/setup-python@v1
232
+ with:
233
+ python-version: "3.10"
234
+
235
+ - name: Get expected build number
236
+ run: |
237
+ pip3 install requests
238
+ pip3 install pydantic
239
+ pip3 install cryptography
240
+ pip3 install PyJWT
241
+ echo "1.0" > $RUNNER_TEMP/.current_version
242
+ export CURRENT_VERSION=`cat $RUNNER_TEMP/.current_version`
243
+ python3 get_next_build.py com.namiml.stg.testreactnative --prerelease --platform=TV_OS > $RUNNER_TEMP/.next_build_number
244
+ working-directory: appstoreconnect-build-tools
245
+ env:
246
+ APPSTORE_API_KEY_ID: "${{ secrets.APPSTORE_API_KEY_ID }}"
247
+ APPSTORE_API_PRIVATE_KEY: "${{ secrets.APPSTORE_API_PRIVATE_KEY }}"
248
+ APPSTORE_ISSUER_ID: "${{ secrets.APPSTORE_ISSUER_ID }}"
249
+
250
+ - name: Install Apple Certificate
251
+ uses: apple-actions/import-codesign-certs@v1
252
+ with:
253
+ p12-file-base64: "${{ secrets.IOS_P12_BASE64 }}"
254
+ p12-password: "${{ secrets.IOS_CERTIFICATE_PASSWORD }}"
255
+
256
+ - name: Install the provisioning profile
257
+ run: |
258
+ PP_PATH=$RUNNER_TEMP/build_pp.mobileprovision
259
+ echo -n "$PROVISIONING_CERTIFICATE_BASE64" | base64 --decode --output $PP_PATH
260
+ mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
261
+ cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles
262
+ env:
263
+ PROVISIONING_CERTIFICATE_BASE64: "${{ secrets.IOS_MOBILE_PROVISION_BASE64_TEST_REACT_TVOS_PROD }}"
264
+
265
+ - name: Store App Store Private Key
266
+ run: |
267
+ mkdir ~/.private_keys
268
+ echo '${{ secrets.APPSTORE_API_PRIVATE_KEY }}' > ~/.private_keys/AuthKey_'${{ secrets.APPSTORE_API_KEY_ID }}'.p8
269
+
270
+ - name: Update ExportOptions.plist
271
+ run: |
272
+ sed -i '' -e "s/APPSTORE_TEAM_ID/${{ secrets.APPSTORE_TEAM_ID }}/" ExportOptions.plist
273
+ sed -i '' -e "s/APPSTORE_PROVISIONING_PROFILE_UUID/${{ secrets.APPSTORE_PROV_PROFILE_UUID_TEST_REACT_TVOS_PROD }}/g" ExportOptions.plist
274
+ working-directory: source/examples/TestNamiTV/ios
275
+
276
+ - name: Adjust version & build number
277
+ run: |-
278
+ export CURRENT_VERSION=`cat $RUNNER_TEMP/.current_version`
279
+ export BUILD_NUMBER=`cat $RUNNER_TEMP/.next_build_number`
280
+ sed -i '' -e "s/CURRENT_PROJECT_VERSION = 1/CURRENT_PROJECT_VERSION = $BUILD_NUMBER/" ios/Basic.xcodeproj/project.pbxproj
281
+ sed -i '' -e "s/MARKETING_VERSION = 1.0/MARKETING_VERSION = $CURRENT_VERSION/" ios/Basic.xcodeproj/project.pbxproj
282
+ sed -i '' -e "s/<string>1<\/string>/<string>$BUILD_NUMBER<\/string>/" ios/Info-PROD.plist
283
+ working-directory: source/examples/TestNamiTV
284
+
285
+ - name: Install test app dependencies
286
+ run: |
287
+ yarn install
288
+ working-directory: source/examples/TestNamiTV
289
+
290
+ - name: Install test tvOS dependencies
291
+ run: |
292
+ RCT_NEW_ARCH_ENABLED=0 SWIFT_VERSION=5 pod install
293
+ working-directory: source/examples/TestNamiTV/ios
294
+
295
+ - name: Build resolve Swift dependencies
296
+ run: |
297
+ xcodebuild -resolvePackageDependencies -workspace ios/Basic.xcworkspace -scheme Basic-tvOS-PROD -configuration Release
298
+ working-directory: source/examples/TestNamiTV
299
+
300
+ - name: Build xArchive
301
+ run: |
302
+ 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 }}'
303
+ working-directory: source/examples/TestNamiTV
304
+
305
+ - name: Export IPA
306
+ run: |
307
+ xcodebuild -exportArchive -archivePath build-output/app-prod.xcarchive -exportPath build-output/tvos-prod -exportOptionsPlist ios/ExportOptions.plist
308
+ working-directory: source/examples/TestNamiTV
309
+
310
+ - name: Upload app to TestFlight
311
+ run: |
312
+ xcrun altool --upload-app --type tvos --file build-output/tvos-prod/Basic-tvOS-PROD.ipa --apiKey $APPSTORE_API_KEY_ID --apiIssuer $APPSTORE_ISSUER_ID
313
+ working-directory: source/examples/TestNamiTV
314
+ env:
315
+ APPSTORE_API_KEY_ID: "${{ secrets.APPSTORE_API_KEY_ID }}"
316
+ APPSTORE_ISSUER_ID: "${{ secrets.APPSTORE_ISSUER_ID }}"
@@ -127,7 +127,7 @@ jobs:
127
127
  pip3 install PyJWT
128
128
  echo "1.0" > $RUNNER_TEMP/.current_version
129
129
  export CURRENT_VERSION=`cat $RUNNER_TEMP/.current_version`
130
- python3 get_next_build.py com.namiml.stg.testreactnative --prerelease --version=$CURRENT_VERSION > $RUNNER_TEMP/.next_build_number
130
+ python3 get_next_build.py com.namiml.stg.testreactnative --prerelease --version=$CURRENT_VERSION --platform=IOS > $RUNNER_TEMP/.next_build_number
131
131
  working-directory: appstoreconnect-build-tools
132
132
  env:
133
133
  APPSTORE_API_KEY_ID: "${{ secrets.APPSTORE_API_KEY_ID }}"
@@ -36,17 +36,18 @@ buildscript {
36
36
  }
37
37
  }
38
38
  android {
39
- compileSdkVersion 33
39
+ compileSdkVersion 32
40
40
  buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION)
41
41
  defaultConfig {
42
- minSdkVersion 25
43
- targetSdkVersion 33
42
+ minSdkVersion 22
43
+ targetSdkVersion 31
44
44
  versionCode 1
45
45
  versionName "1.0"
46
46
  }
47
47
  compileOptions {
48
48
  sourceCompatibility JavaVersion.VERSION_1_8
49
49
  targetCompatibility JavaVersion.VERSION_1_8
50
+ coreLibraryDesugaringEnabled true
50
51
  }
51
52
  lintOptions {
52
53
  abortOnError false
@@ -81,9 +82,10 @@ dependencies {
81
82
  implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
82
83
 
83
84
  implementation 'com.github.jeziellago:compose-markdown:0.3.0'
84
- implementation "com.namiml:sdk-android:3.0.11"
85
+ implementation "com.namiml:sdk-android:3.0.13"
85
86
 
86
87
  implementation 'com.facebook.react:react-native:+' // From node_modules
88
+ coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:1.1.5"
87
89
  }
88
90
  def configureReactNativePom(def pom) {
89
91
  def packageJson = new JsonSlurper().parseText(file('../package.json').text)
@@ -114,7 +114,7 @@ class NamiBridgeModule(reactContext: ReactApplicationContext) :
114
114
  } else {
115
115
  Arguments.createArray()
116
116
  }
117
- val settingsList = mutableListOf("extendedClientInfo:react-native:3.0.10")
117
+ val settingsList = mutableListOf("extendedClientInfo:react-native:3.0.12")
118
118
  namiCommandsReact?.toArrayList()?.filterIsInstance<String>()?.let { commandsFromReact ->
119
119
  settingsList.addAll(commandsFromReact)
120
120
  }
package/ios/Nami.m CHANGED
@@ -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.10"]];
55
+ NSMutableArray *namiCommandStrings = [NSMutableArray arrayWithArray:@[@"extendedClientInfo:react-native:3.0.12"]];
56
56
 
57
57
  // Add additional namiCommands app may have sent in.
58
58
  NSObject *appCommandStrings = configDict[@"namiCommands"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-nami-sdk",
3
- "version": "3.0.10",
3
+ "version": "3.0.12",
4
4
  "description": "React Native Module for Nami - Easy subscriptions & in-app purchases, with powerful built-in paywalls and A/B testing.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -17,6 +17,7 @@
17
17
  "in-app-purchase",
18
18
  "ios",
19
19
  "ipados",
20
+ "tvos",
20
21
  "paywall",
21
22
  "react-native",
22
23
  "storekit",
@@ -20,7 +20,7 @@ Pod::Spec.new do |s|
20
20
  s.source_files = "ios/**/*.{h,m,swift}"
21
21
  s.requires_arc = true
22
22
 
23
- s.dependency 'Nami', '3.0.13'
23
+ s.dependency 'Nami', '3.0.14'
24
24
  s.dependency 'React'
25
25
 
26
26
  end