LTHPasscodeViewController alternatives and similar libraries
Based on the "Security" category.
Alternatively, view LTHPasscodeViewController alternatives based on common mentions on social networks and blogs.
-
CryptoSwift
CryptoSwift is a growing collection of standard and secure cryptographic algorithms implemented in Swift -
Valet
Valet lets you securely store data in the iOS, tvOS, watchOS, or macOS Keychain without knowing a thing about how the Keychain works. Itβs easy. We promise. -
RNCryptor
CCCryptor (AES encryption) wrappers for iOS and Mac in Swift. -- For ObjC, see RNCryptor/RNCryptor-objc -
UICKeyChainStore
UICKeyChainStore is a simple wrapper for Keychain on iOS, watchOS, tvOS and macOS. Makes using Keychain APIs as easy as NSUserDefaults. -
SwiftKeychainWrapper
DISCONTINUED. A simple wrapper for the iOS Keychain to allow you to use it in a similar fashion to User Defaults. Written in Swift. -
Themis
Easy to use cryptographic framework for data protection: secure messaging with forward secrecy and secure data storage. Has unified APIs across 14 platforms. -
BiometricAuthentication
Use Apple FaceID or TouchID authentication in your app using BiometricAuthentication. -
SwCrypt
RSA public/private key generation, RSA, AES encryption/decryption, RSA sign/verify in Swift with CommonCrypto in iOS and OS X -
SecurePropertyStorage
Helps you define secure storages for your properties using Swift property wrappers. -
KKPinCodeTextField
A customizable verification code textField. Can be used for phone verification codes, passwords etc -
iOS-App-Security-Class
DISCONTINUED. Simple class to check if app has been cracked, being debugged or enriched with custom dylib -
Virgil Security Objective-C/Swift SDK
Virgil Core SDK allows developers to get up and running with Virgil Cards Service API quickly and add end-to-end security to their new or existing digital solutions to become HIPAA and GDPR compliant and more. -
RSASwiftGenerator
Util for generation RSA keys on your client and save to keychain or convert into Data π π -
VoiceItAPI1IosSDK
DISCONTINUED. A super easy way to add Voice Authentication(Biometrics) to your iOS apps, conveniently usable via cocoapods
CodeRabbit: AI Code Reviews for Developers

* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of LTHPasscodeViewController or a related project?
README
LTHPasscodeViewController
Simple to use iOS 7 style Passcode - the one you get in Settings when changing your passcode.
How to use
Drag the contents of LTHPasscodeViewController
to your project, or add pod 'LTHPasscodeViewController'
to your Podfile (preffered).
If your app uses extensions, LTH_IS_APP_EXTENSION
needs to be defined:
- either in each target's
Prefix.pch
file, if there is one, via#define LTH_IS_APP_EXTENSION
- or in each target's build settings, down to
Preprocessor Macros
, double click each of your schemes, click on the+
on the popup that appears and addLTH_IS_APP_EXTENSION
Example, called in application:didFinishLaunchingWithOptions
:
[LTHPasscodeViewController useKeychain:NO];
if ([LTHPasscodeViewController doesPasscodeExist]) {
if ([LTHPasscodeViewController didPasscodeTimerEnd])
[[LTHPasscodeViewController sharedUser] showLockScreenWithAnimation:YES
withLogout:NO
andLogoutTitle:nil];
}
- Supports simple (4 digit) and complex passcodes.
- Supports Touch ID and Face ID. If you're using Face ID, be sure to add
NSFaceIDUsageDescription
to yourInfo.plist
. Documentation can be found here: https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html#//apple_ref/doc/uid/TP40009251-SW75 (Thanks @mgod for the suggestion made in #193). - Data us saved in the Keychain, by default. Supports custom saving, by calling
[LTHPasscodeViewController useKeychain:NO]
after initializing and implementing a few protocol methods (the same names the library uses for the same job):
- (void)passcodeViewControllerWillClose;
- (void)maxNumberOfFailedAttemptsReached;
- (void)passcodeWasEnteredSuccessfully;
- (void)logoutButtonWasPressed;
- (NSTimeInterval)timerDuration;
- (void)saveTimerDuration:(NSTimeInterval)duration;
- (NSTimeInterval)timerStartTime;
- (void)saveTimerStartTime;
- (BOOL)didPasscodeTimerEnd;
- (void)deletePasscode;
- (void)savePasscode:(NSString *)passcode;
- (NSString *)passcode;
// All of them fall back on the Keychain if they are not implemented, even if [LTHPasscodeViewController useKeychain:NO] was called, for flexibility over what and where you save.
// Do you only want to save the passcode in a different location and leave everything else in the Keychain? Call [LTHPasscodeViewController useKeychain:NO], but only implement -savePasscode:
- Open as a modal, or pushed for changing, enabling or disabling the passcode:
/**
@param viewController The view controller where the passcode view controller will be displayed.
@param asModal Set to YES to present as a modal, or to NO to push on the current nav stack.
*/
- (void)showForEnablingPasscodeInViewController:(UIViewController *)viewController asModal:(BOOL)isModal;
- (void)showForDisablingPasscodeInViewController:(UIViewController *)viewController asModal:(BOOL)isModal;
- (void)showForChangingPasscodeInViewController:(UIViewController *)viewController asModal:(BOOL)isModal;
- Show the lock screen over the window:
- (void)showLockScreenWithAnimation:(BOOL)animated withLogout:(BOOL)hasLogout andLogoutTitle:(NSString*)logoutTitle;
// Example:
[[LTHPasscodeViewController sharedUser] showLockscreenWithAnimation:YES withLogout:NO andLogoutTitle:nil];
// Displayed with a slide up animation, which, combined with
// the keyboard sliding down animation, creates an "unlocking" impression.
- Show the lock screen over a specific view. Works like the above method, but the size and center will be of the passed in view:
- (void)showLockScreenOver:(UIView *)superview withAnimation:(BOOL)animated withLogout:(BOOL)hasLogout andLogoutTitle:(NSString *)logoutTitle;
// Example:
[[LTHPasscodeViewController sharedUser] showLockscreenOver:popover withAnimation:YES withLogout:NO andLogoutTitle:nil];
- entering foreground and resigning is handled from within the class.
If you're using Storyboards and need to show the lockscreen right at launch, but it's acting weird, you could try and initialise your Storyboard by code, as suggested in this issue by Ben (thank you!).
Makes use of SFHFKeyChainUtils to save the passcode in the Keychain. I know he dropped support for it, but I updated it for ARC 2 years ago (with help) and I kept using it since. The 'new' version isn't updated to ARC anyway, so I saw no reason to switch to it, or to any other library.
Feel free to contact me, or open an issue if anything is unclear, bugged, or can be improved.
Apps using this control
Expenses Planner, DigitalOcean Manager, LovelyHeroku, Flow Web Browser, Balance - Checkbook App, QIF Reader, Zee - Personal Finance, EZDiary, MEGA.
If you're using this control, I'd love hearing from you!
License
Licensed under MIT. If you'd like (or need) a license without attribution, don't hesitate to contact me.
*Note that all licence references and agreements mentioned in the LTHPasscodeViewController README section above
are relevant to that project's source code only.