You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Revert to the old behavior (show the paste button regardless of clipboard contents).
Revert only for iOS, or only or iOS 14. Provide the developer an option to enable the feature on iOS 14 anyway?
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!
@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.
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
@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?
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.
Activity
edeuss commentedon Jun 24, 2020
Yea I have it being spammed in one of my apps.
justinmc commentedon Jun 24, 2020
@EliasDeuss Thanks for posting the gif! I hadn't actually reproduced it yet. Looks bad, we'll definitely have to fix this.
edeuss commentedon Jun 24, 2020
It also might be that bad because the page has a StreamBuilder on it. (Don’t know if that would effect it.)
tamirrab commentedon Jun 24, 2020
Every flutter app including apps on the stores have this “paste notification”
It is very bad,
Customer think we are storing there information
goderbauer commentedon Jun 24, 2020
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?
goderbauer commentedon Jun 24, 2020
We should fix this before iOS 14 launches.
goderbauer commentedon Jun 24, 2020
@jonahwilliams also pointed to https://developer.apple.com/documentation/uikit/uipasteboard/1829416-hasstrings?language=objc, which may help us.
51 remaining items
billymahmood commentedon Nov 5, 2020
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 = 0Packages my app uses
justinmc commentedon Nov 5, 2020
@billymahmood Something in your app (or a package) is probably accessing the clipboard. Can you narrow it down and find out what it is?
benPesso commentedon Nov 6, 2020
@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.
justinmc commentedon Nov 6, 2020
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
benPesso commentedon Nov 9, 2020
@justinmc I got a bit lost with all the multiple related issues. Is there any progress with adding the
hasStrings()check to the FlutterClipboardutility (or the underlyingClipboard.getDataplatform channel?justinmc commentedon Nov 9, 2020
No, I haven't worked on it.
pcsosinski commentedon Jan 13, 2021
@justinmc can you update the milestone on this issue?
justinmc commentedon Jan 14, 2021
Whoops, done thanks!
yacineblr commentedon May 5, 2021
any updates for this issue ?
justinmc commentedon Aug 5, 2021
This should be the final PR to fix this issue the right way, unless I've missed something: #87678
github-actions commentedon Sep 10, 2021
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.