{"id":21373962,"url":"https://github.com/itenfay/DYFAuthIDAndGestureLock","last_synced_at":"2025-07-13T08:31:45.936Z","repository":{"id":56908117,"uuid":"185087063","full_name":"itenfay/DYFAuthIDAndGestureLock","owner":"itenfay","description":"手势密码解锁和 TouchID (指纹) / FaceID(面容) 解锁，代码简洁高效。(Gesture passcode unlocking and TouchID (fingerprint) / FaceID (facial features) unlocking.)","archived":false,"fork":false,"pushed_at":"2024-06-16T15:14:55.000Z","size":3538,"stargazers_count":29,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-07-20T11:45:01.166Z","etag":null,"topics":["faceid","faceid-authentication","facial-features","fingerprint","gesture-lock","gesture-passcode","gesture-password","ios","lock","objective-c","touchid","touchid-authentication","ui","unlock"],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/itenfay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-05-05T22:07:27.000Z","updated_at":"2024-07-18T01:49:20.000Z","dependencies_parsed_at":"2022-08-21T03:20:57.563Z","dependency_job_id":"d09458ec-507a-4d5f-9717-418725d68d56","html_url":"https://github.com/itenfay/DYFAuthIDAndGestureLock","commit_stats":null,"previous_names":["dgynfi/dyfauthidandgesturelock","itenfay/dyfauthidandgesturelock","chenxing640/dyfauthidandgesturelock"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itenfay%2FDYFAuthIDAndGestureLock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itenfay%2FDYFAuthIDAndGestureLock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itenfay%2FDYFAuthIDAndGestureLock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itenfay%2FDYFAuthIDAndGestureLock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itenfay","download_url":"https://codeload.github.com/itenfay/DYFAuthIDAndGestureLock/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225868158,"owners_count":17536975,"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":["faceid","faceid-authentication","facial-features","fingerprint","gesture-lock","gesture-passcode","gesture-password","ios","lock","objective-c","touchid","touchid-authentication","ui","unlock"],"created_at":"2024-11-22T08:29:36.887Z","updated_at":"2024-11-22T08:29:58.710Z","avatar_url":"https://github.com/itenfay.png","language":"Objective-C","funding_links":[],"categories":["OOM-Leaks-Crash"],"sub_categories":["Gesture-Biometric Unlock"],"readme":"如果能帮助到你，请你给[一颗星](https://github.com/itenfay/DYFAuthIDAndGestureLock)，谢谢！(If this can help you, please give it a [star](https://github.com/itenfay/DYFAuthIDAndGestureLock). Thanks!)\n\n## DYFAuthIDAndGestureLock\n\n手势密码解锁和 TouchID (指纹) / FaceID(面容) 解锁，代码简洁高效。(Gesture passcode unlocking and TouchID (fingerprint) / FaceID (facial features) unlocking, its code is concise and efficient.)\n\n[![License MIT](https://img.shields.io/badge/license-MIT-green.svg?style=flat)](LICENSE)\u0026nbsp;\n[![CocoaPods](http://img.shields.io/cocoapods/v/DYFAuthIDAndGestureLock.svg?style=flat)](http://cocoapods.org/pods/DYFAuthIDAndGestureLock)\u0026nbsp;\n![CocoaPods](http://img.shields.io/cocoapods/p/DYFAuthIDAndGestureLock.svg?style=flat)\u0026nbsp;\n\n## Group (ID:614799921)\n\n\u003cdiv align=left\u003e\n\u0026emsp; \u003cimg src=\"https://github.com/itenfay/DYFAuthIDAndGestureLock/raw/master/images/g614799921.jpg\" width=\"30%\" /\u003e\n\u003c/div\u003e\n\n## Installation\n\nUsing [CocoaPods](https://cocoapods.org):\n\n```\npod 'DYFAuthIDAndGestureLock'\n```\n\nOr\n\n```\npod 'DYFAuthIDAndGestureLock', '~\u003e 1.1.1'\n```\n\n## Preview\n\n\u003cdiv align=left\u003e\n\u0026emsp; \u003cimg src=\"https://github.com/itenfay/DYFAuthIDAndGestureLock/raw/master/images/AuthIDAndGestureLockPreview.gif\" width=\"30%\" /\u003e\n\u003c/div\u003e\n\n## Usage\n\n- 添加Face ID隐私 (Add Privacy)\n\n\u003cdiv align=left\u003e\n\u0026emsp; \u003cimg src=\"https://github.com/itenfay/DYFAuthIDAndGestureLock/raw/master/images/faceid_privacy.png\" width=\"50%\" /\u003e\n\u003c/div\u003e\n\n```\n\u003ckey\u003eNSFaceIDUsageDescription\u003c/key\u003e\n\u003cstring\u003e验证Face ID，是否允许App访问？\u003c/string\u003e\n```\n\n- 导入头文件 (Import Header)\n\n```\n#import \"DYFAppLock.h\"\n```\n\n- 手势密码和TouchID/FaceID设置 (Gesture Passcode and TouchID/FaceID Settings)\n\n支持push和模态两种场景过渡 (Supporting push or modal transition)\n\n```\n- (IBAction)settingsAction:(id)sender {\n    static BOOL pushOrPresent = YES;\n\n    DYFAuthIDAndGestureLockSettingsController *vc = [[DYFAuthIDAndGestureLockSettingsController alloc] init];\n    if (pushOrPresent) {\n        [self.navigationController pushViewController:vc animated:YES];\n    } else {\n        // When presents view controller, please add navigation controller.\n        UINavigationController *nc = [[UINavigationController alloc] initWithRootViewController:vc];\n        [self presentViewController:nc animated:YES completion:NULL];\n    }\n\n    pushOrPresent = !pushOrPresent;\n}\n```\n\n- 验证 (Authentication)\n\n```\n- (void)executeAuthentication {\n    BOOL isAuthIDOpen      = [DYFSecurityHelper authIDOpen];\n    BOOL isGestureCodeOpen = [DYFSecurityHelper gestureCodeOpen];\n    if (!isAuthIDOpen \u0026\u0026 !isGestureCodeOpen) {\n        return;\n    }\n\n    DYFAuthenticationType type = DYFAuthenticationTypeGesture;\n    if (isAuthIDOpen) {\n        type = DYFAuthenticationTypeAuthID;\n    }\n\n    DYFAuthenticationView *authView = [[DYFAuthenticationView alloc] initWithFrame:[UIScreen mainScreen].bounds authenticationType:type];\n    authView.avatarImage = [UIImage imageNamed:@\"cat49334.jpg\"];\n    [authView show];\n\n    [authView authenticateWithCompletion:^(BOOL success) {\n        if (success) {\n            // 进行相应的操作\n            NSLog(@\"验证成功\");\n        }\n    }];\n\n    [authView loginOtherAccountWithCompletion:^{\n        // 进行其他账户登录操作\n        NSLog(@\"登录其他账户\");\n    }];\n}\n```\n\n## Sample\n\n- [Code Sample Portal](https://github.com/itenfay/DYFAuthIDAndGestureLock/blob/master/Basic%20Files/ViewController.m)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitenfay%2FDYFAuthIDAndGestureLock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitenfay%2FDYFAuthIDAndGestureLock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitenfay%2FDYFAuthIDAndGestureLock/lists"}