DotLock Easy Controller With Spy Picture control

DotLock Easy Controller With Spy Picture control

DotLock implements the Android lock screen interaction on the iPhone and optionally captures a photo of unauthorized users entering wrong passwords.

Add an Android style phone unlock interaction to your iOS applications.

alt text alt text

With LTDotLock, you will not only have a "dot" keyboard that delegates you everything (and let you make all the work).

LTDotLock allows you to :

  • Lock the screen with 1 line of code
  • Handle 3 different passwords capable of unlocking the screen
  • Choose from a 3x3 or a 4x4 unlock dot grid
  • Auto-set & auto-save any password in one line of code
  • Customize every color as it is a 100% code designed component
  • Integrates with LTQuickPhotoCapture for taking a picture of a person entering a wrong password (by uncommenting one line of code)

You can view a video demonstration of the example application included in the source code here : LTDotLock Demo

Hide

Installation

To install LTDotLock into your own project, simply drag & drop the folder LTDotLock into it :

alt text

Then, ensure to add the QuartzCore framework into your framework list :

alt text

LTDotLock offer an optional "special functionnality" : the ability to use the front (or back if not available) camera of the iPhone, iPad or iPod touch to get a picture of the person trying to enter an invalid password.

And of course, this functionnality has been added through the component in a very easy way.

If you want to take benefits of this functionnality, you need to get the component named LTQuickPhotoCapture and add it to your project as specified into its own documentation :

alt text

Also, you must take care of the needed frameworks for this specific component :

alt text

Finally, you’ll have to uncomment the #define useQuickPhotoCapture line into LTDotLockController.h :

alt text

Hide

How to & FAQ

Quick reminder :


LTDotLock can work in two different ways : "standalone" mode or "manual" mode.

In standalone mode, you’ve got methods asking to save/retrieve passwords in UserPreferences, and to ask for password creation as well as for password lock.

In manual mode, you can set by yourself the passwords the component must wait for, and handle all returning information.

Let’s do it.


How to lock and ask for a password from my viewController ?


If the only thing you want to do is "locking the screen" by asking a password that has been previously automaticaly saved by LTDotLock, then you can use this line to request a DotLock Screen :

[LTDotLockController showAsModalInRootController];

Remember to import the header of the DotLock Controller in your .h file :

#import "LTDotLockController.h"

Calling this method ask LTDotLock to find the actual root controller and to present it a new view controller in modal mode, without any kind of transition.

Finding and using the root view controller ensure you that if you’re actually using special stuffs like UITabBarController, the view will always goes in front of it.


How to ensure that the screen is automaticaly locked when the user quit and return?


Easy way, go to your AppDelegate.h and add the following line

#import "LTDotLockController.h"

Then go finding the method applicationWillResignActive in your appDelegate.m or create it and add the request to lock the screen :

- (void)applicationWillResignActive:(UIApplication *)application {
    [LTDotLockController showAsModalInRootController];
}

How to ask the recording of a password in the userPreferences ?


Assuming you’ve included the LTDotLockController.h header in your .h file, do the following :

LTDotLockController *dotlock = [LTDotLockController showAsModalInRootController];

This will create an object pointing to the shown viewController.

Then, you’ve go 3 different methods givin you the ability to save & handle 3 different passwords :

For the "Root" Password :

[dotlock recordAndSaveRootPassword];

For the "User" Password :

[dotlock recordAndSaveUserPassword];

For the "Guest" Password :

[dotlock recordAndSaveGuestPassword];

How to get an image of the recorded password to send it by email ?


First, your view controller must be a delegate of LTDotLock.

In your .h file, add the following delegate :

LTDotLockControllerDelegate

Second, initialize the component in a way you can tell it that you’ll be its parent (and so it can assume that you want to get notified about averything) :

LTDotLockController *dotlock = [LTDotLockController showAsModalInRootController];
[dotlock setParent:self];

Now, tell LTDotLock that you want to get an image of every recorded password (in the password save mode, not in protection mode) :

[dotlock setReturnSettedImageOfPassword:YES];

Finally, you must implement one (or the three) of the delegates that informs you about the new setted password :

-(void)userPasswordSettedWithCode:(NSString *)code andImage:(UIImage *)image
-(void)guestPasswordSettedWithCode:(NSString *)code andImage:(UIImage *)image

-(void)rootPasswordSettedWithCode:(NSString *)code andImage:(UIImage *)image

You will then receive an UIImage showing the matrix keyboard with the password just like this sample :

alt text


Why does LTDotLock distinct 3 different passwords ?


We’ve seen in some applications the ability to create different environment regarding the fact that you enter a normal password, a "guest" password or an admin (root) password.

That’s the reason why we’ve implemented this possibility.

Of course, you can only use the "user" password & methods if this is the only functionality you’re looking for.


What means "Spy Capture" ?


Spy Capture is a functionnality that will allow you to get informed about the fact that someone entered a bad password, but with this feature and in that case, the front camera of the iPhone / iPad / iPod Touch will be used to take a picture and try to see the person in action. So you will be able to record the given image and show it to the real owner of the iOS device. Note that to use this functionnality, you must have acquire & install LTQuickPhotoCapture component.


Does LTDotLock handle different keyboard matrix ?


Yes, you’ve got the choice to ask for a 3x3 dots matrix or a 4x4 dots version.
The resulted password in 3x3 dots mode will come with numbers from 1 to 9, where the 4x4 version will give you numbers from 1 to 9 and letters from A to G

alt text alt text


I want to change the colors of the design, where are the images ?


There’s no image. LTDotLock is 100% code designed, that means that you’ve got methods to change every color of every details of the component.

alt text

See the methods of LTDotLockController to find the one allowing you to change the colors of your choice.


How to not use your view controller, I want to design my own but using the matrix


The matrix keyboard and its working system is declared into LTDotLockView.h & .m Fortunatly, we’ve created it in a way you can use it as a standalone and have your own view set as a delegate of it too, just the way we do with LTDotLockController.

Include LTDotLockView.h into your view controller Set your viewController as a delegate of LTDotLockDelegate Create an UIView from LTDotLockView Use the method setParent to tell the UIView that you’ll receive the delegate calls

Here are the methods you can use to control the view. They are named identicaly as for the LTDotLockController, so please refer to the methods & delegates details below for their explanation :

@property (nonatomic, retain) NSString *currentSequence;
@property (nonatomic, retain) NSString *userCode;
@property (nonatomic, retain) NSString *guestCode;
@property (nonatomic, retain) NSString *rootCode;

//::.. colors methods ..::
- (void)setGridColor:(UIColor *)color;
- (void)setSelectedPathColor:(UIColor *)color;
- (void)setMainColor:(UIColor *)color;
- (void)setDotColor:(UIColor *)color;
- (void)setTouchColor:(UIColor *)color;
- (void)setTouchedColor:(UIColor *)color;
- (void)setHighlightColor:(UIColor *)color;

- (UIColor *)gridColor;
- (UIColor *)selectedPathColor;
- (UIColor *)mainColor;
- (UIColor *)dotColor;
- (UIColor *)touchColor;
- (UIColor *)touchedColor;
- (UIColor *)highlightColor;

//::.. other important methods ..::
- (void)setParent:(NSObject *)_parent;
- (UIImage *)getCurrentPasswordSnapshot;
- (void)setRecordingMode:(BOOL)record;
- (void)setMatrixMode:(dotLockMatrix)mode;

Here are the delegate methods of LTDotLockView :

- (void)returnedCode:(NSString *)code;
- (void)userIdentifiedWithCode:(NSString *)code;
- (void)guestIdentifiedWithCode:(NSString *)code;
- (void)rootIdentifiedWithCode:(NSString *)code;
- (void)badPasswordEnteredWithCode:(NSString *)code;

How can I change the texts used by LTDotLockController ?


Texts on LTDotLockController uses the macro command NSLocalizedString to help you having them created into a .strings file and be able to handle localization on this viewController too.

Here are the different declared strings :

Text shown when asking for the password:

NSLocalizedString(@"Please enter your password", @"DotLock - Enter your password")

Text shown when setting a password, and waiting for its confirmation:

NSLocalizedString(@"Now confirm your password", @"DotLock - Password confirmation")

Text shown when asking to set the main (root) password:

NSLocalizedString(@"Please enter the main password", @"DotLock - Password setting for the root password")

Text shown when asking to set the normal (user) password:

NSLocalizedString(@"Please enter your password", @"DotLock - Password setting for the user password")

Text shown when asking to set the guest password:

NSLocalizedString(@"Please enter the guest password", @"DotLock - Password setting for the guest password")

