gree / gree/unity-webview

iOS white screen on build

Open
#589 5 comments 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

Hello, I am using the latest version of unity-webview.
It works good on Android and iOS Simulator, but doesn't work on iOS build ( doesn't load html).

Local path generator

    public string generatePath(string path)
    {
#if (UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX || UNITY_IOS) && !UNITY_EDITOR_WIN
        return Path.Combine("file://" + Application.streamingAssetsPath, path);
#elif UNITY_ANDROID
        return Path.Combine("file:///android_asset/", path);
#else
        return Path.Combine("file://" + Application.streamingAssetsPath, path);
#endif
    }

And using

webViewObject.LoadURL(generatePath("local_www/History/History_XIX.html"));

What can cause this behavior?

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 white screen on an iOS build rather than the simulator, then inspect the generatePath method and the webViewObject.LoadURL call. Compare the local HTML path behavior across the UNITY_IOS and UNITY_ANDROID branches; done means identifying why local_www/History/History_XIX.html fails to load on the iOS build and documenting or fixing that behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, ios, unity
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.