{"id":21749553,"url":"https://github.com/fixique/otptextfield","last_synced_at":"2025-04-13T07:16:06.857Z","repository":{"id":62453564,"uuid":"232200924","full_name":"fixique/OTPTextField","owner":"fixique","description":"Library provide ability to quickly implement custom OTP Field ","archived":false,"fork":false,"pushed_at":"2020-08-31T19:59:13.000Z","size":1653,"stargazers_count":13,"open_issues_count":1,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-13T07:16:00.884Z","etag":null,"topics":["otp","swift","textfield"],"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/fixique.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}},"created_at":"2020-01-06T23:02:59.000Z","updated_at":"2024-08-18T08:34:03.000Z","dependencies_parsed_at":"2022-11-01T22:46:19.404Z","dependency_job_id":null,"html_url":"https://github.com/fixique/OTPTextField","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fixique%2FOTPTextField","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fixique%2FOTPTextField/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fixique%2FOTPTextField/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fixique%2FOTPTextField/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fixique","download_url":"https://codeload.github.com/fixique/OTPTextField/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248675395,"owners_count":21143768,"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":["otp","swift","textfield"],"created_at":"2024-11-26T08:18:22.284Z","updated_at":"2025-04-13T07:16:06.615Z","avatar_url":"https://github.com/fixique.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OTPTextField\n\n[![Build Status](https://travis-ci.com/fixique/OTPTextField.svg?branch=master)](https://travis-ci.com/fixique/OTPTextField) [![codebeat badge](https://codebeat.co/badges/b5135007-19cb-45e1-80cc-aa80b8ccd9f8)](https://codebeat.co/projects/github-com-fixique-otptextfield-master) ![Swift Version](https://img.shields.io/badge/swift-5.0-orange) ![LISENCE](https://img.shields.io/badge/LICENSE-MIT-green)\n\n## Overview \n\nThis library provides the ability to quickly implement the SMS input field. By default it supports the ability to automatically insert OneTimeCode into the field. \n\n**Features:**\n\n1. Two default input fields\n2. The ability to make your own design\n3. Ability to animate an input indicator\n4. Ability to handle error state\n\n\u003cp align=\"center\"\u003e\n\t\u003cimg src=\"Images/exampleVideo.gif\" /\u003e\n\u003c/p\u003e\n\n## Installation\n\n#### CocoaPods\n\n[CocoaPods](https://cocoapods.org/) is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate OTPTextField into your Xcode project using CocoaPods, specify it in your `Podfile`:\n\n```ruby\npod 'SFOTPTextField', '~\u003e 1.0.0'\n```\n\n\n\n## Usage\n\n#### Default Usage \n\nIn order to add a default field: \n\n1. Create instance of OTPTextField \n2. Add to your ViewController \n3. Implement handlers \n\n#### Custom Usage \n\nIn order to implement cutom field:\n\n1. Create your own pinView and implement protocol `PinContainer` \n2. Create your own adapter class and implement protocol `OTPTextFieldData`\n3. Add instance of OTPTextField to your ViewController \n4. Set your own custom configuration and implement handlers \n\n```swift\n    func configureOtpField() {\n        let configuration = OTPFieldConfiguration(adapter: CustomFieldAdapter(),\n                                                  keyboardType: .namePhonePad,\n                                                  keyboardAppearance: .light,\n                                                  autocorrectionType: .no,\n                                                  allowedCharactersSet: .alphanumerics)\n        otpField.setConfiguration(configuration)\n        otpField.onBeginEditing = {\n            print(\"Handle Begin Editing\")\n        }\n        otpField.onEndEditing = {\n            print(\"Handle End Editing\")\n        }\n        otpField.onOTPEnter = { code in\n            print(\"Handle OTP entered action\")\n        }\n        otpField.onTextChanged = { code in\n            print(\"Handle code changing\")\n        }\n    }\n```\n\n## License\n\nOTPTextField is released under the MIT license. [See LICENSE](https://github.com/fixique/OTPTextField/blob/master/LICENSE) for details.\n\n ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffixique%2Fotptextfield","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffixique%2Fotptextfield","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffixique%2Fotptextfield/lists"}