Skip to content
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

fix: Ads not loading - Enqueue window post messages until it's ready #1349

Merged
merged 2 commits into from
Sep 25, 2018

Conversation

tuncaulubilge
Copy link
Contributor

@tuncaulubilge tuncaulubilge commented Sep 24, 2018

window.postMessage doesn't work until the webView is loaded. Our previous fix for this was to add a timeout to postMessages, but that's not 100% reliable. Implemented a separate approach where the window enqueues messages until post message is ready:

Based on: facebook/react-native#11594 (comment)

}
});
}

window.eventCallback = (type, detail) => {
// delay until next frame as React Native message bridge is not set up immediately
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can remove the comment

@craigbilner craigbilner merged commit e620b3f into master Sep 25, 2018
@craigbilner craigbilner deleted the fix/multiple-ads-not-loading branch September 25, 2018 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants