-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
iOS: Hybrid app with native first screen never reports that it's ready #933
Comments
I’ll look at this when I get back from my vacation. Thanks |
May I ask why you load the bundle on launch? Just want to understand the usecase. |
@Ilushkanama 👆🏻 |
The mobile app I am developing for is also structured this way - bundle load on launch / first screen, and it also runs into this problem. I am new to the codebase so I can't say exactly why we do things this way, although it might be pertinent that we use Haul for bundling rather than expo or metro. I am not an iOS developer, so I wasn't able to do targeted debugging (outside of the detox verbose logging) like Ilushkanama did, but at minimum I did attempt to fix the problem via the same method and it was insufficient to fix the problem, in this case. Adding a 'dummy' react view to the launch screen is my hacky fix |
That's is a workaround, not a fix. |
@LeoNatan we have onboarding as initial screen, which most of the users only see once. Right after the initial screen user is taken to the main screen, which contains RN things. RN bundle takes ~2 seconds to load. Basically, we have two scenarios for app launch:
In the second case, it's obvious why we need to load RN bundle on launch - it's required by RN stuff on the main screen. |
Thanks |
…ation rather than RCTContentDidAppearNotification Fixes #933
…ntDidAppear (#964) * Refine WXRNLoadIdlingResource to wait for RCTJavaScriptDidLoadNotification rather than RCTContentDidAppearNotification Fixes #933 * Test Signed-off-by: Leo Natan <[email protected]> * Revert "Test" This reverts commit a4f24ab. Signed-off-by: Leo Natan <[email protected]> * Update ReactNativeSupport.m
Description
This issue follows #615. The problem supposed to be resolved but we ran into it when we tried to use Detox to test a hybrid app.
Our app loads RN bundle on launch, but start screen has no RN content. If we log what
grey_busyResourcesReturnEarly:
calls result to, logs show that the function returns a set with singleWXRNLoadIdlingResource
element. Changing notification name inwaitForReactNativeLoadWithCompletionHandler:
fromRCTContentDidAppearNotification
toRCTJavaScriptDidLoadNotification
resolves the issue.Steps to Reproduce
You can reproduce this issue trying to test a hybrid app with native start screen. I can create test project if it's needed.
Detox, Node, Device, Xcode and macOS Versions
Device and verbose Detox logs
Detox logs contain following output:
The text was updated successfully, but these errors were encountered: