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
This issue is not security related and can safely be disclosed publicly on GitHub
Xcode version
15.4
Facebook iOS SDK version
17.0.2
Dependency Manager
CocoaPods
SDK Framework
Share
Goals
I would like to share a photo from my app to Facebook using a ShareButton.
Expected results
When the share is complete and my app is reactivated, the user should not be pestered with a prompt to allow/disallow pasting from Facebook.
Actual results
The user is pestered with a prompt to allow/disallow pasting from Facebook.
Steps to reproduce
Add a ShareButton.
Set the ShareButton's ShareContent to a SharePhotoContent with Photos[] containing one SharePhoto.
Tap on the 'Share' button to launch the share dialog (FB app installed on device)
Cancel or complete the photo share
User gets prompt: "MyApp" would like to paste from "Facebook"--"Do you want to allow this?"
Code samples & details
This is similar in the unwanted behavior reported in #1467 and #1603, which were deemed to be caused by the app accessing the pasteboard and not caused by FBSDK. I have high confidence that this is not the case here. I thoroughly analyzed my app (and its dependencies) for any unintentional pasteboard access. I found the FBSDK to be the only dependency accessing the pasteboard.
My Swift isn't very good, but it looks to me like this function accesses the pasteboard on app activation. This can cause the prompt/alert on iOS 16+, right?
WORKAROUND: I tried pre-emptively clearing the pasteboard for pasteboard type "com.facebook.Facebook.FBAppBridgeType" on app activation (based on
Checklist before submitting a bug report
Xcode version
15.4
Facebook iOS SDK version
17.0.2
Dependency Manager
CocoaPods
SDK Framework
Share
Goals
I would like to share a photo from my app to Facebook using a ShareButton.
Expected results
When the share is complete and my app is reactivated, the user should not be pestered with a prompt to allow/disallow pasting from Facebook.
Actual results
The user is pestered with a prompt to allow/disallow pasting from Facebook.
Steps to reproduce
Code samples & details
This is similar in the unwanted behavior reported in #1467 and #1603, which were deemed to be caused by the app accessing the pasteboard and not caused by FBSDK. I have high confidence that this is not the case here. I thoroughly analyzed my app (and its dependencies) for any unintentional pasteboard access. I found the FBSDK to be the only dependency accessing the pasteboard.
Investigating the FBSDK code, I found this:
https://github.com/facebook/facebook-ios-sdk/blob/adf47300b3de4519674956cbe9d70b689432067f/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/ProtocolVersions/_BridgeAPIProtocolNativeV1.swift#L269-287
My Swift isn't very good, but it looks to me like this function accesses the pasteboard on app activation. This can cause the prompt/alert on iOS 16+, right?
WORKAROUND: I tried pre-emptively clearing the pasteboard for pasteboard type "com.facebook.Facebook.FBAppBridgeType" on app activation (based on
facebook-ios-sdk/FBSDKCoreKit/FBSDKCoreKit/Internal/BridgeAPI/ProtocolVersions/_BridgeAPIProtocolNativeV1.swift
Line 54 in adf4730
Sample workaround code (forgive me for the Xamarin):
The text was updated successfully, but these errors were encountered: