Since the update r226 (I guess) the option "Use WKWebView for iOS" was added to construct 2.
Since that all exports (even if this option is unchecked) for iOS crashes on Cocoon,
because the game needs the Cordova-httpd plugin.
- Code: Select all
this.isWKWebView = !!(this.isiOS && this.isCordova && window.indexedDB);
this.httpServer = null;
this.httpServerUrl = "";
if (this.isWKWebView)
{
this.httpServer = (cordova && cordova["plugins"] && cordova["plugins"]["CorHttpd"]) ? cordova["plugins"]["CorHttpd"] : null;
}
Correct me if I'm wrong, but shouldn't this plugin be needed when the option was disabled?
CocoonIO doesn't support this plugin
It seems that when using the WKWebview Construct2 requires the cordova-httpd plugin to be present to load the data.js otherwise it fails. Not sure why they are doing this but that plugin doesn't work in the Develop app as we read files form other directory than the main Bundle and that plugin tries to get the files from there only.
The only fix I see that you can do is to comment that if (this.isWKWebView) block and let it load the data.js using just xhr.
Quote by the cocoon developer Imanol
More here: https://forums.cocoon.io/t/black-screen ... os/2277/20
So the only way to fix it at the moment is to add !this.isCocoonjs to avoid the crash. But this fix has to be done after each export.

So is there a way to disable the use of the cordova-httpd plugin when the option "Use WKWebView for iOS" is unchecked? Or to implement the fix with !this.isCocoonJs?
Thank you for your time,
Regards
Andy
Attach a Capx
not relevant for this matter
Construct 2 Version ID
r227