-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
v0.76: How to integrate with existing iOS apps using a view controller instead of app delegate #4311
Comments
Hi @MaxAst thanks for the question. Currently there is no easy way to do so. The old architecture only required the RootView and the Bridge to set up React Native and this made it easy to spin up a React Native instance from wherever. The New Architecture is a bit more complicated and we encapsulated all the required steps in the AppDelegate. We are working on some changes to make it easier to instantiate React native from wherever, decoupling it from the AppDelegate, but it is not ready yet. As of today, the best way to achieve this is probably to copy some of the implementation in the cc. @okwasniewski which is helping out with the |
Thanks a lot for the reply @cipolleschi! I've actually already gotten in touch with @okwasniewski after I discovered his PR for |
@MaxAst There is no need to rewrite the whole library in Objective-C! You can just wrap the things you need in an Objective-C layer and keep the Swift implementation! |
Hey @cipolleschi @okwasniewski, I just managed to get it work with RCTRootViewFactory! https://github.com/MaxAst/expo-share-extension/pull/50/files However, I'm still not quite there yet - There seems to be a problem with styling because This is the component:
and this is what it looks like: |
Can't wait for this! |
Description
Up until v0.76, the guide on how to integrate React Native in existing iOS apps used a view controller instead of an app delegate. With the new app delegate approach in v0.76 it's unclear whether it is still possible to integrate React Native with just a view controller.
What is the problem?
I used to be able to integrate React Native in iOS share extensions using the view controller approach. Since iOS share extensions do not support app delegates, it's unclear how to integrate React Native's new architecture in share extensions.
How can we address it?
Add documentation covering how to integrate v0.76 via just a view controller.
Why is it important?
It's currently not clear how to integrate React Native's new architecture in iOS app extensions.
Who needs this?
I am the author of expo-share-extension and would like to integrate the new architecture.
When should this happen (use version numbers if needed)?
Ideally in a next release
The text was updated successfully, but these errors were encountered: