Skip to content

window.postMessage not working in IOS #1155

@zeeshantapfire

Description

@zeeshantapfire

I am building a multiplayer game for IOS and android and when everything is ready I send match data to webview

IEnumerator DelayRoutine()
{
    yield return new WaitUntil(() => { return IsLoadingDone; }); // Wait for Webview Loading done

    webViewObject.EvaluateJS($@"window.postMessage({data}); ");
    matchStarted = true;

    yield return new WaitForSeconds(1f);

    WindowsManager.Get.ShowWindow<HudWindow>();
}

Thats the piece of code responsible for sending data to webview.
" webViewObject.EvaluateJS($@"window.postMessage({data}); ") "

this piece of code is working fine in Android, but its not working in IOS. I also have done this step " enableWKWebView: true ".

Appreciate you help in this regard. Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions