Native iOS app crashed when integrated with public container.
Closed this issue · 0 comments
quanghoang0101 commented
Reproduce steps:
-
Created local container with a fews mini app
ern create-container --miniapps ...
-
Tranform container:
ern transform-container -p ios -t xcframework
-
Public xcframework to git repo
https://github.com/quanghoang0101/ewallet-container-framework/releases/tag/v1.0.1
-
Installed xcframework from cocoa pod
pod 'ElectrodeContainer', :git => 'https://github.com/quanghoang0101/ewallet-container-framework', :tag => 'v1.0.1'
-
Init container in native project:
`func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {let containerConfig = ElectrodeContainerConfig() containerConfig.debugEnabled = false ElectrodeReactNative.start(withConfigurations: containerConfig, ernDelegate: nil) window = UIWindow(frame: UIScreen.main.bounds) window?.rootViewController = UIViewController() window?.makeKeyAndVisible() return true
}`
- Run native project and it crashed:
`Invariant Violation: "" has not been registered. This can happen if:
- Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
- A module failed to load due to an error and `AppRegistry.registerComponent` wasn't called.`
I don't know which step was wrong.