This PR adds Android and iOS support for the new architecture relying on the compatibility layer.
On Android
two main changes were required for this to work:
Remove static from all functions annotated with @ReactMethod given that in bridgeless it would throw the following error
Use the event dispatcher to send events from the native side to JS and adding a RCTLoginButtonEvent class
On iOS
Had to create a dedicated class for the RCTFBSDKLoginButton view in order to export the onChange view property of type RCTBubblingEventBlock and declare this property on the UIView wrapping the button (FBSDKLoginButton is a final class and can't be extended)
Test Plan:
Locally run refresh-example to update to the latest RC and tested Android and iOS on the old and new architectures
Summary
This PR adds Android and iOS support for the new architecture relying on the compatibility layer.
On Android
two main changes were required for this to work:
Remove
static
from all functions annotated with@ReactMethod
given that in bridgeless it would throw the following errorUse the event dispatcher to send events from the native side to JS and adding a RCTLoginButtonEvent class
On iOS
Had to create a dedicated class for the RCTFBSDKLoginButton view in order to export the
onChange
view property of typeRCTBubblingEventBlock
and declare this property on the UIView wrapping the button (FBSDKLoginButton
is a final class and can't be extended)Test Plan:
Locally run
refresh-example
to update to the latest RC and tested Android and iOS on the old and new architectureshttps://github.com/thebergamo/react-native-fbsdk-next/assets/11707729/891ab1aa-23c5-4ee0-a5e5-cb1ebee31700
https://github.com/thebergamo/react-native-fbsdk-next/assets/11707729/8fec570b-23b5-49f4-84bd-093ad2c60b57