-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Support brownfield apps #1234
Comments
@DanielZlotin : if you don't mind me saying so, this is quite a change in stance from your comment on this issue: https://github.com/wix/react-native-navigation/issues/813#issuecomment-284391927. Is there any reason motivating this change in stance? |
@joshyhargreaves I'm always open to questions :)
So I want to give it a try |
Hey, I'm interested in support for existing apps so I'm really happy you are tackling that! Any particular reason to not support CocoaPods? It's the preferred dependecy option in most existing apps after all |
Would anyone happen to have a summary of what would need to be done here to support this? We may be interested in taking this on for you. |
First glance, the two main issues are just:
I feel like I have a pretty good understanding of what would be required for 2, but not for 1. I made a good list of rootViewController usages. These would need to be migrated to use a root view controller defined by the host application, rather than fetched directly from the UIApplication.
I'll need some more time, and probably some fiddling, to sketch out a plan to break it up completely. |
Any updates here? I see you're now in v2 Alpha. |
Hey @MattFoley, Sorry for the delayed response. We’re still interested in supporting brownfield apps. Unfortunately, as the Wix app doesn’t exactly require this feature, we will probably never get to implement it. We simply can’t commit to it. We’re fully open to pr’s and collaborators. While we’re not able to work on this issue full time, we’re always available to assist and would love to help out as much as we can. If you’d like to take ownership on this issue, you can reach me on discord, twitter or slack |
example for ios right here: https://github.com/anhtuank7c/scooter-baby |
@anhtuank7c Hi! I have managed to do so with latest stack in my project: But after a call of I also was unable to run your example because xcode 13 does not runs with RN 0.59 because of facebook/react-native#25138. |
@Natteke I don't have I have no idea about RNN 6 (Apis may changes) |
@anhtuank7c thats true, i understand. This is the single thread and example i have found :c |
@Natteke I just added a script to fix RN on Xcode 11+ |
@anhtuank7c it works! Thank you very much! I will spend today and tomorrow in tries to run this with latest libraries. |
i made a repo where i currently stuck. i have no idea what RNN wants from me to do. |
@Natteke Get started by reading RNN code. |
@Natteke I just fixed it on your repo. Main reason is because RNN is heavily depends on https://github.com/Natteke/RNN-swiftt-test/pull/1 I have been using RNN on my brownfield work apps (on App store) for almost an year. I have started using it from v2 and recently had to upgrade to v6 to fix iOS 13 issues. There are no changes I did in the lib to make it work. But its pretty much self explanation-able if you take a look at RNN source code. Let me know if you need any help. Also, to make a note - I do have some issues on relaunch of the RNN views due to its maintaining window by its own. Sometime views gets added twice. |
@rizwankce thank you very much! It works! Judging on your changes it is really working almost out of the box. Awesome :) I came to RN from frontend and just finished beginners java and swift course, so it's extremely hard for me to read Obj-C. But one day i think the time will come to deep dive in RNN sources :D About issue on relaunch. |
@Natteke I meant switching between native and RN views. I just figured out the root cause and made a fix already. I have been procrastinating to fix this bug for so long 😛 Here is what is happening - when I switch between RNN and Native - RNN creates a new regarding the Obj-C source, its not that hard to learn and Im sure you will learn it quickly. Let me know if need any help. Contacts are in my GitHub profile page. I might actually write a blog post of this pretty soon. |
I'm looking for a way to freely navigating between RN and native on a complex navigation stack. What is the latest information on this issue on supporting the brown field app? The issue is still open but some say it is currently working. If it is supported, what are some good resources around this? |
@byunlee In doing some research (not part of WIX), it seems AppRegister.registerComponent() + react-navigation + react-native-modules and their callbacks are the only way to do this. The owners of this repo have stated multiple times in issues that they do not support this functionality. It 'works' but only as a modal - not on any exisiting RCT Views. It's pretty easy to use any JS based navigation and hook it up manually yourself with hooks from native modules. |
We should support integrating into existing native apps
The text was updated successfully, but these errors were encountered: