Giter VIP home page Giter VIP logo

kkpasscodelock's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kkpasscodelock's Issues

Unbalanced calls to begin/end appearance transitions

Hi,
the demo app is showing this warning when the passlock is shown after launch:

KKPasscodeLockDemo[5810:11603] Application windows are expected to have a root view controller at the end of application launch
KKPasscodeLockDemo[5810:11603] Unbalanced calls to begin/end appearance transitions for <UINavigationController: 0x1154a3b0>.

Couldn't call lockscreen from app delegate

I tried to use your KKPasscodeLock in my Project. Incorporated the settings view controller and passcode view controller successfully.

So far managed to setup everything. Can set passcode lock and can change as well.

But when i try to set in AppDelegate to display lock screen, it doesn't show up. therefore no passcode being asked after set.

Appreciate if someone could help.

below is my code in appdelegate.m

  • (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    {

    [self customizeAppearance];
    [self configureiPhoneTabBar];
    // [MKiCloudSync start];

    [[KKPasscodeLock sharedLock] setDefaultSettings];
    [KKPasscodeLock sharedLock].eraseOption = NO;

    return YES;

}

  • (void)applicationDidBecomeActive:(UIApplication *)application
    {
    if ([[KKPasscodeLock sharedLock] isPasscodeRequired]) {
    KKPasscodeViewController *vc = [[KKPasscodeViewController alloc] initWithNibName:nil bundle:nil];
    vc.mode = KKPasscodeModeEnter;
    vc.delegate = self;

    dispatch_async(dispatch_get_main_queue(),^ {
        UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:vc];
    
        nav.navigationBar.tintColor = _navigationController.navigationBar.tintColor;
        nav.navigationBar.translucent = _navigationController.navigationBar.translucent;
        nav.navigationBar.opaque = _navigationController.navigationBar.opaque;
        nav.navigationBar.barStyle = _navigationController.navigationBar.barStyle;
    
    
        [_navigationController presentViewController:nav animated:YES completion:nil];
    }); 
    

    }
    }

  • (void)shouldEraseApplicationData:(KKPasscodeViewController*)viewController
    {
    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"" message:@"You have entered an incorrect passcode too many times. All account data in this app has been deleted." delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
    [alert show];
    }

  • (void)didPasscodeEnteredIncorrectly:(KKPasscodeViewController*)viewController
    {
    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"" message:@"You have entered an incorrect passcode too many times." delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
    [alert show];
    }

Add landscape support on iPhone

With the new rotation scheme in iOS6, tabBar-based applications that support landscape now need to support landscape in all views. However, there are some serious issues with the passcode lock in landscape (partially obscured views, view covered by the keyboard, …)

I am currently hacking around, trying to make things work…

See the https://github.com/omz/AppSales-Mobile for an example where KKPasscodeLock now is being displayed in landscape on the iPhone.

Passcode asked again even if the app is deleted and reinstalled

I noticed that if you have the passcode ON and you delete the app and then reinstall it again, at the first launch the passcode is requested again.
This is because the passcode is still saved inside of the keychain.
I solved in this way: because my app had already a flag that said when it was launched for the first time, I used this flag also to check the existence of the passcode in the keychain. If it exists I delete it.

Vertical centering of passcode view iPad Mini, iPhone 4s, iPhone 5

Views are not properly vertically aligned in case of set Passcode, change Passcode and enter Passcode modes.
In first case (set Passcode), "Enter a passcode" label is hidden behind navigation bar.
Also the places of that label and boxes changes based on different modes. The behavior should be similar in every case.

Needs a custom keyboard on iPad

The default passcode controller uses a custom keyboard on iPad to prevent it from being dismissed and to prevent the user from entering the passcode as $$$$.

Crash on iOS 10

Hi,

the crash below happens when the app is compiled using XCode 8 / for iOS 10 and I'm starting on simulator

2016-09-13 19:33:09.270 ControlInt[3137:36979] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Recieved -34018 from SecItemAdd!'
*** First throw call stack:
(
0 CoreFoundation 0x00000001116b834b exceptionPreprocess + 171
1 libobjc.A.dylib 0x00000001110d321e objc_exception_throw + 48
2 CoreFoundation 0x00000001116bc442 +[NSException raise:format:arguments:] + 98
3 Foundation 0x000000010d52cedd -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 195
4 ControlInt 0x000000010a6b4d10 +[KKKeychain setString:forKey:] + 832
5 ControlInt 0x000000010a71b3c2 -[KKPasscodeLock setDefaultSettings] + 66
6 ControlInt 0x000000010a84b46f -[PPAppDelegate application:didFinishLaunchingWithOptions:] + 1615
7 UIKit 0x000000010ee8a68e -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 290
8 UIKit 0x000000010ee8c013 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4236
9 UIKit 0x000000010ee923b9 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1731
10 UIKit 0x000000010ee8f539 -[UIApplication workspaceDidEndTransaction:] + 188
11 FrontBoardServices 0x0000000112ea076b __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK
+ 24
12 FrontBoardServices 0x0000000112ea05e4 -[FBSSerialQueue _performNext] + 189
13 FrontBoardServices 0x0000000112ea096d -[FBSSerialQueue _performNextFromRunLoopSource] + 45
14 CoreFoundation 0x000000011165d311 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17
15 CoreFoundation 0x000000011164259c __CFRunLoopDoSources0 + 556
16 CoreFoundation 0x0000000111641a86 __CFRunLoopRun + 918
17 CoreFoundation 0x0000000111641494 CFRunLoopRunSpecific + 420
18 UIKit 0x000000010ee8ddb6 -[UIApplication _run] + 434
19 UIKit 0x000000010ee93f34 UIApplicationMain + 159
20 ControlInt 0x000000010a710c0f main + 111
21 libdyld.dylib 0x0000000111c4068d start + 1
)

Simulate iOS numpad

What about using these images (from the iOS framework):
devicelockkeypad iphone
devicelockkeypad ipad
devicelockkeypadpressed iphone

instead of the hidden textfields and standard keyboard? this will look great on the ipad where a numpad keyboard it's not available.

Vertical centering of passcode boxes

On iPhone 4S and before, the passcode entry boxes are nicely vertically centered within the available area. However on iPhone 5 there is more space below than above.

It feels to me that the boxes would look best if they were always be vertically centered to the parent view.

kkpasscode on iphone 5

kkPasscode enabled on everyviewcontroller

Hi @aporat

I have implemented your project in a little sample project I am working on.

Would it be possible to have the lockscreen implemented on everyviewcontroller? i.e. not just the rootviewcontroller? so no matter where you last got into when using the app, the app is still fully secure?..

Please let me know your thoughts..thanks again for making this open source, cheers.

Passcode Storage adapters

It would be great to support multiple Passcode Storage types like: Keychain, NSUserDefaults, etc.

Why using NSUserDefaults?
Read the 'Forgot Passcode on iPhone / iPad' section here: http://dayoneapp.com/support/passwords/

I would have done this by myself but unfortunately I can't at this moment :(

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.