'Difference between react native webview in dev and binary
I have a React Native app build with expo. In the app there is a HTML5 game with WebGL (Created with Construct 3) in a react-native-webview.
In developer mode (in expo go app) this works well for both android and iOS. But when building the binary and releasing in google play as a standalone app, the game stops working on android.
The css loads (background color) and the music is playing, but no graphics are loaded. The game is still "playable" (i can tell by the sound effects when touching the screen), but theres nothing but a blank page. No error messages in the console.
It works well on iOS in the standalone app.
The game is hosted on s3 and it works fine when opening the game with it's url in chrome on android.
My question is: what is the difference between the webview in development and standalone app? And what could possibly be the cause of this behaviour?
Here's the webview:
<WebView
ref={ref}
cacheEnabled={false}
source={source}
startInLoadingState
javaScriptEnabled
scrollEnabled={false}
thirdPartyCookiesEnabled={false}
setBuiltInZoomControls={false}
contentMode={'mobile'}
androidLayerType="hardware"
incognito
scalesPageToFit
cacheMode={'LOAD_NO_CACHE'}
sharedCookiesEnabled={false}
allowFileAccess={false}
originWhitelist={['*']}
/>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
