Repository navigation
Description
Steps to reproduce
- Update Flutter to version 3.22.0.
- Ensure .well-known/apple-app-site-association is correctly configured on the server.
- Implement autofill hints in your Flutter app.
- Test the autofill functionality on an iOS device.
- Try to autofill with some saved credentials
Expected results
Input fields should be automatically populated with relevant data when using autofill on iOS, similar to how it works on Android.
Actual results
Autofill suggestions appear on iOS, but selecting a suggestion does not populate the input fields.
Code sample
AutofillGroup(
child: Scaffold(
body: GoldRippleGradientBackground(
child: CustomScrollView(slivers: <Widget>[
SliverFillRemaining(
hasScrollBody: false,
child: SafeArea(
child: Padding(
padding:
const EdgeInsets.all(Dimensions.defaultScreenPadding),
child: Form(
key: formKey,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
const Spacer(),
TextFormField(
key: const Key('email_sign_in'),
autofillHints: const <String>[
AutofillHints.email,
AutofillHints.username
],
decoration: InputDecoration(
labelText: context.strings.authEmailLabel,
)),
TextFormField(
key: const Key('password_sign_in'),
autofillHints: const <String>[
AutofillHints.password,
],
decoration: InputDecoration(
labelText: context.strings.authPasswordLabel,
)),
],
),
),
),
),
),
]),
),
),
);Screenshots or Video
RPReplay_Final1715851761.1.mp4
Logs
No response
Flutter Doctor output
[✓] Flutter (Channel stable, 3.22.0, on macOS 14.4.1)
• Flutter version 3.22.0 on channel stable at
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 5dcb86f (7 days ago), 2024-05-09 07:39:20 -0500
• Engine revision f6344b75dc
• Dart version 3.4.0
• DevTools version 2.34.3
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK path
• Platform android-34, build-tools 34.0.0
• ANDROID_HOME = path
• Java binary at: path
• Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 15F31d
• CocoaPods version 1.15.2
[✓] Chrome - develop for the web
• CHROME_EXECUTABLE = /Applications/Brave Browser.app/Contents/MacOS/Brave Browser
[✓] Android Studio (version 2023.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160)
[✓] Network resources
• All expected network resources are available.
Activity
darshankawar commentedon May 16, 2024
Thanks for the report @gonciuu
Can you check if this issue resembles your case or not ?
gonciuu commentedon May 16, 2024
I believe my issue is somewhat related but not identical to the one you mentioned. In my case, the email address is visible on the keyboard bar, but when I click on it, it doesn't populate the input fields.
vitoMacnil commentedon May 16, 2024
I've the same problem on iPhone 15 Pro Simulator. When I click on Password button upon the keyboard, autofill not complete, but keyboard disappear and appear magically :D
darshankawar commentedon May 17, 2024
Thanks for the update @gonciuu
I tried the official Autofill example using latest stable version running on iPhone 6s (OS 15.3.1) and observed as shown in video below:
RPReplay-Final1715928118.MP4
As shown here, tapping in email address field, it shows
passwordsoption for some reason but if you tap on it and let it go forward, it shows the email address option correctly which gets filled and then in next field, the password gets filled properly.Can you use the same example and check at your end to see if it works as expected ? I tried to use your code sample but it contains custom implementation so couldn't use it directly.
code sampled used
vitoMacnil commentedon May 17, 2024
@darshankawar I've tried your code on iPhone 15 Pro Simulator with iOS 17.4, same @gonciuu problem. Now I'm testing it on real device. Stay tuned for updates
gonciuu commentedon May 17, 2024
@darshankawar Yes, the bug still occurs, in the example you sent it also doesn't work as expected. After pick the credentials from keychain it should fill the form :P
vitoMacnil commentedon May 17, 2024
Same problem with real device (iPhone 13 mini with iOS 17.4.1). Selecting credentials from saved credentials list fills username and password, but selecting credentials from keyboard hint autofill not happen
darshankawar commentedon May 17, 2024
Thanks for the updates @gonciuu and @vitoMacnil
So if I understand correctly, the main issue is, the email address for example displayed in hint bar is not populated in the field ?
I tried by trimming down the code sample further and observed that tapping on email address field shows me
Passwordshint first. If I tapdonebutton and then in email address field, then it shows me email hint which upon selecting populates in the field properly. I tried this on iphone 6s (OS 15.3.1)RPReplay-Final1715945336.MP4
In your case, trying to select the email field or credentials from hint bar doesn't populate the field, is this a correct interpretation of the issue ? Also, please confirm if this you are seeing only in 3.22.0 and used to work in previous version ?
gonciuu commentedon May 17, 2024
Yes, that's the correct interpretation. I downloaded an old version of the app from testflight, which was on flutter version 3.19.x and everything work correctly, so I can guess that's the problem with this latest release.
26 remaining items
jmagman commentedon May 23, 2024
I am going to request this as a hotfix. Can someone confirm this behavior now works on the master channel, as expected, on top of the fix #148612?
nate-thegrate commentedon May 23, 2024
Unfortunately it looks like #148612 was reverted since it caused some web platform testing issues. We should be able to address this within the next few minutes 🙂
Reland "Update `FocusManager` platform check to include iOS" (#148984)
gonciuu commentedon May 24, 2024
I've checked this on 3.22.1 and the bug still occurs. @vitoMacnil What about you?
xvrh commentedon May 24, 2024
I checked with (flutter-3.23-candidate.2)
f419177057bfd87caa1ba7d1e3b428cb256c47ad "Reland "Update
FocusManagerplatform check to include iOS" (#148984)"And it works ok.
Thanks.
gonciuu commentedon May 24, 2024
So should I use candidate version, or this fix will be merged soon?
nate-thegrate commentedon May 24, 2024
@gonciuu I believe the plan is to wait for a few days to make sure we don't have any tests failing, and then we'll cherry-pick this patch into an upcoming "stable" release.
(I can't make any guarantees though.)
Update `FocusManager` platform check to include iOS (flutter#148612)
Reland "Update `FocusManager` platform check to include iOS" (flutter…
github-actions commentedon Jun 7, 2024
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.nate-thegrate commentedon Aug 12, 2024
Cherry-picking this fix into Flutter 3.22 is blocked on #151618, so it's looking like it might not ever happen.
Fortunately, this fix has landed in version 3.24.0.