You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Android and iOS platforms differ in the order in which they setup the linkBridge. The iOS version sets the bridge up first then executes user supplied scripts. However, Android does this in the reverse order. The iOS order is preferred and considered to be the correct order. This has caused an issue with our application in that we want to override the postMessage of the bridge, but out code executes prior to the bridge being configured, which means we have to resort to a hack of setting a setTimeout. This is not necessary with the iOS version.
We're cutting down on the number of outstanding issues, in order to allow us to focus. I'm closing this issue because it has been open for over 60 days with no activity. If you think it should still be opened let us know why. PRs are always welcome.
This does not seem to have been resolved. Its a quick fix for anyone who has the environment setup. In our case we ended up with a fully custom WebView for Android and iOS. As such this fix isn't important to us, but I believe it is still important! Here's the offending code:
Description
The Android and iOS platforms differ in the order in which they setup the linkBridge. The iOS version sets the bridge up first then executes user supplied scripts. However, Android does this in the reverse order. The iOS order is preferred and considered to be the correct order. This has caused an issue with our application in that we want to override the postMessage of the bridge, but out code executes prior to the bridge being configured, which means we have to resort to a hack of setting a setTimeout. This is not necessary with the iOS version.
Android implementation:
iOS
Solution
Swap these two lines in the Android version:
to be this:
Additional Information
The text was updated successfully, but these errors were encountered: