react-native-home-indicator icon indicating copy to clipboard operation
react-native-home-indicator copied to clipboard

AppDelegate.mm install instructions for RN 0.71

Open jaredh159 opened this issue 1 year ago • 4 comments

RN 0.71 seems to have changed the AppDelegate entrypoint significantly. From piecing together info from

https://github.com/facebook/react-native/issues/35937

and

https://github.com/facebook/react-native/blob/main/Libraries/AppDelegate/RCTAppDelegate.h

I think the correct way to install, replacing the default UIViewController would be to add a new method override like so:

- (UIViewController *)createRootViewController
{
  return [HomeIndicatorViewController new];
}

does that seem correct to you? if so, would you be open to a PR to modify the readme?

jaredh159 avatar Mar 02 '23 16:03 jaredh159

Hi @jaredh159

Have you found a solution to the integration problem ?

I tried to use your sample code, but after building on iOS, the app crashes without errors.

ALPNP avatar Mar 24 '23 11:03 ALPNP

the code i showed above is working for me. i'm guessing maybe your crash has to do with something else? make sure you've also added:

#import <RNHomeIndicator.h>

jaredh159 avatar Mar 24 '23 13:03 jaredh159

RN 0.71 seems to have changed the AppDelegate entrypoint significantly. From piecing together info from

facebook/react-native#35937

and

https://github.com/facebook/react-native/blob/main/Libraries/AppDelegate/RCTAppDelegate.h

I think the correct way to install, replacing the default UIViewController would be to add a new method override like so:

- (UIViewController *)createRootViewController
{
  return [HomeIndicatorViewController new];
}

does that seem correct to you? if so, would you be open to a PR to modify the readme?

Updated location on github for those whore interested https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/AppDelegate/RCTAppDelegate.mm#L127

kesha-antonov avatar Jun 07 '23 06:06 kesha-antonov

I was experiencing build issues using the recommended install steps on RN 0.71.X. The method mentionned here allowed me to build and fix the problems

Thanks a lot!

ludovic-noirault avatar Aug 25 '23 12:08 ludovic-noirault