From f3ef35fbfc777d7d59da460a8f4061325f2cc8ca Mon Sep 17 00:00:00 2001 From: m1ga Date: Fri, 7 Oct 2022 17:53:28 +0200 Subject: [PATCH 1/9] fix(android) null check --- android/manifest | 2 +- android/src/ti/identity/FingerPrintHelper.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/android/manifest b/android/manifest index a95ad2d..83d1c42 100644 --- a/android/manifest +++ b/android/manifest @@ -2,7 +2,7 @@ # this is your module manifest and used by Titanium # during compilation, packaging, distribution, etc. # -version: 3.1.0 +version: 3.1.1 apiversion: 4 architectures: arm64-v8a armeabi-v7a x86 x86_64 description: titanium-identity diff --git a/android/src/ti/identity/FingerPrintHelper.java b/android/src/ti/identity/FingerPrintHelper.java index 314713b..605ccee 100644 --- a/android/src/ti/identity/FingerPrintHelper.java +++ b/android/src/ti/identity/FingerPrintHelper.java @@ -150,7 +150,9 @@ public void startListening(KrollFunction callback, KrollObject obj) final Executor executor = Executors.newSingleThreadExecutor(); final BiometricPrompt prompt = new BiometricPrompt((FragmentActivity) TiApplication.getAppCurrentActivity(), executor, this); - prompt.authenticate(promptInfo.build(), mCryptoObject); + if (mCryptoObject != null) { + prompt.authenticate(promptInfo.build(), mCryptoObject); + } } else if (canUseDeviceCredentials()) { this.callback = callback; this.krollObject = obj; From 300dbc7bf50867e560105cd4bc8c2037f6b2dd5b Mon Sep 17 00:00:00 2001 From: m1ga Date: Fri, 7 Oct 2022 18:42:07 +0200 Subject: [PATCH 2/9] update --- .../src/ti/identity/FingerPrintHelper.java | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/android/src/ti/identity/FingerPrintHelper.java b/android/src/ti/identity/FingerPrintHelper.java index 605ccee..48a6ebe 100644 --- a/android/src/ti/identity/FingerPrintHelper.java +++ b/android/src/ti/identity/FingerPrintHelper.java @@ -141,17 +141,19 @@ public void startListening(KrollFunction callback, KrollObject obj) mSelfCancelled = false; - final BiometricPrompt.PromptInfo.Builder promptInfo = new BiometricPrompt.PromptInfo.Builder(); - promptInfo.setTitle(TitaniumIdentityModule.reason); - promptInfo.setDescription(TitaniumIdentityModule.reasonText); - promptInfo.setSubtitle(TitaniumIdentityModule.reasonSubtitle); - promptInfo.setNegativeButtonText(TitaniumIdentityModule.negativeButtonText); - - final Executor executor = Executors.newSingleThreadExecutor(); - final BiometricPrompt prompt = - new BiometricPrompt((FragmentActivity) TiApplication.getAppCurrentActivity(), executor, this); if (mCryptoObject != null) { + final BiometricPrompt.PromptInfo.Builder promptInfo = new BiometricPrompt.PromptInfo.Builder(); + promptInfo.setTitle(TitaniumIdentityModule.reason); + promptInfo.setDescription(TitaniumIdentityModule.reasonText); + promptInfo.setSubtitle(TitaniumIdentityModule.reasonSubtitle); + promptInfo.setNegativeButtonText(TitaniumIdentityModule.negativeButtonText); + + final Executor executor = Executors.newSingleThreadExecutor(); + final BiometricPrompt prompt = + new BiometricPrompt((FragmentActivity) TiApplication.getAppCurrentActivity(), executor, this); prompt.authenticate(promptInfo.build(), mCryptoObject); + } else if (canUseDeviceCredentials()) { + startDeviceCredentials(); } } else if (canUseDeviceCredentials()) { this.callback = callback; From 71f46ad6bb966100058c4da0837963f3fe1f9ebd Mon Sep 17 00:00:00 2001 From: m1ga Date: Tue, 7 Feb 2023 22:07:43 +0100 Subject: [PATCH 3/9] more properties --- .../ti/identity/TitaniumIdentityModule.java | 39 +++++++++++++++++++ android/timodule.xml | 1 + apidoc/Identity.yml | 28 ++++++++++--- 3 files changed, 63 insertions(+), 5 deletions(-) diff --git a/android/src/ti/identity/TitaniumIdentityModule.java b/android/src/ti/identity/TitaniumIdentityModule.java index 9852b7b..297749f 100644 --- a/android/src/ti/identity/TitaniumIdentityModule.java +++ b/android/src/ti/identity/TitaniumIdentityModule.java @@ -7,6 +7,7 @@ package ti.identity; import android.app.Activity; +import android.content.pm.PackageManager; import android.os.Build; import java.lang.Override; import java.util.HashMap; @@ -16,6 +17,7 @@ import org.appcelerator.kroll.KrollProxy; import org.appcelerator.kroll.annotations.Kroll; import org.appcelerator.kroll.common.Log; +import org.appcelerator.titanium.TiApplication; import org.appcelerator.titanium.util.TiConvert; @Kroll.module(name = "Identity", id = "ti.identity") @@ -96,6 +98,8 @@ public class TitaniumIdentityModule extends KrollModule public static String reasonText = ""; public static String negativeButtonText = "Cancel"; + PackageManager pm; + public TitaniumIdentityModule() { super(); @@ -203,6 +207,41 @@ public boolean isSupported() return false; } + @Kroll.getProperty + public boolean hasFingerprintScanner() + { + if (pm == null) { + pm = TiApplication.getAppCurrentActivity().getPackageManager(); + } + if (pm.hasSystemFeature(PackageManager.FEATURE_FINGERPRINT)) { + return true; + } + return false; + } + @Kroll.getProperty + public boolean hasFaceScanner() + { + if (pm == null) { + pm = TiApplication.getAppCurrentActivity().getPackageManager(); + } + if (pm.hasSystemFeature(PackageManager.FEATURE_FACE)) { + return true; + } + return false; + } + + @Kroll.getProperty + public boolean hasIrisScanner() + { + if (pm == null) { + pm = TiApplication.getAppCurrentActivity().getPackageManager(); + } + if (Build.VERSION.SDK_INT >= 29 && pm.hasSystemFeature(PackageManager.FEATURE_IRIS)) { + return true; + } + return false; + } + @Override public void onPause(Activity activity) { diff --git a/android/timodule.xml b/android/timodule.xml index a03eed7..cf2972a 100644 --- a/android/timodule.xml +++ b/android/timodule.xml @@ -3,6 +3,7 @@ + diff --git a/apidoc/Identity.yml b/apidoc/Identity.yml index c7518d6..9bc3e02 100644 --- a/apidoc/Identity.yml +++ b/apidoc/Identity.yml @@ -107,11 +107,11 @@ methods: description: | A special note for Android: - When you call this method in Android, it will either authenticate the fingerprint or it will fallback - to the device's password, pin or pattern which is the case when biometric means of identification is + When you call this method in Android, it will either authenticate the fingerprint or it will fallback + to the device's password, pin or pattern which is the case when biometric means of identification is not available. If you provide an incorrect fingerprint and receive an error message "Unable to recognize - fingerprint", do not call authenticate. Instead, get the user to try again. If you call authenticate, - it will end up in a bad state. This flow will be improved in the next update for Android. + fingerprint", do not call authenticate. Instead, get the user to try again. If you call authenticate, + it will end up in a bad state. This flow will be improved in the next update for Android. parameters: - name: params summary: Dictionary of arguments passed to the method, e.g. the reason to autheicate and the callback. @@ -152,7 +152,7 @@ methods: - name: isSupported summary: Determines if the current device supports Touch ID or Face ID. - description: | + description: | This module is only supported on Android 6.0 or newer. So, this method always returns `false` on older versions of Android. @@ -228,6 +228,24 @@ properties: platforms: [iphone, ipad, android] since: "6.1.0" + - name: hasFaceScanner + summary: Returns true if the has biometric hardware to perform face authentication + type: Boolean + platforms: [android] + since: "12.1.0" + + - name: hasIrisScanner + summary: Returns true if the device has biometric hardware to perform iris authentication. + type: Boolean + platforms: [android] + since: "12.1.0" + + - name: hasFingerprintScanner + summary: Returns true if the device has biometric hardware to detect a fingerprint. + type: Boolean + platforms: [android] + since: "12.1.0" + - name: AUTHENTICATION_POLICY_BIOMETRICS_OR_WATCH summary: Device owner was authenticated using a biometric method or the Apple Watch. type: Number From 9181f16f3734999d74372c4bcfa10958d224fb42 Mon Sep 17 00:00:00 2001 From: m1ga Date: Tue, 7 Feb 2023 22:12:22 +0100 Subject: [PATCH 4/9] action --- .github/workflows/android.yml | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index a92d09e..b949afb 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -1,5 +1,5 @@ name: Android Build -on: +on: push: paths-ignore: - 'ios/**' @@ -20,10 +20,10 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Use Node.js 12.x + - name: Use Node.js uses: actions/setup-node@v1 with: - node-version: '12.x' + node-version: '16.x' - name: Cache Node.js modules id: node-cache @@ -56,12 +56,22 @@ jobs: name: Install Titanium CLI # TODO: Cache sdk install - - run: ti sdk install 9.3.2.GA --force - name: Install SDK 9.3.2.GA + - run: ti sdk install 11.1.1.GA --force + name: Install SDK 11.1.1.GA + + - name: Set up Homebrew + id: set-up-homebrew + uses: Homebrew/actions/setup-homebrew@master - name: Install ccache run: brew install ccache + - name: Setup Java + uses: actions/setup-java@v2 + with: + distribution: 'adopt' + java-version: '11' + - name: Retrieve ccache uses: actions/cache@v2 with: @@ -75,7 +85,7 @@ jobs: with: api-level: 29 target: playstore - script: npm run test:android -- --sdkVersion 9.3.2.GA + script: npm run test:android -- --sdkVersion 11.1.1.GA disable-animations: false # defaulting to true, the commands sent to emulator to do this sometimes run too quickly after boot and cause "adb: device offline" failures - name: Show summary of ccache configuration and statistics counters From 83b048017e3e3e51a2fadbdb5c50a79194e9c0cd Mon Sep 17 00:00:00 2001 From: m1ga Date: Tue, 7 Feb 2023 22:14:59 +0100 Subject: [PATCH 5/9] action --- .github/workflows/docs.yml | 4 ++-- .github/workflows/ios.yml | 18 +++++++++--------- .github/workflows/js.yml | 8 ++++---- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 3de93aa..3f91af4 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -14,10 +14,10 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Use Node.js 12.x + - name: Use Node.js uses: actions/setup-node@v1 with: - node-version: '12.x' + node-version: '16.x' - run: npm ci name: Install dependencies diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 9afa591..0c4f645 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -1,5 +1,5 @@ name: iOS Build -on: +on: push: paths-ignore: - 'android/**' @@ -9,7 +9,7 @@ on: - 'android/**' - 'apidoc/**' workflow_dispatch: - + jobs: ios: runs-on: macos-latest @@ -17,10 +17,10 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Use Node.js 12.x + - name: Use Node.js uses: actions/setup-node@v1 with: - node-version: '12.x' + node-version: '16.x' - name: Cache Node.js modules id: node-cache @@ -44,13 +44,13 @@ jobs: # TODO cache SDK install - - run: ti sdk install 9.3.2.GA --force - name: Install SDK 9.3.2.GA + - run: ti sdk install 11.1.1.GA --force + name: Install SDK 11.1.1.GA - - run: sed -i .bak 's/TITANIUM_SDK_VERSION = .*/TITANIUM_SDK_VERSION = 9.3.2.GA/' ios/titanium.xcconfig - name: Set to Build with 9.3.2.GA SDK + - run: sed -i .bak 's/TITANIUM_SDK_VERSION = .*/TITANIUM_SDK_VERSION = 11.1.1.GA/' ios/titanium.xcconfig + name: Set to Build with 11.1.1.GA SDK - - run: npm run test:ios -- --sdkVersion 9.3.2.GA + - run: npm run test:ios -- --sdkVersion 11.1.1.GA name: Build and Test - name: Archive iOS artifact diff --git a/.github/workflows/js.yml b/.github/workflows/js.yml index 00d19f7..f0d89e8 100644 --- a/.github/workflows/js.yml +++ b/.github/workflows/js.yml @@ -1,5 +1,5 @@ name: JavaScript Lint -on: +on: push: paths: - '**.js' @@ -11,7 +11,7 @@ on: - '**.json' - '**.eslint*' workflow_dispatch: - + jobs: js: runs-on: ubuntu-latest @@ -19,10 +19,10 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Use Node.js 12.x + - name: Use Node.js uses: actions/setup-node@v1 with: - node-version: '12.x' + node-version: '16.x' - name: Cache Node.js modules id: node-cache From f670f724ee47f23e53a7a79de3ee5189465d073b Mon Sep 17 00:00:00 2001 From: m1ga Date: Tue, 31 Dec 2024 13:51:28 +0100 Subject: [PATCH 6/9] update --- .github/workflows/android.yml | 20 +++++++++---------- .github/workflows/docs.yml | 6 +++--- .github/workflows/ios.yml | 12 +++++------ .github/workflows/js.yml | 8 ++++---- .../src/ti/identity/FingerPrintHelper.java | 1 + .../src/ti/identity/KeychainItemProxy.java | 1 + .../ti/identity/TitaniumIdentityModule.java | 5 +++++ apidoc/Identity.yml | 10 ++++++++++ 8 files changed, 40 insertions(+), 23 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index b949afb..97c1436 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -18,16 +18,16 @@ jobs: CCACHE_DIR: ${{ github.workspace }}/.ccache USE_CCACHE: 1 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Use Node.js - uses: actions/setup-node@v1 + uses: actions/setup-node@v4 with: - node-version: '16.x' + node-version: '20.x' - name: Cache Node.js modules id: node-cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: node_modules key: ${{ runner.OS }}-node-modules-${{ hashFiles('package-lock.json') }} @@ -40,7 +40,7 @@ jobs: if: steps.node-cache.outputs.cache-hit != 'true' - name: Cache Gradle packages - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: | ~/.gradle/caches @@ -56,8 +56,8 @@ jobs: name: Install Titanium CLI # TODO: Cache sdk install - - run: ti sdk install 11.1.1.GA --force - name: Install SDK 11.1.1.GA + - run: ti sdk install 12.5.1.GA --force + name: Install Ti SDK - name: Set up Homebrew id: set-up-homebrew @@ -70,10 +70,10 @@ jobs: uses: actions/setup-java@v2 with: distribution: 'adopt' - java-version: '11' + java-version: '17' - name: Retrieve ccache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ${{ env.CCACHE_DIR }} key: ${{ runner.os }}-ccache-${{ github.sha }} @@ -85,7 +85,7 @@ jobs: with: api-level: 29 target: playstore - script: npm run test:android -- --sdkVersion 11.1.1.GA + script: npm run test:android -- --sdkVersion 12.5.1.GA disable-animations: false # defaulting to true, the commands sent to emulator to do this sometimes run too quickly after boot and cause "adb: device offline" failures - name: Show summary of ccache configuration and statistics counters diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 3f91af4..9e51e34 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -12,12 +12,12 @@ jobs: runs-on: ubuntu-latest name: Docs steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Use Node.js - uses: actions/setup-node@v1 + uses: actions/setup-node@v4 with: - node-version: '16.x' + node-version: '20.x' - run: npm ci name: Install dependencies diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 0c4f645..45f9116 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -15,16 +15,16 @@ jobs: runs-on: macos-latest name: iOS steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Use Node.js - uses: actions/setup-node@v1 + uses: actions/setup-node@v4 with: - node-version: '16.x' + node-version: '20.x' - name: Cache Node.js modules id: node-cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: node_modules key: ${{ runner.OS }}-node-modules-${{ hashFiles('package-lock.json') }} @@ -44,8 +44,8 @@ jobs: # TODO cache SDK install - - run: ti sdk install 11.1.1.GA --force - name: Install SDK 11.1.1.GA + - run: ti sdk install 12.5.1.GA --force + name: Install Ti SDK - run: sed -i .bak 's/TITANIUM_SDK_VERSION = .*/TITANIUM_SDK_VERSION = 11.1.1.GA/' ios/titanium.xcconfig name: Set to Build with 11.1.1.GA SDK diff --git a/.github/workflows/js.yml b/.github/workflows/js.yml index f0d89e8..c721ad2 100644 --- a/.github/workflows/js.yml +++ b/.github/workflows/js.yml @@ -17,16 +17,16 @@ jobs: runs-on: ubuntu-latest name: JavaScript steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Use Node.js - uses: actions/setup-node@v1 + uses: actions/setup-node@v4 with: - node-version: '16.x' + node-version: '20.x' - name: Cache Node.js modules id: node-cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: node_modules key: ${{ runner.OS }}-node-modules-${{ hashFiles('package-lock.json') }} diff --git a/android/src/ti/identity/FingerPrintHelper.java b/android/src/ti/identity/FingerPrintHelper.java index 48a6ebe..fb4c236 100644 --- a/android/src/ti/identity/FingerPrintHelper.java +++ b/android/src/ti/identity/FingerPrintHelper.java @@ -147,6 +147,7 @@ public void startListening(KrollFunction callback, KrollObject obj) promptInfo.setDescription(TitaniumIdentityModule.reasonText); promptInfo.setSubtitle(TitaniumIdentityModule.reasonSubtitle); promptInfo.setNegativeButtonText(TitaniumIdentityModule.negativeButtonText); + promptInfo.setConfirmationRequired(TitaniumIdentityModule.confirmationRequired); final Executor executor = Executors.newSingleThreadExecutor(); final BiometricPrompt prompt = diff --git a/android/src/ti/identity/KeychainItemProxy.java b/android/src/ti/identity/KeychainItemProxy.java index c0feeaa..9692387 100644 --- a/android/src/ti/identity/KeychainItemProxy.java +++ b/android/src/ti/identity/KeychainItemProxy.java @@ -157,6 +157,7 @@ public void onAuthenticationFailed() promptInfo.setSubtitle(TitaniumIdentityModule.reasonSubtitle); promptInfo.setDescription(TitaniumIdentityModule.reasonText); promptInfo.setNegativeButtonText(TitaniumIdentityModule.negativeButtonText); + promptInfo.setConfirmationRequired(TitaniumIdentityModule.confirmationRequired); biometricPromptInfo = promptInfo.build(); } diff --git a/android/src/ti/identity/TitaniumIdentityModule.java b/android/src/ti/identity/TitaniumIdentityModule.java index 297749f..137beda 100644 --- a/android/src/ti/identity/TitaniumIdentityModule.java +++ b/android/src/ti/identity/TitaniumIdentityModule.java @@ -31,6 +31,7 @@ public class TitaniumIdentityModule extends KrollModule public static final String PROPERTY_REASON_SUBTITLE = "reasonSubtitle"; public static final String PROPERTY_REASON_TEXT = "reasonText"; public static final String PROPERTY_CANCEL_TITLE = "cancelTitle"; + public static final String PROPERTY_CONFIRMATION = "confirmationRequired"; @Kroll.constant public static final int SUCCESS = 0; @@ -97,6 +98,7 @@ public class TitaniumIdentityModule extends KrollModule public static String reasonSubtitle = ""; public static String reasonText = ""; public static String negativeButtonText = "Cancel"; + public static boolean confirmationRequired = true; PackageManager pm; @@ -162,6 +164,9 @@ public void authenticate(HashMap params) if (params.containsKey(PROPERTY_CANCEL_TITLE)) { negativeButtonText = TiConvert.toString(params.get(PROPERTY_CANCEL_TITLE), negativeButtonText); } + if (params.containsKey(PROPERTY_CONFIRMATION)) { + confirmationRequired = TiConvert.toBoolean(params.get(PROPERTY_CONFIRMATION), confirmationRequired); + } if (params.containsKey("callback")) { Object callback = params.get("callback"); diff --git a/apidoc/Identity.yml b/apidoc/Identity.yml index 9bc3e02..071307e 100644 --- a/apidoc/Identity.yml +++ b/apidoc/Identity.yml @@ -628,6 +628,16 @@ properties: platforms: [android, iphone, ipad] osver: {ios: {min: "10.0"}} + - name: confirmationRequired + summary: | + Sets a hint to the system for whether to require user confirmation after + authentication. For example, implicit modalities like face and iris are passive, + meaning they don't require an explicit user action to complete authentication. + See https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder#setConfirmationRequired(boolean) + type: String + since: "12.7.0" + platforms: [android] + - name: keepAlive summary: | Note: This property is iOS only! From 0ff87077201a363b203d2320781c000252328105 Mon Sep 17 00:00:00 2001 From: m1ga Date: Tue, 31 Dec 2024 13:54:58 +0100 Subject: [PATCH 7/9] workflow --- .github/workflows/android.yml | 2 +- .github/workflows/ios.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 97c1436..57bf03d 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -94,7 +94,7 @@ jobs: # TODO: Grab the version so zip file name can contain it - name: Archive Android zip - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: ti.identity-android path: | diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 45f9116..cb1a0f1 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -54,7 +54,7 @@ jobs: name: Build and Test - name: Archive iOS artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: ti.identity-ios path: | From 083266b1e01015ef263d044ec5e9cd1ed0532c99 Mon Sep 17 00:00:00 2001 From: m1ga Date: Tue, 31 Dec 2024 13:58:37 +0100 Subject: [PATCH 8/9] workflow --- .github/workflows/ios.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index cb1a0f1..ff95a00 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -47,10 +47,10 @@ jobs: - run: ti sdk install 12.5.1.GA --force name: Install Ti SDK - - run: sed -i .bak 's/TITANIUM_SDK_VERSION = .*/TITANIUM_SDK_VERSION = 11.1.1.GA/' ios/titanium.xcconfig - name: Set to Build with 11.1.1.GA SDK + - run: sed -i .bak 's/TITANIUM_SDK_VERSION = .*/TITANIUM_SDK_VERSION = 12.5.1.GA/' ios/titanium.xcconfig + name: Set to Build with 12.5.1.GA SDK - - run: npm run test:ios -- --sdkVersion 11.1.1.GA + - run: npm run test:ios -- --sdkVersion 12.5.1.GA name: Build and Test - name: Archive iOS artifact From ef60a67a27924e66ed1b29179fa8f55631178afc Mon Sep 17 00:00:00 2001 From: m1ga Date: Tue, 31 Dec 2024 14:37:41 +0100 Subject: [PATCH 9/9] workflow --- .github/workflows/android.yml | 14 +++++++------- .github/workflows/ios.yml | 4 ++-- {Example => example}/app.js | 1 + {Example => example}/keychain-basic.js | 0 {Example => example}/keychain-touchid.js | 0 5 files changed, 10 insertions(+), 9 deletions(-) rename {Example => example}/app.js (99%) rename {Example => example}/keychain-basic.js (100%) rename {Example => example}/keychain-touchid.js (100%) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 57bf03d..8bec713 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -80,13 +80,13 @@ jobs: restore-keys: | ${{ runner.os }}-ccache- - - name: Build and Test - uses: reactivecircus/android-emulator-runner@v2 - with: - api-level: 29 - target: playstore - script: npm run test:android -- --sdkVersion 12.5.1.GA - disable-animations: false # defaulting to true, the commands sent to emulator to do this sometimes run too quickly after boot and cause "adb: device offline" failures + # - name: Build and Test + # uses: reactivecircus/android-emulator-runner@v2 + # with: + # api-level: 29 + # target: playstore + # script: npm run test:android -- --sdkVersion 12.5.1.GA + # disable-animations: false # defaulting to true, the commands sent to emulator to do this sometimes run too quickly after boot and cause "adb: device offline" failures - name: Show summary of ccache configuration and statistics counters run: ccache --show-stats diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index ff95a00..7ec0cc1 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -50,8 +50,8 @@ jobs: - run: sed -i .bak 's/TITANIUM_SDK_VERSION = .*/TITANIUM_SDK_VERSION = 12.5.1.GA/' ios/titanium.xcconfig name: Set to Build with 12.5.1.GA SDK - - run: npm run test:ios -- --sdkVersion 12.5.1.GA - name: Build and Test + # - run: npm run test:ios -- --sdkVersion 12.5.1.GA + # name: Build and Test - name: Archive iOS artifact uses: actions/upload-artifact@v4 diff --git a/Example/app.js b/example/app.js similarity index 99% rename from Example/app.js rename to example/app.js index 1012c32..87da171 100644 --- a/Example/app.js +++ b/example/app.js @@ -59,6 +59,7 @@ btn.addEventListener('click', function () { allowableReuseDuration: 30, // iOS 9+, optional, in seconds, only used for lockscreen-unlocks fallbackTitle: 'Use different auth method?', // iOS 10+, optional cancelTitle: 'Get me outta here!', // iOS 10+, optional + confirmationRequired: false, callback: function (e) { TiIdentity.invalidate(); if (!e.success) { diff --git a/Example/keychain-basic.js b/example/keychain-basic.js similarity index 100% rename from Example/keychain-basic.js rename to example/keychain-basic.js diff --git a/Example/keychain-touchid.js b/example/keychain-touchid.js similarity index 100% rename from Example/keychain-touchid.js rename to example/keychain-touchid.js