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
Run this snack either in the browser on on an iOS device. If running inside snack, make sure you pick iOS.
Tap the "broken" and "works" button see nothing happens.
Now reload snack / device in android instead and see the buttons working.
Expected Behavior
I was hoping I could get access to globally exposed methods on the webview in both iOS and Android.
Actual Behavior
From my investigation it seems all javascript commands are being ignored on iOS which the snack I linked also shows this behavior. You can change the js to anything and it just doesn't respond. Android works exactly as expected.
Perhaps I'm doing something wrong, but the fact that it works on Android makes me think it's a bug in the Webview component itself.
Are you able to reproduce this in a vanilla React-Native project running the same RN version corresponding to the SDK version's fork? If so, it would indicate that it's actually an RN issue rather than an Expo one and should be filed here. If it's only occurring in an Expo project, we'll be happy to investigate.
Environment
Expo CLI 2.6.14 environment info:
System:
OS: macOS 10.14.3
Shell: 5.3 - /bin/zsh
Binaries:
Node: 10.15.0 - /usr/local/bin/node
Yarn: 1.12.3 - /usr/local/bin/yarn
npm: 6.4.1 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
IDEs:
Android Studio: 3.2 AI-181.5540.7.32.5056338
Xcode: 10.1/10B61 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.1 => 16.8.1
npmGlobalPackages:
expo-cli: 2.6.14
Building for both Android and iOS. But the problem only occurs on iOS.
Steps to Reproduce
https://snack.expo.io/@mackbrowne.prodigy/webview-injectjavascript
Expected Behavior
I was hoping I could get access to globally exposed methods on the webview in both iOS and Android.
Actual Behavior
From my investigation it seems all javascript commands are being ignored on iOS which the snack I linked also shows this behavior. You can change the js to anything and it just doesn't respond. Android works exactly as expected.
Perhaps I'm doing something wrong, but the fact that it works on Android makes me think it's a bug in the Webview component itself.
Reproducible Demo
https://snack.expo.io/@mackbrowne.prodigy/webview-injectjavascript
instructions above.
The text was updated successfully, but these errors were encountered: