8000 autofill not working on ios · Issue #85 · Tkko/Flutter_Pinput · GitHub
[go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autofill not working on ios #85

Closed
Mohamedfaroouk opened this issue Apr 21, 2022 · 23 comments
Closed

autofill not working on ios #85

Mohamedfaroouk opened this issue Apr 21, 2022 · 23 comments

Comments

@Mohamedfaroouk
Copy link
Mohamedfaroouk commented Apr 21, 2022

I tried to use the autofill and it works perfectly with andriod but its not working with the ios

Pinput( androidSmsAutofillMethod: AndroidSmsAutofillMethod.smsUserConsentApi, length: 6, focusNode: _pinOTPCodeFocus, controller: _pinOTPController, defaultPinTheme: PinTheme( textStyle: TextStyle( color: Colors.white, fontSize: 16, ), width: 40.0, height: 50.0, decoration: pinOTPCodeDecoration), pinAnimationType: PinAnimationTy 10000 pe.rotation, onCompleted: _onCompleted)

@Tkko
Copy link
Owner
Tkko commented Apr 21, 2022

User should tap on the code which should be shown on top of the keyboard
try autofocus: true this will open the keyboard automatically, and when user receives a SMS the code should pop up

Screen Shot 2022-04-21 at 8 55 42 PM

@Mohamedfaroouk
Copy link
Author

i tired this but the code dosnt apear on the keyboard

@szusznorbert
Copy link

Hello @Tkko,

unfortunately I have the same issue on IOS.
If I put for example the autofillHints: [AutofillHints.email], that's working fine, but the sms code didn't appear. I am using the firebase sms authentication. After the code was sent a chapcha screen appear and disappear. I don't know if it can influence the functionality.

Best regards,
Norbert

@Tkko
Copy link
Owner
Tkko commented Jun 12, 2022

Hi @szusznorbert,

  • Share example of sms
  • Are you passing any autofillHints?
    I just tried sending the sms "verification code: 1233" to my phone number while on https://flutter_pinput.codemagic.app/ and it works, check if it works for you as well.

In working I mean this:

@szusznorbert
Copy link

Hi @Tkko ,

first of all thank you for your fast reply.
I didn't use any autofillHints.
I have just tried just to be sure that the feature is working.
I got the problem source. I tried your app, and I could get the code from my keyboard.
Seems that the problem was that the firebase sent me the verification sms in Hungarian not in English.
If I switched the language to English than it's working fine.
Is there any possibility to handle the sms language? I suppose that the phone language should be also set to Hungarian in order to work the code cutting.

Thank you!
Norbert

@Tkko
Copy link
Owner
Tkko commented Jun 12, 2022

@szusznorbert Interesting, I haven't had that issue before, and I'm not sure what's the workaround here, please let me know if you find the solution.

@pranjalpc99
Copy link

Hi @Tkko

I am facing a similar issue on iOS.
I tried the codemagic link on my device and the autofill was not always working.

  1. I tried sending verification code: 1234 and it was working fine.
  2. But when I sent the sms as The one time password to verify your number on xxx app is 9644 it was not able to pick it up.

I have also attached a screen recording with this comment.

Thank you

9D60D1E1-28E8-4D4C-B6B3-841619696E95.mp4

@Tkko
Copy link
Owner
Tkko commented Jul 1, 2022

Hi @pranjalpc99 I believe this issue is out of my packages scope, could your try if the same happens for pure TextField? If yes, then you should also create an issue on Flutter repository.

Why I think so is that, I'm not doing anything for SMS autofill on WEB, it works out of the box.

I think the SMS code must follow some standards, which is not specified anywhere I looked for 😢, I saw some people have problems with other languages (Spanish).
If you find anything helpful please share with us.

@pranjalpc99
Copy link

Hi @Tkko
Yes, there is some kind of SMS format that iOS uses which is not documented anywhere sadly 😢.

From my observation the format should be like the following:

  1. Code is 123456
  2. OTP is 123456
  3. code: 123456
    etc.

@definitelyme
Copy link

Hi @Tkko Yes, there is some kind of SMS format that iOS uses which is not documented anywhere sadly 😢.

From my observation the format should be like the following:

1. Code is 123456

2. OTP is 123456

3. code: 123456
   etc.

True. Is there a work around for this?

@Tkko
Copy link
Owner
Tkko commented Oct 3, 2022

Hi @Tkko Yes, there is some kind of SMS format that iOS uses which is not documented anywhere sadly 😢.
From my observation the format should be like the following:

1. Code is 123456

2. OTP is 123456

3. code: 123456
   etc.

True. Is there a work around for this?

Nothing that I know

@Tkko
Copy link
Owner
Tkko commented Oct 3, 2022

Closing this issue, feel free to reopen it if you need to.

@Tkko Tkko closed this as completed Oct 3, 2022
@FlutterWiz
Copy link

I need to open it @Tkko because I have problem with iOS release or debug version.

Here are my codes, that does not understand the coming OTP code: (Also the code coming as 0000 is your verification code)

Pinput(
          keyboardType: TextInputType.phone,
          androidSmsAutofillMethod: AndroidSmsAutofillMethod.smsUserConsentApi,
          autofocus: true,
          length: 4,
          controller: pinPutFieldController,
          onChanged: (value) {
            context.read<AuthBloc>().add(ChangeOTPCodeEvent(value));
          },
          defaultPinTheme: PinTheme(
            width: 56,
            height: 56,
            textStyle: const TextStyle(
              fontSize: 24,
              color: blackColor,
              fontWeight: FontWeight.w400,
            ),
            decoration: BoxDecoration(
              color: whiteColor,
              border: Border.all(color: kafileGreen),
              borderRadius: BorderRadius.circular(8),
            ),
          ),
        ),

@Tkko
Copy link
Owner
Tkko commented May 9, 2023

Hi @alperefesahin, to double check your issue, the code ins't showing on top of the keyboard, right?

@FlutterWiz
Copy link

Yes @Tkko, right

@Tkko
Copy link
Owner
Tkko commented May 9, 2023
8000

Temporarily replace Pinput with TextField and check if autofill works fine

@FlutterWiz
Copy link

@Tkko it does not work also for TextField or TextFormField

@Tkko
Copy link
Owner
Tkko commented May 11, 2023

@alperefesahin Try to change SMS code to your verification code is 000000

@FlutterWiz
Copy link

Tried, but still does not work for pinput and textfield @Tkko

@FlutterWiz
Copy link

also tried it on android, and it works well, but on the other hand, iOS has a problem with getting the sms automatically. The incoming text like, Your verification code 0000, you can use it etc. @Tkko

B480

@Tkko
Copy link
Owner
Tkko commented May 11, 2023

@alperefesahin SMS text guideline is not clear but what mentioned should work fine.
Is the SMS text in English? If not it might be the issue.

@FlutterWiz
Copy link

@Tkko the text is the Turkish language based, and unfortunately can't be changed. As I said, it works on Android as well, but for the iOS side, you said that the problem is related to "Language of the incoming text", right?

@Tkko
Copy link
Owner
Tkko commented May 11, 2023

Yeah that's correct.
Apple also supports domain based verification so that should work https://developer.apple.com/news/?id=z0i801mg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants
0