Hi all!
I have problem (black screen) with wkwebview and XDK, after a long time to find a solution I turned to Intel and engineers gave this answer:
-------------------------------------------------------------------------------------------------------
I'm not sure what is going on in this block of code from c2_runtime.js:
a.prototype.HF = function() {
var a = this;
if (this.Pj)
this.Gw.startServer({
port: 0,
localhost_only: !0
},
Pj is true with WKWebView and false with UIWebView, it gets initialized like this:
this.Pj=!!(this.Eb && this.Md && window.indexedDB);
window.indexedDB is false with UIWebView.
Hmm, when I started writing this I didn't look at that line carefully enough.
Gw is supposed to get initialized as cordova.plugins.CorHttpd:
this.Pj && (this.Gw = cordova && cordova.plugins && cordova.plugins.CorHttpd ? cordova.plugins.CorHttpd : null);
It is checking if a plugin is installed: cordova.plugins.CorHttpd:
https://github.com/floatinghotpot/cordova-httpd
It looks like construct2 is detecting wkwebview and expecting that plugin to be present with wkwebview.
I added the plugin to the project and built it again, but it still doesn't work.
I think it needs the AWS scripts.
I think he needs to do a few things to get this working with WKWebView:
1. add the cordova-httpd plugin
Note that this is not an Intel XDK recommendation; based on my analysis it seems to be a Construct2 requirement.
He might be able to get more info via Contruct2 docs or support.
2. direct file XHR requests to the local webserver run by cordova-httpd (the endpoint can be obtained by calling the getURL method of the plugin)
possibly construct2 may have a way of doing this for the user?
3. defer loading the aws scripts until after the local webserver has started
I think I'll stop here as it seems like there are some Contruct2 requirements that we or the user needs to learn more about.
I guess we could get in touch with Scirra if this customer is important or represents a class of users that we want to support.
Or if you can find more docs or information about using WKWebView with Construct2, I'd like to read it.
The only thing I could find was this blog post, which does not provide any integration information:
https://www.scirra.com/blog/174/boostin ... -wkwebview
Maybe Scirra's XDK export is not doing everything it needs to in order to allow this to work?
-------------------------------------------------------------------------------------------------------
Ashley what you can say about it?
Thank you.