How to access rootViewController from React-Native

I am creating a React-Native module to access Admob. But the GADBannerView object requires the execution of the rootViewController. Do you know how to create an interactive view / module for this? Thank you very much.

+5
source share
1 answer

From the C source code in your module, you can access the application root view controller as follows:

UIViewController *rootViewController = [UIApplication sharedApplication].delegate.window.rootViewController; 
+6
source

Source: https://habr.com/ru/post/1216344/


All Articles