I was facing this same issue when launching a react native module from iOS native module.
Replacing below mentioned code using BUNDLE URL
if let bundleUrl = (UIApplication.shared.delegate as? AppDelegate)?.bridge?.bundleURL {
let mockData:NSDictionary = ["names":
[
["name":"Name 1",],
["name":"Name 2"]
]
]
let rootView = RCTRootView(bundleURL: bundleUrl, moduleName: "modulename", initialProperties: mockData as [NSObject : AnyObject], launchOptions: nil)
let vc = UIViewController()
vc.view = rootView
self.present(vc, animated: true, completion: nil)
with this updated code using BRIDGE
if let bridge = (UIApplication.shared.delegate as? AppDelegate)?.bridge {
let mockData:NSDictionary = ["names":
[
["name":"Name 1",],
["name":"Name 2"]
]
]
let rootView = RCTRootView(bridge: bridge, moduleName: "modulename", initialProperties: mockData as [NSObject : AnyObject])
let vc = UIViewController()
vc.view = rootView
self.present(vc, animated: true, completion: nil)
}
resolve the issues!!