invertase / react-native-apple-authentication

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

Support new RN architectures and Fabric render #323

Closed xrustic2020 closed 2 weeks 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 1 year ago

Hi, any update on fabric support

kyadalu1 commented 1 year ago

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

efstathiosntonas commented 1 year ago

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

JoseLion commented 8 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

brentvatne commented 4 months ago

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

efstathiosntonas commented 1 month ago

@mikehardy hi, now that 0.76 is out, are there any plans on adding Fabric support? thanks

mikehardy commented 1 month ago

Definitely will get this updated yes - Notifee was a higher priority repo for me and I just got that one done in time, this one is next and unfortunately just a little behind but I'll get it

mikehardy commented 3 weeks ago

I detected no issues when I worked through the rn76 upgrade process for the test app and checked it on iOS macOS and visionOS at least, in #357

Is there something particular that isn't working for people?

Note this is in fabric enabled / bridgeless enabled mode - if there is something I'm missing please provide as much detail as possible so I can reproduce, thank you

efstathiosntonas commented 3 weeks ago

@mikehardy hi, I think the main question here is:

Is the module considered as Fabric ready ie, concurrent mode etc or it needs an update?

~If it is, shouldn’t this be clear in the README?~

edit: just saw the PR

mikehardy commented 3 weeks ago

React native test app does concurrent root by default and it works so...I think it's ready. If no one has a specific reason (sounds like no...) then I'll merge and do a PR to the rn directory and update the readme etc

efstathiosntonas commented 3 weeks ago

this should be updated too: https://reactnative.directory/?search=apple+authentication