Closed mjmarathon closed 6 years ago
@mjmarathon nice work man, I will try to review it locally soon. I don't see any changes to the strings file and also the image for TouchID (fingerprint) in the UI remains the same, do you think it will be a good idea to change those too? Can we somehow check if the supported method is TouchID or FaceID?
@ziogaschr In the order of things you asked.
Hey @mjmarathon, sorry for the long wait. I am checking the code now.
Can you explain why have you replaced isCancellableAction
from PasscodeLockStateType
with PasscodeLockConfigurationType .allowsCancellation
. I don't think this is bad, but for this to work for all use cases we will have to make the PasscodeLockConfigurationType
copyable by implementing the NSCopying
, this way it might be easier for someone to change this or any value for a specific PIN display.
Although despite what we think, a lot of people are using this project already and we have to keep it backwards compatible, so this change will break all these apps. Such change, if needed, might be fine to be added in a next major release (v2.0).
For the rest methods that you've renamed TouchID
to Biometrics
, I liked them, but we can keep the old ones pointing to new ones, at least for v1.0 with a deprecation warning.
What do you think? Are you fine if I make changes to your PR or will you like to make them your own?
@mjmarathon Please check #54 for FaceID (based on your PR 👍 ). For the cancelable actions, please make a new PR explaining the reasons for it. :)
This pull request encompasses two issues.
With the release of iOS 11.0 Apple released FaceID. Fortunately all of the calls are identical to using TouchId so there weren't any changes needed there. However, the current property names and text on the view controller do not reflect that. They were changed to a more generic "Biometric Authentication" to better reflect functionality. A potential improvement for this is that as of iOS 11.0 the device can differentiate between which functionality the device supports and we could change the text of the button on the controller to reflect this.
Currently the only cancellable lock type is .remove which is done via the declaration of the type. This really doesn't make any sense. We should allow users to decide which locks are and are not cancellable. I have added a property to the PasscodeLockConfigurationType class which the view controller will key off of to show/hide the cancel button. Personally I think this makes more sense as the cancellation seems more like a configuration thing rather than a lock type thing.