invertase / react-native-apple-authentication

A React Native library providing support for Apple Authentication on iOS and Android.
Other
1.36k stars 215 forks source link

Support new RN architectures and Fabric render #323

Open xrustic2020 opened 1 year ago

xrustic2020 commented 1 year ago

Hello there!

We've switched to using the new react-native architecture with the new "Fabric" renderer, but it looks like @invertase/react-native-apple-authentication doesn't support it...

Whether the library is planned to be updated, taking into account the support of the new architecture react-native (Fabric)?

Simulator Screenshot - iPhone 14 Plus - 2023-05-29 at 21 27 48

affansk commented 1 year ago

@xrustic2020 please wait for 0.72 release. i guess there they have added some mechanism where you can use new architecture with non migrated package https://github.com/react-native-community/cli/pull/1849

harimohan-hdw commented 11 months ago

Hi, any update on fabric support

kyadalu1 commented 10 months ago

Try this https://www.youtube.com/watch?v=nZZodVliHi4

efstathiosntonas commented 10 months ago

@kyadalu1 this will be aired on 27th Sept. lol

JoseLion commented 3 months ago

I was able to render on fabric by adding the following config to my react-native.config.js:

/**
 * @type import("@react-native-community/cli-types").Config
 */
module.exports = {
  project: {
    ios: {
      unstable_reactLegacyComponentNames: [
        "RNAppleAuthButtonViewManagerBlackContinue",
        "RNAppleAuthButtonViewManagerBlackSignIn",
        "RNAppleAuthButtonViewManagerBlackSignUp",
        "RNAppleAuthButtonViewManagerWhiteContinue",
        "RNAppleAuthButtonViewManagerWhiteSignIn",
        "RNAppleAuthButtonViewManagerWhiteSignUp",
        "RNAppleAuthButtonViewManagerWhiteOutlineContinue",
        "RNAppleAuthButtonViewManagerWhiteOutlineSignIn",
        "RNAppleAuthButtonViewManagerWhiteOutlineSignUp",
      ],
    },
  },
};

Even though <AppleButton /> does render, the onPress event is not triggered upon pressing the button. Has anyone ever experienced this before? I'm not 100% sure this happens on fabric only, but I'm sure it is a problem with the AppleButton component because the AppleAuth workflow normally starts when I trigger the callback from a regular Button component.

Registering legacy components will not be necessary in React Native v0.74.0 as the Interop Layer is automatic.

Environment