react-native-apple-authentication icon indicating copy to clipboard operation
react-native-apple-authentication copied to clipboard

Support new RN architectures and Fabric render

Open xrustic2020 opened this issue 1 year ago • 6 comments

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

xrustic2020 avatar May 29 '23 18:05 xrustic2020

@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

affansk avatar Jun 05 '23 11:06 affansk

Hi, any update on fabric support

harimohan-hdw avatar Jul 25 '23 06:07 harimohan-hdw

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

kyadalu1 avatar Sep 02 '23 13:09 kyadalu1

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

efstathiosntonas avatar Sep 02 '23 14:09 efstathiosntonas

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

  • react-native: 0.73.6
  • @invertase/react-native-apple-authentication: ^2.3.0
  • Device: iPhone 13 Pro (iOS 17.3.1)

JoseLion avatar Mar 23 '24 23:03 JoseLion

@JoseLion - have you tried this since in 0.74? hopefully the issues you encountered in the interop layer should be resolved

brentvatne avatar Jul 18 '24 04:07 brentvatne