GithubHelp home page GithubHelp logo

ryasnoy / applocker Goto Github PK

View Code? Open in Web Editor NEW
207.0 12.0 46.0 461 KB

AppLocker - simple lock screen for iOS Application ( Swift 4+, iOS 9.0+) Touch ID / Face ID

License: MIT License

Swift 94.70% Ruby 5.30%
swift pincode passcode lockscreen locker applocker security ios swift-3 swift-language

applocker's Introduction

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.

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.