Skip to content

iOS Autofill "hide my email" does not work #157495

Description

@just-doit

Steps to reproduce

  1. Use provided sample code (or build a simple app with a TextField)
  2. Run app
  3. Tap on text field
  4. Tap on "Hide My Email"
  5. Create a new "Hide My Email" address (or use the existing)

Expected results

I expect the TextField to be filled with the created / selected email address.

Actual results

The TextField stays empty.

Code sample

Code sample
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      title: 'Test',
      home: DetailPage(),
    );
  }
}

class DetailPage extends StatefulWidget {
  const DetailPage({super.key});

  @override
  State<DetailPage> createState() => _DetailPageState();
}

class _DetailPageState extends State<DetailPage> {
  final TextEditingController _emailController = TextEditingController();

  @override
  void dispose() {
    _emailController.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: SafeArea(
        child: Form(
          child: CupertinoFormSection.insetGrouped(
            header: const Text('EMAIL'),
            children: [
              CupertinoTextFormFieldRow(
                controller: _emailController,
                prefix: Icon(CupertinoIcons.mail,
                    color: CupertinoColors.label.resolveFrom(context)),
                keyboardType: TextInputType.emailAddress,
                autofillHints: const [AutofillHints.email],
              )
            ],
          ),
        ),
      ),
    );
  }
}

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.24.0, on macOS 15.0.1 24A348 darwin-arm64, locale de-DE)
    • Flutter version 3.24.0 on channel stable at /Users/dirkmika/projects/SDKs/Flutter/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 80c2e84975 (3 months ago), 2024-07-30 23:06:49 +0700
    • Engine revision b8800d88be
    • Dart version 3.5.0
    • DevTools version 2.37.2

[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/dirkmika/Library/Android/sdk
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/to/macos-android-setup for more details.

[✓] Xcode - develop for iOS and macOS (Xcode 16.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16A242d
    • CocoaPods version 1.15.2

[✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[✓] Android Studio (version 2023.1)
    • 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.7+0-17.0.7b1000.6-10550314)

[✓] VS Code (version 1.94.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.98.0

[✓] Connected device (3 available)
    • Mein 13 Pro (mobile)            • 00008110-000A34300C62801E • ios          • iOS 18.0.1 22A3370
    • macOS (desktop)                 • macos                     • darwin-arm64 • macOS 15.0.1 24A348 darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad     • darwin       • macOS 15.0.1 24A348 darwin-arm64

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 2 categories.

Activity

  1. added
    in triagePresently being triaged by the triage team
    on Oct 24, 2024
  2. huycozy commented on Oct 24, 2024

    @huycozy
    Member

    Hi @just-doit
    Unfortunately, I don't have a device that subscribe to iCloud+ to have Hide My Email feature. From my understanding, the anonymous/generated account is not auto-filled when you tap again on the fields, correct?

    Can you please check this behavior on iOS native TextField?

  3. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Oct 24, 2024
  4. just-doit commented on Oct 24, 2024

    @just-doit
    Author

    Normally, you tap on “Hide My Email” and a sheet opens, which in my case shows that I have already generated an address for the app.
    I then tap on “Continue” so that the sheet disappears again. The email address should then be inserted into the text field.

    In addition to the fact that no text appears in the text field, it is also noticeable that the text field no longer has focus (the cursor has disappeared), but the keyboard is still open.
    It seems the text field looses focus as soon as "Hide My Email" is selected.

    See attached video (this is a native TextField):

    ScreenRecording_10-24-2024.14-02-44_1.MP4
  5. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Oct 24, 2024
  6. huycozy commented on Oct 25, 2024

    @huycozy
    Member

    Thank you for the demo video. But I'm confused since you mentioned it's on a native TextField and I see the issue also appeared, right?

  7. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Oct 25, 2024
  8. just-doit commented on Oct 25, 2024

    @just-doit
    Author

    Sorry, I think I misunderstood you.
    I thought it was about the two flutter classes CupertinoTextFormFieldRow vs TextField.
    The source code says CupertinoTextFormFieldRow while for the video I used a TextField.

    But you probably mean a SwiftUI TextField.
    I have tested this with the following code and it works as expected:

    import SwiftUI
    
    struct ContentView: View {
        @State var text: String = ""
        
        var body: some View {
            TextField("EMail", text: $text)
                .textContentType(.emailAddress)
        }
    }
    ScreenRecording_10-25-2024.08-08-33_1.MP4
  9. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Oct 25, 2024
  10. huycozy commented on Oct 25, 2024

    @huycozy
    Member

    Thanks for confirming this. It makes sense now. Labeling this for further investigation.

  11. added
    a: text inputEntering text in a text field or keyboard related problems
    platform-iosiOS applications specifically
    fyi-iosFor the attention of iOS platform team
    and removed
    in triagePresently being triaged by the triage team
    on Oct 25, 2024
  12. 1 remaining item

  13. zaminshaikh commented on Feb 28, 2025

    @zaminshaikh
  14. astoimenov commented on Mar 31, 2025

    @astoimenov
  15. Jasper-ketelaar commented on Nov 8, 2025

    @Jasper-ketelaar
  16. gabrysgab commented on May 13, 2026

    @gabrysgab
  17. jmplummer commented on May 27, 2026

    @jmplummer

    FWIW, we are experiencing the same issue. Hide my email will open the bottom sheet, but it fires a lifecycle event setting to inactive, does its thing in the background, comes back to active state, but no text is ever populated into the field. I am using the TextFormField wrapped in Autofillgroup for context.

  18. phellmayr2 commented on Aug 20, 2026

    @phellmayr2
  19. rokk4 commented on Sep 16, 2026

    @rokk4
  20. seanhamstra commented on Oct 22, 2026

    @seanhamstra
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projecta: text inputEntering text in a text field or keyboard related problemsplatform-iosiOS applications specificallyteam-text-inputOwned by Text Input teamtriaged-text-inputTriaged by Text Input team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions