Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AppDelegate.mm install instructions for RN 0.71 #51

Open
jaredh159 opened this issue Mar 2, 2023 · 4 comments
Open

AppDelegate.mm install instructions for RN 0.71 #51

jaredh159 opened this issue Mar 2, 2023 · 4 comments

Comments

@jaredh159
Copy link

jaredh159 commented Mar 2, 2023

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?

@ALPNP
Copy link

ALPNP commented Mar 24, 2023

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.

@jaredh159
Copy link
Author

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>

@kesha-antonov
Copy link

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

@ludovic-noirault
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants