fix(mobile): issue with black screen on iOS (#1777)

This commit is contained in:
Mo
2022-10-11 09:08:34 -05:00
committed by GitHub
parent b80b04d374
commit 9fc77d861e
5 changed files with 12 additions and 6 deletions

View File

@@ -80,7 +80,7 @@
"react-native-url-polyfill": "^1.3.0",
"react-native-vector-icons": "^9.1.0",
"react-native-version-info": "^1.1.1",
"react-native-webview": "11.17.2",
"react-native-webview": "11.23.1",
"react-native-zip-archive": "^6.0.6",
"react-navigation-header-buttons": "^9.0.1",
"styled-components": "5.3.5"

View File

@@ -204,6 +204,12 @@ const MobileWebAppContents = ({ destroyAndReload }: { destroyAndReload: () => vo
onError={(err) => console.error('An error has occurred', err)}
onHttpError={() => console.error('An HTTP error occurred')}
onMessage={onMessage}
onContentProcessDidTerminate={() => {
webViewRef.current?.reload()
}}
onRenderProcessGone={() => {
webViewRef.current?.reload()
}}
allowFileAccess={true}
allowUniversalAccessFromFileURLs={true}
injectedJavaScriptBeforeContentLoaded={injectedJS}