Skip to content

Commit

Permalink
Refine WXRNLoadIdlingResource to wait for RCTJavaScriptDidLoadNotific…
Browse files Browse the repository at this point in the history
…ation rather than RCTContentDidAppearNotification

Fixes #933
  • Loading branch information
LeoNatan committed Oct 2, 2018
1 parent 46bedf4 commit 0e35ed8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion detox/ios/Detox/ReactNativeSupport.m
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,9 @@ + (void)waitForReactNativeLoadWithCompletionHandler:(void (^)(void))handler
{
__block __weak id observer;

observer = [[NSNotificationCenter defaultCenter] addObserverForName:@"RCTContentDidAppearNotification" object:nil queue:nil usingBlock:^(NSNotification * _Nonnull note) {
observer = [[NSNotificationCenter defaultCenter] addObserverForName:@"RCTJavaScriptDidLoadNotification" object:nil queue:nil usingBlock:^(NSNotification * _Nonnull note) {

NSLog(@"1");

if(handler)
{
Expand Down

0 comments on commit 0e35ed8

Please sign in to comment.