d-32 / dmpasscode Goto Github PK
View Code? Open in Web Editor NEW:lock: Passcode screen with Touch ID support
License: MIT License
:lock: Passcode screen with Touch ID support
License: MIT License
After implementing DMPasscode in my project, iPhone 5S iOS 7 Simulator and iPad Air iOS 7 Simulator crashes on launch.
Console error:
dyld: Symbol not found: _objc_isAuto
Referenced from: /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/usr/lib/libobjc.A.dylib
in /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
(lldb)
I'm sure it has to do with TouchID (iPhone 5S and iPad Air) and iOS 7 (since iOS 8 doesn't crash).
I found this thread on stack overflow about it:
Have you experienced that ? Is it a xcode bug in Yosemite ?
Thanks
This is a great project, I love it and am working on including it with my app.
Would you be open to accepting a PR that changes the flow slightly when a user enters a mismatched passcode on the "Confirm" screen? Rather than dismissing the passcodeViewController, I'd like it to instead prompt the user again for a new passcode, with an error message indicating that the "passcodes did not match."
this is exactly what i was looking for. but i couldnt find the files please help me
Hi,
When i setup the Passcode/Touch ID successfully and then uninstall the app, when i do install it again the Passcode/Touch ID is already set up !
How can i remove the keychain before uninstalling the app ?
Or any other solution for this behavior.....
Hi,
i am getting Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Non-empty localizedReason must be provided.'. I have the entry for "dmpasscode_touchid_reason" in my localisable strings, but i think it uses the one from the bundle.
I am not using cocoa pods, i've copied the files.
We could pass the reason to the Singleton and the problem is solved. Is this one known issue?
regards Ivan
I've been getting this error recently.
DMPasscode[10602:1010246] DMKeychain failed to store data for key 'passcode', error: -34018
Non-empty localizedReason must be provided.
app is crashing on show passcode
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Non-empty localizedReason must be provided.'
In this method the delegate should be called in the completion block, to make it possible to present new views right away.
I'm trying to figure out how to disable fingerprint unlock.
Any idea how i could achieve this?
Would you consider exposing the ability to set the modalPresentationStyle on the DMPasscodeInternalNavigationController somehow? I don't really have a good idea how to do it, but I would like to set it to UIModalPresentationFormSheet
Playing around with the code, I get my desired behavior if I set the modalPresentationStyle here: https://github.com/D-32/DMPasscode/blob/master/Pod/Classes/DMPasscode.m#L137
Thoughts?
It appears that the case statements aren't catching all the error codes, I've fixed it locally by changing the following lines in the DMPasscode.m file:
case LAErrorAuthenticationFailed: LAErrorUserCancel: LAErrorSystemCancel:
_completion(NO);
break;
case LAErrorUserFallback: LAErrorPasscodeNotSet: LAErrorTouchIDNotAvailable: LAErrorTouchIDNotEnrolled:
[self openPasscodeWithMode:1 viewController:viewController];
break;
to
case LAErrorAuthenticationFailed:
case LAErrorUserCancel:
case LAErrorSystemCancel:
_completion(NO);
break;
case LAErrorUserFallback:
case LAErrorPasscodeNotSet:
case LAErrorTouchIDNotAvailable:
case LAErrorTouchIDNotEnrolled:
[self openPasscodeWithMode:1 viewController:viewController];
break;
Not in a position to submit a pull request right now but will do so when I get chance (unless someone else gets there first as it may take me a few days!)
Right now, when the user attempts to unlock the screen, and they enter the wrong passcode twice, the text incorrectly says, "1 Attempts Left" - it should be "1 Attempt Left"
Is there a way to close the passcode view manually?
I noticed a bug in how I'm handling the "cancel" flow when interacting with TouchId. With the way the switch statement is setup, when canceling TouchId, it was being handled as a failed authentication. LAErrorUserCancel and LAErrorSystemCancel need to explicitly call the completion block with a nil NSError
Hi,
I've setup al the functions etc. but there is a bug and i can't figure it out.
On Ipad everything works fine, i can setup and check the passcode, however on iphone i get the check screen twice which is weird because there is nothing different for iphone, nothing extra or something.
(my app is for iphone and ipad combined with auto layout)
Thanks in advance
I ddnt have this problem while developing the app. But now I get this error when I run the project on the device and also the simulator
Can't find keyplane that supports type 4 for keyboard iPhone-Portrait-NumberPad; using 3876877096_Portrait_iPhone-Simple-Pad_Default
Right now, the completion block passes a binary parameter - either success or failure. If the user "cancels" the DMPasscode screen, "NO" is returned with the completion block. I have a use case where I need to differentiate Cancelled versus Failed, and there's no way to do that now. I put a bunch of thought into DMPasscode and couldn't really figure out a good non-API-breaking change to do that. I like the idea of either 1) a second parameter with the completion block of type NSError, or 2) change what the completion block returns from BOOL to a custom Enum with 3 possible values: success, fail, or cancelled (that would be the more Swifty/functional way, right :P ). The only drawback with those is that there API breaking changes - to move away from a simple Bool returned. Thoughts?
First of all just wanted to say this is an awesome library.
Add this method to DMPasscodeInternalViewController
-(UIStatusBarStyle)preferredStatusBarStyle{
return _config.statusBarStyle;
}
and remove line 39:
self.navigationController.navigationBar.barStyle = _config.statusBarStyle;
If we take your example project and a method like this:
-(void)applicationDidBecomeActive:(UIApplication *)application{
if ([DMPasscode isPasscodeSet]) {
[DMPasscode showPasscodeInViewController:self.window.rootViewController completion:^(BOOL success) {
if (success) {
NSLog(@":)");
}else{
NSLog(@":(");
}
}];
}
}
It causes an endless loop of touch ID windows. the stack trace seems to show that when touch ID dismisses this sends an applicationDidBecomeActive Notification but that can't be right.
Right now, DMPasscodeInternalViewController does not use autolayout. As a result the UI elements are not centered on screen if you rotate the device while the passcode view controller is visible, and depending on how you modify the localized strings, if they get too big, the UILabels don't grow.
This is another one I need, and I'm working on a fix now. If you're open to it, I can submit a PR. Thanks again.
Another slight improvement to the UX to match how iOS pin-setup happens. The Error message shouldn't stick around on the Confirm screen.
How to do this ? can you help me i am a beginner:
"add the following line to your Podfile:"
Hi, i found out that when i reinstall my app (install, remove, install) that the passcode is still in keychain, this is, in my case not wanted. I know i can remove the passcode that is not the problem. but if i reinstall the app it breaks because there should be no passcode available, only the setup should be available.
Any idea how i can remove the passcode from the keychain if the app is freshly installed?
Hi, i have imported the pod into my swift project but i'm not familiar with objective-c.
How can i use these functions (assign setup to correct controller, change styles etc. )
Thanks in advance
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.