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

no prompts shown for face id auth on simulator #38

Open
lsanil opened this issue Feb 18, 2019 · 5 comments
Open

no prompts shown for face id auth on simulator #38

lsanil opened this issue Feb 18, 2019 · 5 comments

Comments

@lsanil
Copy link

lsanil commented Feb 18, 2019

Thank you for great library. Learned a lot.

I am trying the sample on iOS simulator via XCode Version 10.1 (10B61). I configured Face ID in simulator. But I can't get Face ID prompt working for both sign or decrypt operations. Has anything changed recently in simulator behavior?

iOS device I selected in simulator: iPhoneXS Max
Xcode version: 10.1 (10B61)
Mac OSX version: macOS High Siera Version 10.13.6

@lsanil lsanil changed the title no prompts being shown for touch id auth on simulator no prompts shown for face id auth on simulator Feb 18, 2019
@hfossli
Copy link
Contributor

hfossli commented Feb 18, 2019

How does your config look? Can you share some code?

@lsanil
Copy link
Author

lsanil commented Feb 18, 2019

sure, thank you for your reply. I downloaded the sample and tried on iOS simulator. Here is the config

 struct Shared {
        static let keypair: EllipticCurveKeyPair.Manager = {
            EllipticCurveKeyPair.logger = { print($0) }
            let publicAccessControl = EllipticCurveKeyPair.AccessControl(protection: kSecAttrAccessibleAlwaysThisDeviceOnly, flags: [])
            let privateAccessControl = EllipticCurveKeyPair.AccessControl(protection: kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly, flags: {
                return EllipticCurveKeyPair.Device.hasSecureEnclave ? [.userPresence, .privateKeyUsage] : [.userPresence]
            }())
            let config = EllipticCurveKeyPair.Config(
                publicLabel: "no.agens.sign.public",
                privateLabel: "no.agens.sign.private",
                operationPrompt: "Sign transaction",
                publicKeyAccessControl: publicAccessControl,
                privateKeyAccessControl: privateAccessControl,
                token: .secureEnclaveIfAvailable)
            return EllipticCurveKeyPair.Manager(config: config)
        }()
    }

@lsanil
Copy link
Author

lsanil commented Feb 22, 2019

it looks it is issue only on simulator, on real iOS device, see this working properly.

@hfossli
Copy link
Contributor

hfossli commented Feb 22, 2019

I don't remember if this is expected behavior. I think it is, but I am not entirely sure. What happens if you trigger LAContext methods on simulator? Does it show any UI?

@Ashokkumarakg123
Copy link

Ashokkumarakg123 commented Jun 16, 2021

What happens if you trigger LAContext methods on simulator? Does it show any UI?

yes it also appear on simulator.

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

3 participants