Update on Cordova apps on iOS 10

Discussion and feedback on Construct 2

Post » Fri Oct 14, 2016 4:15 pm

As of the latest beta, UIWebView should be working again. So if you have trouble with WKWebView, you should be able to move back to UIWebView and have it work on iOS 10 as of r237. There's also a few more WKWebView fixes in that build. It's unusual for minor iOS releases to make any significant changes, I would initially expect that if it's not working it's not the iOS update that broke it, but who knows.

The new WKWebView detection code should be working OK, if you change it you'll probably just break things now. In general if you change the runtime script directly without properly understanding what you're doing, you're probably just going to break things and waste time and increase your own frustration.

Honestly I'm not sure what you want me to say, I'm not telepathic and I can't magically fix the problem because you complained in the forum. WKWebView can sometimes use more memory, so maybe your app is running out of memory. I kind of just have to assume that's what's happening. If you don't provide your .capx or submit a bug report what do you expect me to do? I do test with a few large projects that I've been sent in the past, including source files for Airscape and The Next Penelope, which work fine everywhere I've run them (which is not everywhere, we support loads of platforms and configurations, but the point is I do and can test with large projects). The main problem with these demos though is they're designed for PC, both in specs and user input, so I'm always happy to have different large projects to test with. I do sometimes test very large projects, and it runs out of memory and crashes, and so I have to say sorry, you need to reduce the memory use.

If you don't think running out of memory is the problem, you can still try to reproduce it: create a new empty project and just jam it full of your game's images/assets/whatever, and see if it breaks sooner than it ought to considering the device's RAM. If it does, now you have an ideal .capx to submit for a bug report. IIRC nobody has done that, for NW.js, for Cordova/WKWebView, etc. Considering it has been very common in the past for people to make games that waste memory and crash the app and then blame Construct 2, I sort of just assume it's that unless you can prove otherwise.
Scirra Founder
B
402
S
238
G
89
Posts: 24,637
Reputation: 196,071

Post » Fri Oct 14, 2016 10:01 pm

Memory waste isn't an issue if the game works flawless in iOS 9 and sudden fails to load in iOS 10+.. I've sent you the CAPX, I have a feeling there's an error with some of the WKWebView workaround no longer functional in iOS10. Hopefully you nail the bug.
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,616

Post » Mon Oct 17, 2016 6:00 pm

@Silverforce - thanks for sending the .capx. It looks like WKWebView mode can spike memory usage while loading. The next build has a mitigation which should help a lot with that.
Scirra Founder
B
402
S
238
G
89
Posts: 24,637
Reputation: 196,071

Post » Tue Oct 18, 2016 11:15 pm

Thanks @Ashley!

I've just tested the new build and the WKWebView in XDK/Cordova now loads up fine and runs great.
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,616

Post » Wed Oct 19, 2016 9:37 am

Great, thanks for confirming.
Scirra Founder
B
402
S
238
G
89
Posts: 24,637
Reputation: 196,071

Post » Sun Oct 23, 2016 3:54 pm

Looking for clarification:
It's been mentioned in several places that WKWebView works on iOS9+, but Apple (https://developer.apple.com/reference/webkit/wkwebview) and several Scirra posts (https://www.scirra.com/blog/150/html5-game-performance-on-ios-8), https://www.scirra.com/blog/174/boosting-ios-performance-with-wkwebview), report that WKWebView was added in iOS8. It would be nice to have this cleared up, as the implication is that exporting in Cordova, with the WKWebView option on, only works for iOS9+, even though the minimum iOS setting still defaults to 8.0+.
Since I don't have an iOS8 device to test against, it would be nice to know if the new setting will break iOS8 or not.
ImageImageImage
B
71
S
22
G
258
Posts: 3,791
Reputation: 143,198

Post » Sun Oct 23, 2016 9:52 pm

@blackhornet

Technically Apple added WKWebView in iOS8, but it was a partial & broken implementation as it would not allow loading from local files and it did not allow LocalStorage to work properly. There were also major audio bugs.

In iOS9, these issues were resolved thus the Cordova WKWebView plugin only supports iOS9+!
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,616

Post » Mon Oct 24, 2016 2:07 am

C2 should not allow an export of WKWebView & iOS8 then.
ImageImageImage
B
71
S
22
G
258
Posts: 3,791
Reputation: 143,198

Post » Mon Oct 24, 2016 11:25 am

blackhornet wrote:C2 should not allow an export of WKWebView & iOS8 then.

That's still a valid configuration, since it will fall back to UIWebView on iOS 8 and use WKWebView on iOS 9+.
Scirra Founder
B
402
S
238
G
89
Posts: 24,637
Reputation: 196,071

Post » Thu Nov 03, 2016 1:03 pm

Great to see this has been fixed, sorry to moan but it did seem to help get the job done! The reason I didn't send a capx is because I was 99% sure the problem was with WKWebView mode and not my game, though next time I will send one. I haven't had a chance to test WKWebView yet but at least my UIWebView builds are working with iOS 10 now which is great!
B
11
S
3
Posts: 135
Reputation: 1,309

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 4 guests