OTPFieldView icon indicating copy to clipboard operation
OTPFieldView copied to clipboard

copy paste OTP not working

Open JenishMistry91 opened this issue 3 years ago • 5 comments

Hello I am using your code in one of the project. And in my project one of the requirement is to copy paste OTP. So If User copy OTP from anywhere and paste the code, it will fill all the OTP filed views with pasted OTP. Right now what happen is that, if I copied 123456 and paste, the whole OTP is pasted in first textfield only. But I want to paste only single character in each of textfield.

So please can anyone give me the solution for that. Waiting for the response. Thanks in advance.

JenishMistry91 avatar Mar 17 '22 05:03 JenishMistry91

@JenishMistry91 Did you find a solution for this? perhaps https://github.com/Root-vb/OTPFieldView/pull/22

JGVB avatar Oct 09 '22 20:10 JGVB

@JGVB Yes, I found the solution for this. You can find OTPFiledView.swift file from below attachment and replace with your installed pods OTPFieldView.swift file. OTPFieldView.swift.zip

JenishMistry91 avatar Oct 10 '22 04:10 JenishMistry91

Hi, is there another solution? I cannot change my POD, as I publish the project for the QA team to test.

arjdev69 avatar Dec 07 '22 00:12 arjdev69

@arjdev69 you can fork this repo and make the changes in your own forked code.

@JenishMistry91 Would you consider making a pr for the changes?

JGVB avatar Dec 07 '22 06:12 JGVB