Hide

Methods

Following are described the methods of LTDotLockController.


Colors methods


LTDotLock controller has been created in a 100% code design way. Following are the methods allowing you to change any kind of color of the dots & matrix :

- (void)setGridColor:(UIColor *)color;

Change the grid color (what is under the dots). You can use [UIColor clearColor] to make it invisible.

- (void)setSelectedPathColor:(UIColor *)color;

Change the grid color path (that means the lines under the dots showing the path of the password).

- (void)setMainColor:(UIColor *)color;

This is the color used to fill the base circle (which is a transparent black color by default)

- (void)setDotColor:(UIColor *)color;

This is the main color used by the dot. A light and a dark value are computed to create a gradient from this color.

- (void)setTouchColor:(UIColor *)color;

This is the color used to change the large circle color & shadow when the dot is currently touched (the user finger is on it).

- (void)setTouchedColor:(UIColor *)color;

This color is used to design the large circle of the dot when it has beed touched/selected.

- (void)setHighlightColor:(UIColor *)color;

This color is used to design a blur effect around the main circle (touchedColor).

- (UIColor *)gridColor;

This is the getter for gridColor.

- (UIColor *)selectedPathColor;

This is the getter for selectedPathColor.

- (UIColor *)mainColor;

This is the getter for mainColor.

- (UIColor *)dotColor;

This is the getter for dotColor.

- (UIColor *)touchColor;

This is the getter for touchColor.

- (UIColor *)touchedColor;

This is the getter for touchedColor;

- (UIColor *)highlightColor;

This is the getter for highlightColor;

- (void)changeBackgroundWithImage:(UIImage *)image;

This function allow you to change the background of the view controller with an image of your choice.

- (void)setParent:(NSObject *)_parent;

This is the setter to tell LTDotLock what view controller is the parent (and will receive the notification delegates of all actions).

Of course, your view controller must be handle LTDotLockControllerDelegate.


Methods to set the matrix configuration


- (void)setReturnSettedImageOfPassword:(BOOL)yesno;

If set to YES, then the delegate method (void)????PasswordSettedWithCode:(NSString *)code andImage:(UIImage *)image will be called when a new password is set where ???? can be "root", "user" or "guest" regarding which function has been called to create a new password, and image contains an image showing the created code.

If set to NO, image is nil.

- (void)setReturnSpyImageOnBadPassword:(BOOL)yesno;

If set to YES, and if the LTQuickPhotoCapture component has been installed into your project, then when a user entered a bad password, a picture of him will be taken using the front camera of the iOS device (or the back camera if there’s no front camera) for the real user to be able to identify the "spy".

Then, (void)badPasswordEnteredWithSpyImage:(UIImage *)image will be called instead of (void)badPasswordEntered given the resulted image...

- (void)setMatrixStyle:(dotLockMatrix)style;

Set the matrix keyboard used. You can specify matrix3x3 or matrix4x4 to choose having a 9 dots matrix or a 16 dots version :

alt text


Methods to tell the system what it has to do


- (void)recordRootPassword;

Tell view controller to ask for a root password.

alt text

- (void)recordUserPassword;

Tell the view controller to ask for a normal (user) password.

alt text

- (void)recordGuestPassword;

Tell the view controller to ask for a guest password.

alt text

- (void)recordAndSaveRootPassword;

Same as recordRootPassword but store the password into UserPreferences to be able to automaticaly handle the answers when the screen will be locked.

- (void)recordAndSaveUserPassword;

Same as recordUserPassword but store the password into UserPreferences to be able to automaticaly handle the answers when the screen will be locked.

- (void)recordAndSaveGuestPassword;

Same as recordGuestPassword but store the password into UserPreferences to be able to automaticaly handle the answers when the screen will be locked.


Static methods to help working quick with


+ (LTDotLockController *)showAsModalInRootController;

This static method allow you to start showing the LTDotLockController.
It returns an object to be kept if you want to set different things on it. This method locate the root controller of your main window, then use it to present the view as a modal view (so it works with UITabBarController, etc).

(LTDotLockController *)showAsModalInRootControllerWithAnimation:(UIModalTransitionStyle)animation;

Same as showAsModalInRootController, it can be used to add a showing animation for appearing, according to those available through UIModalTransitionStyle. You can use it for example if you want to ask the user to create its passwords, but it is not recommended to use this to lock the application (because a user will have time to see what’s «under» the lock view and/or to take a snapshot).

Hide

Delegates

Following are described the delegates methods called when you’ve correctly setted your own view controller as a parent. Note that all of those methods are optional.

-(void)userIdentified;

Called when a lockscreen have been successfully unlocked using the "user" password.

-(void)guestIdentified;

Called when a lockscreen have been successfully unlocked using the "guest" password.

-(void)rootIdentified;

Called when a lockscreen have been successfully unlocked using the "root" password.

-(void)userPasswordSettedWithCode:(NSString *)code andImage:(UIImage *)image;

Called when you’ve asked the user of your application to create a "user" password, and after its correct creation (password & confirmation). "image" will contain an UIImage of the design of the password if the method (void)setReturnSettedImageOfPassword has been set to YES, it’ll contain nil otherwise.

-(void)guestPasswordSettedWithCode:(NSString *)code andImage:(UIImage *)image;

Called when you’ve asked the user of your application to create a "guest" password, and after its correct creation (password & confirmation). "image" will contain an UIImage of the design of the password if the method (void)setReturnSettedImageOfPassword has been set to YES, it’ll contain nil otherwise.

-(void)rootPasswordSettedWithCode:(NSString *)code andImage:(UIImage *)image;

Called when you’ve asked the user of your application to create a "root" password, and after its correct creation (password & confirmation). "image" will contain an UIImage of the design of the password if the method (void)setReturnSettedImageOfPassword has been set to YES, it’ll contain nil otherwise.

-(void)badPasswordEntered;

Called when a bad password has been entered on lock screen.

-(void)badPasswordEnteredWithSpyImage:(UIImage *)image;

Called when a bad password has been entered on lock screen, and the method (void)setReturnSpyImageOnBadPassword has been set to YES. Image will contain a picture taken from the front webcam of the iOS device if available, or the rear webcam, or nil if there's no camera available.

-(void)badPasswordConfirmationWhileRecording;

Called when, while setting a new password, the password entered and its confirmation are different.

Hide

Demo programs

You will find two different demo programs :

LTDotLock Demo & LTDotLock with Spy Demo

LTDotLock Demo will show you how the component works, with some of the features offered.

LTDotLock Demo is pretty much the same, instead that it is a little bit modified to take advantage of LTQuickPhotoCapture component to show you how works the spy image capture.

As a reminder, for it to work you must hire a licence of LTQuickPhotoCapture.

After that, you’ll just have to add both .h & .m files from this component to the group folder especialy made for it :

alt text

You need to log-in or create an account
  • Create an account
  • Log-in
Please use your real name.
Activation link will be sent to this address.
Minimum 8 characters
Enter your password again

Clicking this button confirms you read and agreed to the terms of use and privacy policy.

X

Save your watchlist

Fill your details below to receive project updates from your watch list - including new versions, price changes and discounts.

I agree to the terms of use and privacy policy.

2 licenses, starting from From » $49.99 14 day money-back guarantee View Licenses
or Get a quote

for customization or integration services

  • Its good but not perfect.
    DotLockView good but DotLockViewController could be better!
    TB t3chno br4in
    11 months ago, 1 comments
    Was this helpful?
    Flag 0 of 1 people found this review helpful
  • Here is what I call a great coded code ! A really great component for your iOS project ! Many thanks to this wonderful project's creator !
    BC Bob Charlet
    2 years ago, 0 comments
    Was this helpful?
    Flag
  • Great work and detailed documentation to a point where no need for support is needed. Keep up the good work and I would love to see more projects to come.
    IE Ioannis Economides
    2 years ago, 0 comments
    Was this helpful?
    Flag
Post a comment

Or enter your name and Email
  • HB Hussain Barakat 2 years ago
    Hi, when I use this app can I lock the screen of my iPhone ? I mean even if press the (home button) in iPhone, it will be still lock, and never open unless if i put the correct lock ?
    • Laurent Taupin Developer 2 years ago
      Hi. No, there's no possibility to interact with the iOS system if you want your application to be validated by the Apple Team. That's the reason why most tools, present on the AppStore, claiming a certain kind of "lock" or "screensaver" style have so bad comments. This component is to be used to protect the access to your own application.
  • PC Phil Charles License holderApplication License 2 years ago
    Trying out> will update on how it goes...