You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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 RCTAppDelegate in your view controller. I can provide more details on how to do it if you start a PR in the repo (Also, I see that the codebase is in Swift, the new architecture is mostly in C++, so we would have to add some Objective-C/Objective-C++ files there).
cc. @okwasniewski which is helping out with the ReactNativeFactory effort.
Thanks a lot for the reply @cipolleschi! I've actually already gotten in touch with @okwasniewski after I discovered his PR for ReactNativeFactory - while I wait for him with this, I'll give rewriting the library in Objective-C a try. Will ping you here once I got a PR going 🙏
@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!
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: