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 webos white screen #1444

Merged
merged 8 commits into from Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 4 additions & 12 deletions packages/app-harness/package.json
Expand Up @@ -79,16 +79,8 @@
"rnv": "1.0.0-rc.12"
},
"private": true,
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
"browserslist": [
">0.2%",
"op_mini all"
]
}
18 changes: 0 additions & 18 deletions packages/core/jsonSchema/rnv.app.json
Expand Up @@ -1836,9 +1836,6 @@
"environment": {
"type": "string"
},
"hostedShellHeaders": {
"type": "string"
},
"webpackConfig": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -1968,9 +1965,6 @@
"environment": {
"$ref": "#/definitions/rnv.app/properties/platforms/properties/tizen/properties/environment"
},
"hostedShellHeaders": {
"$ref": "#/definitions/rnv.app/properties/platforms/properties/tizen/properties/hostedShellHeaders"
},
"webpackConfig": {
"$ref": "#/definitions/rnv.app/properties/platforms/properties/tizen/properties/webpackConfig"
}
Expand Down Expand Up @@ -2090,9 +2084,6 @@
"environment": {
"$ref": "#/definitions/rnv.app/properties/platforms/properties/tizen/properties/environment"
},
"hostedShellHeaders": {
"$ref": "#/definitions/rnv.app/properties/platforms/properties/tizen/properties/hostedShellHeaders"
},
"webpackConfig": {
"$ref": "#/definitions/rnv.app/properties/platforms/properties/tizen/properties/webpackConfig"
},
Expand Down Expand Up @@ -2203,9 +2194,6 @@
"environment": {
"$ref": "#/definitions/rnv.app/properties/platforms/properties/tizen/properties/environment"
},
"hostedShellHeaders": {
"$ref": "#/definitions/rnv.app/properties/platforms/properties/tizen/properties/hostedShellHeaders"
},
"webpackConfig": {
"$ref": "#/definitions/rnv.app/properties/platforms/properties/tizen/properties/webpackConfig"
},
Expand Down Expand Up @@ -2343,9 +2331,6 @@
"environment": {
"$ref": "#/definitions/rnv.app/properties/platforms/properties/tizen/properties/environment"
},
"hostedShellHeaders": {
"$ref": "#/definitions/rnv.app/properties/platforms/properties/tizen/properties/hostedShellHeaders"
},
"buildSchemes": {
"type": "object",
"additionalProperties": {
Expand Down Expand Up @@ -2464,9 +2449,6 @@
},
"environment": {
"$ref": "#/definitions/rnv.app/properties/platforms/properties/tizen/properties/environment"
},
"hostedShellHeaders": {
"$ref": "#/definitions/rnv.app/properties/platforms/properties/tizen/properties/hostedShellHeaders"
}
},
"additionalProperties": false
Expand Down
18 changes: 0 additions & 18 deletions packages/core/jsonSchema/rnv.project.json
Expand Up @@ -2191,9 +2191,6 @@
"environment": {
"type": "string"
},
"hostedShellHeaders": {
"type": "string"
},
"webpackConfig": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -2323,9 +2320,6 @@
"environment": {
"$ref": "#/definitions/rnv.project/properties/platforms/properties/tizen/properties/environment"
},
"hostedShellHeaders": {
"$ref": "#/definitions/rnv.project/properties/platforms/properties/tizen/properties/hostedShellHeaders"
},
"webpackConfig": {
"$ref": "#/definitions/rnv.project/properties/platforms/properties/tizen/properties/webpackConfig"
}
Expand Down Expand Up @@ -2445,9 +2439,6 @@
"environment": {
"$ref": "#/definitions/rnv.project/properties/platforms/properties/tizen/properties/environment"
},
"hostedShellHeaders": {
"$ref": "#/definitions/rnv.project/properties/platforms/properties/tizen/properties/hostedShellHeaders"
},
"webpackConfig": {
"$ref": "#/definitions/rnv.project/properties/platforms/properties/tizen/properties/webpackConfig"
},
Expand Down Expand Up @@ -2558,9 +2549,6 @@
"environment": {
"$ref": "#/definitions/rnv.project/properties/platforms/properties/tizen/properties/environment"
},
"hostedShellHeaders": {
"$ref": "#/definitions/rnv.project/properties/platforms/properties/tizen/properties/hostedShellHeaders"
},
"webpackConfig": {
"$ref": "#/definitions/rnv.project/properties/platforms/properties/tizen/properties/webpackConfig"
},
Expand Down Expand Up @@ -2698,9 +2686,6 @@
"environment": {
"$ref": "#/definitions/rnv.project/properties/platforms/properties/tizen/properties/environment"
},
"hostedShellHeaders": {
"$ref": "#/definitions/rnv.project/properties/platforms/properties/tizen/properties/hostedShellHeaders"
},
"buildSchemes": {
"type": "object",
"additionalProperties": {
Expand Down Expand Up @@ -2819,9 +2804,6 @@
},
"environment": {
"$ref": "#/definitions/rnv.project/properties/platforms/properties/tizen/properties/environment"
},
"hostedShellHeaders": {
"$ref": "#/definitions/rnv.project/properties/platforms/properties/tizen/properties/hostedShellHeaders"
}
},
"additionalProperties": false
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/schema/platforms/fragments/web.ts
Expand Up @@ -4,5 +4,4 @@ export const PlatformWebFragment = {
timestampBuildFiles: z.array(z.string()).optional(),
devServerHost: z.string().optional(),
environment: z.string().optional(),
hostedShellHeaders: z.string().optional(),
};
3 changes: 3 additions & 0 deletions packages/engine-rn-tvos/templates/platforms/tvos/Podfile
Expand Up @@ -52,6 +52,8 @@ target 'RNVApp-tvOS' do
config = use_native_modules!
platform :tvos, '{{INJECT_PLUGIN_DEPLOYMENT_TARGET}}'

{{INJECT_PLUGIN_PATHS}}

use_react_native!(
:path => config[:reactNativePath],
# Enables Flipper.
Expand Down Expand Up @@ -79,6 +81,7 @@ post_install do |installer|
config[:reactNativePath],
:mac_catalyst_enabled => false
)
{{INJECT_POST_INSTALL}}
end

{{INJECT_PLUGIN_PODFILE_INJECT}}
5 changes: 0 additions & 5 deletions packages/engine-rn-web/src/tasks/taskRun.ts
Expand Up @@ -51,7 +51,6 @@ const _configureHostedIfRequired = async (c: RnvContext) => {
logTask('_configureHostedIfRequired');

const bundleAssets = getConfigProp(c, c.platform, 'bundleAssets', false);
const hostedShellHeaders = getConfigProp(c, c.platform, 'hostedShellHeaders') || '';

if (!bundleAssets && !existBuildsOverrideForTargetPathSync(c, path.join(getPlatformProjectDir(c)!, 'index.html'))) {
logDebug('Running hosted build');
Expand All @@ -66,10 +65,6 @@ const _configureHostedIfRequired = async (c: RnvContext) => {
pattern: '{{DEV_SERVER}}',
override: `http://${ipAddress}:${c.runtime.port}`,
},
{
pattern: '{{APPSHELL_HTML_HEADER}}',
override: String(hostedShellHeaders || ''),
},
],
undefined,
c
Expand Down
35 changes: 3 additions & 32 deletions packages/engine-rn-web/templates/appShell/index.html
@@ -1,34 +1,5 @@
<html>

<head>
<meta charset="UTF-8">
<title>App Shell</title>
<style>
body {
background-color: white;
}
</style>
{{APPSHELL_HTML_HEADER}}
pavjacko marked this conversation as resolved.
Show resolved Hide resolved
</head>

<body style="margin:0px;padding:0px;overflow:hidden">
<iframe style="margin:0px;padding:0px;overflow:hidden" id="iframe" height="100%" width="100%" frameborder="0"
scrolling="no" allowfullscreen="true">
</iframe>
<script>
var href = '{{DEV_SERVER}}';

setTimeout( function () {
var iframe = document.getElementById( 'iframe' );
iframe.src = href
iframe.onload = function () {
if ( typeof tizen !== "undefined" ) iframe.contentWindow.tizen = tizen;
if ( typeof webapis !== "undefined" ) iframe.contentWindow.webapis = webapis;
if ( typeof webOS !== "undefined" ) iframe.contentWindow.webOS = webOS;
if ( typeof webOSDev !== "undefined" ) iframe.contentWindow.webOSDev = webOSDev;
}
}, 5000 );
</script>
</body>

<head>
<meta http-equiv="refresh" content="0;url={{DEV_SERVER}}" />
</head>
</html>
39 changes: 19 additions & 20 deletions packages/engine-rn-web/templates/platforms/webos/public/index.html
@@ -1,18 +1,18 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta name="description" content="{{configProps.description}}" />
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta name="description" content="{{configProps.description}}" />
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!--
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Expand All @@ -21,14 +21,14 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>{{configProps.title}}</title>
<script type="text/javascript" src="%PUBLIC_URL%/webOSTVjs-1.1.1/webOSTV.js"></script>
<%= injectedScripts %>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
<title>{{configProps.title}}</title>
<script type="text/javascript" src="%PUBLIC_URL%/webOSTVjs-1.2.8/webOSTV.js"></script>
<%= injectedScripts %>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.

Expand All @@ -37,6 +37,5 @@

To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
--></body>
</html>