{"id":806,"url":"https://github.com/rsrbk/SmileToUnlock","last_synced_at":"2025-07-30T19:32:20.334Z","repository":{"id":62455760,"uuid":"112859454","full_name":"rsrbk/SmileToUnlock","owner":"rsrbk","description":"This library uses ARKit Face Tracking in order to catch user's smile.","archived":false,"fork":false,"pushed_at":"2020-08-28T01:52:05.000Z","size":17387,"stargazers_count":629,"open_issues_count":0,"forks_count":37,"subscribers_count":18,"default_branch":"master","last_synced_at":"2024-11-18T05:34:32.792Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rsrbk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-02T16:51:17.000Z","updated_at":"2024-08-11T23:17:38.000Z","dependencies_parsed_at":"2022-11-01T23:03:42.845Z","dependency_job_id":null,"html_url":"https://github.com/rsrbk/SmileToUnlock","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsrbk%2FSmileToUnlock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsrbk%2FSmileToUnlock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsrbk%2FSmileToUnlock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsrbk%2FSmileToUnlock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rsrbk","download_url":"https://codeload.github.com/rsrbk/SmileToUnlock/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228178889,"owners_count":17881105,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-01-05T20:15:31.754Z","updated_at":"2024-12-04T19:31:58.016Z","avatar_url":"https://github.com/rsrbk.png","language":"Swift","funding_links":[],"categories":["ARKit","Swift"],"sub_categories":["Other free courses","Getting Started"],"readme":"# SmileToUnlock\n\n[![Cocoapods](https://img.shields.io/cocoapods/v/SmileToUnlock)](https://cocoapods.org/pods/SmileToUnlock) [![Swift Package Manager compatible](https://img.shields.io/badge/Swift%20Package%20Manager-compatible-brightgreen.svg)](https://github.com/apple/swift-package-manager)\n\nMake your users smile before opening the app :)\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/rsrbk/SmileToUnlock/blob/master/Previews/gif.gif?raw=true\" alt=\"Demo gif\"/\u003e\n  \u003cbr\u003eGif with the demonstration\n\u003c/p\u003e\n\n## Installation\n\n### Cocoapods\nThe most preferable way to use this library is cocoapods. Add the following line to your `Podfile`:\n```sh\npod 'SmileToUnlock'\n```\nand run `pod install` in your terminal.\n\n### Swift Package Manager\nAdd the following as a dependency to your `Package.swift:\n```swift\n.package(url: \"https://github.com/rsrbk/SmileToUnlock.git\", from: \"1.0.3\")\n```\nand then specify `\"SmileToUnlock\"` as a dependency of the Target in which you wish to use SmileToUnlock. Here's an example:\n```swift\n let package = Package(\n     name: \"Example\",\n     dependencies: [\n         .package(url: \"https://github.com/rsrbk/SmileToUnlock.git\", from: \"1.0.3\")\n     ],\n     targets: [\n         .target(name: \"Example\", dependencies: [\"SmileToUnlock\"])\n     ]\n )\n ```\n\n### Manually\nAdd the files in the `SmileToUnlock` directory to your project.\n\n## Usage\nFirst of all, you have to add NSCameraUsageDescription to you Info.plist with a brief explanation.\n\nThen you need to check if a user's device has the face tracking support:\n```swift\nif SmileToUnlock.isSupported {\n}\n```\nKeep in mind that only iPhone X and older (a real device, not even a stimulator!) have this support currently.\n\nThen just create an instance of the SmileToUnlock and specify the success handler:\n```swift\nif SmileToUnlock.isSupported {\n    let vc = SmileToUnlock()\n    vc.onSuccess = {\n        let storyboard = UIStoryboard(name: \"Main\", bundle: nil)\n        let vc = storyboard.instantiateInitialViewController()!\n        self.window?.rootViewController = vc\n    }\n    window?.rootViewController = vc\n}\n```\nIf you want SmileToUnlock to be presented on your app's launch, add the code above to your didFinishLaunchingWithOptions method in AppDelegate.\n\nFew additional customization properties:\n```swift\npublic var titleText: String? = \"Hello,\"\npublic var subtitleText: String? = \"Begin using our app from the smile\"\npublic var skipButtonText: String? = \"Skip this\"\n\n/// Sound to play after a user has smiled. Set to nil if you don't want a sound to be played.\npublic var successSoundPlaying: (() -\u003e Void)? = {\n    AudioServicesPlaySystemSound(1075)\n}\n\n/// Set how much smile do you need from a user. 0.8 is kind of hard already!\npublic var successTreshold: CGFloat = 0.7\n\n/// Background color for this view controller.\npublic var backgroundColor: SmileToUnlockBackground = .blue\n```\nThere are 3 preinstalled background colors. You can set your custom one as well:\n```swift\npublic enum SmileToUnlockBackground {\n    case blue\n    case red\n    case purple\n    case other(UIColor)\n}\n```\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://github.com/rsrbk/SmileToUnlock/blob/master/Previews/blue.png?raw=true\" alt=\"Blue\"/\u003e \u003cimg src=\"https://github.com/rsrbk/SmileToUnlock/blob/master/Previews/red.png?raw=true\" alt=\"Red\"/\u003e \u003cimg src=\"https://github.com/rsrbk/SmileToUnlock/blob/master/Previews/purple.png?raw=true\" alt=\"Purple\"/\u003e\n\u003c/p\u003e\n\n## Feature requests\nIf you wish to contribute, look at this topics:\n- Improving the face itself (maybe some 3D model)\n- Adding additional emotions (like eye blinking)\n- Improving the UI of the screen\n\n## Follow me on twitter\nI promise it's gonna be more interesting stuff there! [@rsrbk123](https://twitter.com/rsrbk123)\n\n## Check out my other libraries\n\n[SRCountdownTimer](https://github.com/rsrbk/SRCountdownTimer) - a simple circle countdown with a configurable timer.\u003cbr\u003e\n[SRAttractionsMap](https://github.com/rsrbk/SRAttractionsMap) - the map with attractions on which you can click and see the full description.\n\n## License\n MIT License\n\n Copyright (c) 2017 Ruslan Serebriakov \u003crsrbk1@gmail.com\u003e\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frsrbk%2FSmileToUnlock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frsrbk%2FSmileToUnlock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frsrbk%2FSmileToUnlock/lists"}