Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In IOS 17, the plugin propably does not work properly #102

Open
meesha81 opened this issue Aug 23, 2023 · 7 comments
Open

In IOS 17, the plugin propably does not work properly #102

meesha81 opened this issue Aug 23, 2023 · 7 comments

Comments

@meesha81
Copy link

meesha81 commented Aug 23, 2023

Hi,
it looks like IOS 17 is not supported by the plugin at this time. We are using forked version Capgo, but we don't know if this is your issue. Is IOS 17 supported by your "original" plugin version?

We get an error:
Error: The operation couldn't be completed. (CapgoCapacitorNativeBiometric.NativeBiometric.KeyChainError error 0

when we call

        await NativeBiometric.setCredentials({
          username: credentials.email,
          password: credentials.password,
          server: APP_ID,
        });

It would be nice if the plugin supports the new IOS 17 as well.

Thank you for your interest.

@meesha81 meesha81 changed the title IOS 17 unsupported In IOS 17, the plugin does not work properly Aug 23, 2023
@meesha81 meesha81 changed the title In IOS 17, the plugin does not work properly In IOS 17, the plugin propably does not work properly Aug 23, 2023
@kito99
Copy link

kito99 commented Sep 13, 2023

We've run into this with the latest iOS 17 RC, but it's error 1 and it seems pretty inconsistent. Has anyone else seen this?

@AbidR-S2
Copy link

AbidR-S2 commented Dec 7, 2023

I've seen this on iOS 17 only.
setCredentials throws up an error when testing on an iPad 9th Gen (iPad OS 17).
No error on an iPad running iPad OS 16 or iPhones running iOS 16, and you can set credentials successfully.
I used a catch statement and collected the error:
Error: The operation couldn't be completed. (CapacitorNativeBiometric.NativeBiometric.KeychainError error 0.)

@v-rubas
Copy link

v-rubas commented Dec 12, 2023

Hi guys. There is a solution for how this plugin works on ios 17

In Xcode -> Info.plist.
Add -> Privacy - Face ID Usage entry
Value -> NSFaceIDUsageDescription
Save the changes

@AbidR-S2
Copy link

Hi, I'm pretty sure I tried that already and I was still getting the same error.
I have just this morning found a work around for this problem on iOS 17 as per this thread on the capgo fork of this plugin:
Cap-go#5

You need to deleteCredentials before you use setCredentials (even if you don't have any set yet). I have no more errors when I do this.

@laviealon
Copy link

laviealon commented Mar 20, 2024

Hi @AbidR-S2 , I get the error when I getCredentials as well, so your proposed fix doesn't really apply.

NativeBiometric getCredentials 123981411 ERROR MESSAGE: {"errorMessage":"The operation couldn’t be completed. (CapacitorNativeBiometric.NativeBiometric.KeychainError error 1.)","message":"The operation couldn’t be completed. (CapacitorNativeBiometric.NativeBiometric.KeychainError error 1.)"}

Any ideas?

@AbidR-S2
Copy link

That's weird, getCredentials is working for me once setCredentials is successful.

The KeychainError is different in your case too. Error 1 as opposed to error 0.

I can give you the code that I use to getCredentials if that helps:

try {
    savedCredentials = await NativeBiometric.getCredentials({
      server: constants.biometricsServerKey
    });
} catch (exception) {
      this.displayInvalidBiometricLoginAlert();
      return;
}

@laviealon
Copy link

@AbidR-S2 looks like that error is thrown when you try to getCredentials when none are set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants