Awesome Open Source
Awesome Open Source

Swift License Platform Twitter

AppLocker

Very simple locker for your iOS application

Preview

Modes

enum ALMode { // Modes for AppLocker
  case validate
  case change
  case deactive
  case create
}

Configuration

struct ALOptions { // The structure used to display the controller
  var title: String?
  var subtitle: String?
  var image: UIImage?
  var color: UIColor?
  var isSensorsEnabled: Bool?
}

Example

Simple call of controller

AppLocker.present(with: .create) // validate, deactive, change

Calling the controller with configuration

    var options = ALOptions()
    options.image = UIImage(named: "face")!
    options.title = "Devios Ryasnoy"
    options.isSensorsEnabled = true
    options.onSuccessfulDismiss = { (mode: ALMode?) in
        if let mode = mode {
            print("Password \(String(describing: mode))d successfully")
        } else {
            print("User Cancelled")
        }
    }
    options.onFailedAttempt = { (mode: ALMode?) in
        print("Failed to \(String(describing: mode))")
    }

    AppLocker.present(with: mode, and: appearance, over: self)

Requirements

AppLocker is written in Swift 3. iOS 8.0+ Required

Installation

Just move the Source folder to your project

CocoaPods

  pod 'AppLocker'

For iOS 8.0

  pod 'AppLocker', ~> '1.0.1'

Author

Oleg Ryasnoy, [email protected]

Telegram: https://t.me/ryasnoy

License

AppLocker is available under the MIT license. See the LICENSE file for more info.


Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
swift (7,699
ios (3,582
security (1,880
swift4 (176
password (152
swift-3 (78
secure (51
swift-4 (43
keychain (37
swift-language (27
touchid (16