gree / gree/unity-webview

cannot load css / image file

Open
#919 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Objective-C++
Stars
2.7k
Forks
734
Avg merge
11h 39m
Merged PRs (30d)
1

Description

I am using the latest version (downloaded at 2023/4/28) of this Plugin, Unity 2019.4 , and Xcode 14.2.
There is no problem with the building of my app, but webview only shows html, without loading the css file or the image file.
So, the html tag works well, but image is not loaded, and css is also not loaded.
The file is on server (not local), so I can check from browser that the css is loaded as usual in browser.

In Unity, I have enableWkWebView: true

to add the information.
I have this metatag in my html file:
<meta name="csp-nonce" content="xxxx">
This was for security reason, but when I removed this metatag, Webview didn't work at all (Unity code showing in iPhone).

Please help! Anyone with similar experience?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue in Unity 2019.4 with enableWkWebView enabled, using the server-hosted HTML and the csp-nonce meta tag described in the report. Check the webview's handling of the external CSS, image resources, and CSP behavior on iOS. Done means the webview loads the HTML together with its CSS and images without breaking the page when the meta tag is present.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, unity
Domain
mobile-dev, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.