Skip to content

Unsolicited iOS14 clipboard permission prompt #60145

Closed

Description

@justinmc

At WWDC2020, Apple announced that it was cracking down on clipboard sniffing by showing a prompt when an app attempts to access the clipboard. This likely means that Flutter apps that feature text input will trigger this at strange times.

As of #54902, Flutter began checking the clipboard contents to decide whether or not to show the paste button in the text selection menu. Previously, it would always show the button, even when nothing pasteable existed in the clipboard.

When exactly are Flutter apps seeing this clipboard permission dialog? What should we do about it?

Some options:

  1. Revert to the old behavior (show the paste button regardless of clipboard contents).
  2. Revert only for iOS, or only or iOS 14. Provide the developer an option to enable the feature on iOS 14 anyway?

Activity

  1. edeuss commented on Jun 24, 2020

    @edeuss

    Yea I have it being spammed in one of my apps.

    RPReplay-Final1592862237

  2. justinmc commented on Jun 24, 2020

    @justinmc
    ContributorAuthor

    @EliasDeuss Thanks for posting the gif! I hadn't actually reproduced it yet. Looks bad, we'll definitely have to fix this.

  3. edeuss commented on Jun 24, 2020

    @edeuss

    @EliasDeuss Thanks for posting the gif! I hadn't actually reproduced it yet. Looks bad, we'll definitely have to fix this.

    It also might be that bad because the page has a StreamBuilder on it. (Don’t know if that would effect it.)

  4. added
    a: text inputEntering text in a text field or keyboard related problems
    frameworkflutter/packages/flutter repository. See also f: labels.
    P2Important issues not at the top of the work list
    on Jun 24, 2020
  5. tamirrab commented on Jun 24, 2020

    @tamirrab

    Every flutter app including apps on the stores have this “paste notification”
    It is very bad,
    Customer think we are storing there information

  6. goderbauer commented on Jun 24, 2020

    @goderbauer
    Member

    Apparently, Apple is also introducing a set of new APIs for clipboards: https://9to5mac.com/2020/06/24/ios-14-clipboard-notifications/

    I haven't dived into it, but maybe those can help us to determine if there's anything interesting in the clipboard before actually accessing it.

    To people who have seen the notification in the wild for a Flutter app: When does it actually show up?

  7. added
    engineflutter/engine related. See also e: labels.
    P1High-priority issues at the top of the work list
    and removed
    P2Important issues not at the top of the work list
    on Jun 24, 2020
  8. goderbauer commented on Jun 24, 2020

    @goderbauer
    Member

    We should fix this before iOS 14 launches.

  9. self-assigned this
    on Jun 24, 2020
  10. goderbauer commented on Jun 24, 2020

    @goderbauer
    Member
  11. 51 remaining items

  12. billymahmood commented on Nov 5, 2020

    @billymahmood

    I have the most up to date version of Flutter, and I have updated my app, however I am still getting this "copied from clipboard" notification on the launch of my app (when the app is completely closed and then opened).

    As I am using Deeplinks, I have even included this flag in my info file
    FirebaseDeepLinkPasteboardRetrievalEnabled = 0

    Doctor summary (to see all details, run flutter doctor -v):
    [✓] Flutter (Channel stable, 1.22.3, on Mac OS X 10.15.7 19H2, locale en-GB)
     
    [✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    [✓] Xcode - develop for iOS and macOS (Xcode 12.1)
    [✓] Android Studio (version 4.0)
    [✓] Connected device (1 available)
    
    • No issues found!
    

    Packages my app uses

    cupertino_icons: ^1.0.0
      http: ^0.12.2
      flutter_secure_storage: ^3.3.5
      connectivity: ^2.0.1
      device_info: ^1.0.0
      sqflite: ^1.3.1+2
      path_provider: ^1.6.24
      fluttertoast: ^7.1.1
      sprintf: ^5.0.0
      url_launcher: ^5.7.2
      firebase_messaging: ^7.0.3
      firebase_dynamic_links: ^0.6.0+2
      get_it: ^5.0.1
      syncfusion_flutter_gauges: ^18.3.40
      image_picker: ^0.6.7+12
      cached_network_image: ^2.3.3
      file_picker: ^2.0.10
      flutter_app_badger: ^1.1.2
    
  13. justinmc commented on Nov 5, 2020

    @justinmc
    ContributorAuthor

    @billymahmood Something in your app (or a package) is probably accessing the clipboard. Can you narrow it down and find out what it is?

  14. benPesso commented on Nov 6, 2020

    @benPesso

    @billymahmood @justinmc It's most likely firebase_dynamic_links, which uses the clipboard to "reload" the dynamic link that was created when the user was redirected to the app. It's a trick for "sharing" data with an app from the browser.

    For example: When a user doesn't have the app and first needs to download it, it would set the clipboard in the browser, then once the app is launched, it checks to see if there's a dynamic link to load.

  15. justinmc commented on Nov 6, 2020

    @justinmc
    ContributorAuthor

    Thanks @benPesso! I wasn't aware. Sounds like something that's not fixable, but I've opened an issue in the flutterfire repo in case there's anything they can do: firebase/flutterfire#4051

  16. benPesso commented on Nov 9, 2020

    @benPesso

    @justinmc I got a bit lost with all the multiple related issues. Is there any progress with adding the hasStrings() check to the Flutter Clipboard utility (or the underlying Clipboard.getData platform channel?

  17. justinmc commented on Nov 9, 2020

    @justinmc
    ContributorAuthor

    No, I haven't worked on it.

  18. pcsosinski commented on Jan 13, 2021

    @pcsosinski

    @justinmc can you update the milestone on this issue?

  19. justinmc commented on Jan 14, 2021

    @justinmc
    ContributorAuthor

    Whoops, done thanks!

  20. yacineblr commented on May 5, 2021

    @yacineblr

    any updates for this issue ?

  21. justinmc commented on Aug 5, 2021

    @justinmc
    ContributorAuthor

    This should be the final PR to fix this issue the right way, unless I've missed something: #87678

  22. github-actions commented on Sep 10, 2021

    @github-actions

    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 -v and a minimal reproduction of the issue.

  23. locked as resolved and limited conversation to collaborators on Sep 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work lista: text inputEntering text in a text field or keyboard related problemscustomer: crowdAffects or could affect many people, though not necessarily a specific customer.customer: money (g3)engineflutter/engine related. See also e: labels.frameworkflutter/packages/flutter repository. See also f: labels.platform-iosiOS applications specifically

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions