Using Cordova (PhoneGap) with Phaser 3 and using Image Not Appearing in iOS but Appears in Browser

Hi,

I am trying to use Phaser 3 inside a Cordova App.
My code is really simple. I just present a image on the screen.

class playGame extends Phaser.Scene{
    constructor() {
        super("PlayGame");
    }

    create(){
        this.add.image(0, 0, "emptytile");        
    }
    
}

I have remembered to pre-load the image too:
this.load.image("emptytile", "assets/sprites/emptytile.png");

When I run: cordova run browser
everything works fine and the correct image is diplayed.

However in the ios version…when I run: cordova run ios
The image is not displayed and instead I see a placeholder for the image.

What is the reason for this and how to fix this???

Did you find a solution? I’m struggling with the same thing in Android Studio.

Hi
yes i did
Use this plugin

cordova plugin add https://github.com/AraHovakimyan/cordova-plugin-wkwebviewxhrfix
1 Like

This is the plugin you need for android:

cordova plugin add cordova-plugin-ionic-webview@latest

https://github.com/ionic-team/cordova-plugin-ionic-webview

Thank you!!

[quote="bliss, post:3, topic:9176"]

cordova plugin add GitHub - AraHovakimyan/cordova-plugin-wkwebviewxhrfix: Cordova iOS plugin to fix local file access via XHR with WKWebView with Cordova iOS 6+ support.

[/quote]