Expose API for CCPA compliance and iOS 14 ATE #804
Conversation
ios/RCTFBSDK/core/RCTFBSDKSettings.m
Outdated
|
||
#pragma mark - React Native Methods | ||
|
||
RCT_EXPORT_METHOD(getAdvertiserTrackingEnabled:(RCTResponseSenderBlock)callback) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use the promise API instead to avoid having to wrap those in a promise in JS. See https://github.com/facebook/react-native-fbsdk/blob/master/ios/RCTFBSDK/share/RCTFBSDKShareDialog.m#L63 /
* For iOS only, get AdvertiserTrackingEnabled status. | ||
* @platform ios | ||
*/ | ||
getAdvertiserTrackingEnabled(): Promise<boolean> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add a platform check here and no-op / warn on Android instead of crashing?
import com.facebook.react.bridge.BaseJavaModule; | ||
import com.facebook.react.bridge.ReactMethod; | ||
|
||
public class FBSettingsModule extends BaseJavaModule { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add the @ReactModule / NAME const here like https://github.com/facebook/react-native-fbsdk/blob/master/android/src/main/java/com/facebook/reactnative/androidsdk/FBAccessTokenModule.java#L40. This is useful when using the new turbomodules infra.
Can you also run pod install in the example project, it should fix the CI error https://github.com/facebook/react-native-fbsdk/pull/804/checks?check_run_id=1355282567 |
Will address comments and update the PR. |
react-native-fbsdk.podspec
Outdated
@@ -14,17 +14,17 @@ Pod::Spec.new do |s| | |||
s.dependency 'React' | |||
|
|||
s.subspec 'Core' do |ss| | |||
ss.dependency 'FBSDKCoreKit', '~> 7.0' | |||
ss.dependency 'FBSDKCoreKit', '~> 8.0' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@janicduplessis these can go to 8.1 now, but I believe if you don't also update example/ios/Podfile.lock
(or delete it) then CI will fail? It did on #811 but otherwise this is obviously a more interesting PR as it exposes functionality, not just bumping versions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated to 8.1
Without this PR there is no possibility to promote an app on facebook for ios14. |
Hi @janicduplessis , could you review again and let me know if further change needed? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, just made a small change to use Promise.resolve instead of new Promise(...)
Nice! @janicduplessis + @dreamolight --> 🏆 |
@mikehardy can this be used by changing the package.json to work with master? or should we wait for an official release? |
Pretty sure we need a release or you need to craft patch-package compatible patches |
Thank you! |
I just published 3.0.0 |
Thanks @janicduplessis, that's really nice! Also thanks @mikehardy for pointing out the latest iOS version! |
Could someone on this thread clarify if these changes have resolved issue #799? I've just upgraded to 3.0.0 and tested with my Android app, the FB profile picture (which now requires the access token as part of the request) is still defaulting to the silhouette for me. Just want to be sure I'm not missing something before I continue to look into this. |
As you can see this PR provides integration with FB SDK >= 7.1 for Android. |
Yeah i've done this. It's pulling in 8.0.0 on Android and i'm still seeing the default silhouette instead of the user's profile picture. Is there any reference as to how we should pass the access token in our login request using this lib so that the user's profile picture is returned as it was prior to these updates from FB on how the profile picture is requested? |
have no ideas. Will be more effective to create an issue in android sdk https://github.com/facebook/facebook-android-sdk. |
I've tried this on the iOS platform and have the same issue. I'm assuming the access token isn't being passed into configuration of the native library which is resulting in the default silhouette being returned. Would you rather I raise a separate issue for this? |
What is this commit about:
setDataProcessingOptions
API for CCPA compliance for both iOS and AndroidgetAdvertiserTrackingEnabled
andsetAdvertiserTrackingEnabled
which are necessary for iOS 14Test Plan: