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

iOS: Use official method to get root view controller #230

Merged
merged 1 commit into from
Mar 12, 2020

Conversation

rajivshah3
Copy link
Contributor

The current way of obtaining the root view controller appears to not be working in RN 0.59.10. This new approach uses an official method provided by React Native.

The current way of obtaining the root view controller  appears to not be working in RN 0.59.10. This new approach uses an official [method](https://github.com/facebook/react-native/blob/91681016e84cdb99bd823c937762a0d9974e56fe/React/Base/RCTUtils.h#L87) provided by React Native.
@Elyx0
Copy link
Collaborator

Elyx0 commented Oct 24, 2019

Is it still the case with latest RN?

@NichoCM
Copy link

NichoCM commented Nov 12, 2019

I tested on the latest RN 0.61.4 and this works for me. Not only that, because I'm using "react-native-navigation" this is required in order for the document picker to display.

@rajivshah3
Copy link
Contributor Author

@NichoCM yep, I believe (don't remember at the moment) that we're running into the same issue and we also use react-native-navigation

xubmuajkub added a commit to xubmuajkub/react-native-document-picker that referenced this pull request Dec 11, 2019
@vonovak vonovak merged commit e868f1f into react-native-documents:master Mar 12, 2020
@vonovak
Copy link
Collaborator

vonovak commented Mar 12, 2020

thanks for the PR! (the RCTPresentedViewController impl isn't much different from the old one anyway https://github.com/facebook/react-native/blob/5ebca708132be8720c28a565e03b04e1087326cf/React/Base/RCTUtils.m#L506)

@rajivshah3 rajivshah3 deleted the fix/get-root-vc branch March 27, 2020 02:13
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

Successfully merging this pull request may close these issues.

4 participants