Export to IOS - Blackscreen on Intel XDK

Discussion and feedback on Construct 2

Post » Sat Jul 30, 2016 9:41 am

Hi every one,
I'm facing problem with exporting to IOS but I don't know how to solve: black screen in emulate tab of Intel XDK.
The process I have done:
- Create a simple game with 1 layout with C2 (both R227 and R230 same issue). Layout have only 1 sprite and 1 text.
- Export to Cordova with Minify script uncheck, WKWebview uncheck (or check same issue), minium IOS: 8+
- Open project in intel XDK. But in Emulate tab, I always face black screen after splash screen with IOS device ( iphone5, iphone 6).
Could you tell me the process to export to IOS and make it work?
Many thanks.
B
18
S
10
Posts: 21
Reputation: 1,640

Post » Sun Sep 18, 2016 2:16 pm

I could get past the 'blank screen'-problem by exporting it without checking the 'WKWebview on iOS'-option in C2 and checking the 'Use the new Intel XDK project format'-option. Then import the project in intel XDK by opening the project-XDK file.

I edited the 'c2runtime.js'-file and commented out the following lines (result):
//this.isWKWebview....
//if (this.isWKWebview)
//{
// this.httpServer
//}

After this the simulation works in XDK for iOS devices and the iOS build seems to work on my device. Haven't tested it thoroughly though.
B
6
S
2
Posts: 7
Reputation: 466

Post » Mon Sep 19, 2016 12:17 am

@markvk Can you explain what you mean by "opening the project-XDK file"? Thanks.
B
42
S
16
G
3
Posts: 169
Reputation: 4,383

Post » Mon Sep 19, 2016 1:15 am

I got my game loading again by simply creating a new project in XDK. Ads are not displaying so I will work on that now, but I wanted to let you know.
B
42
S
16
G
3
Posts: 169
Reputation: 4,383

Post » Wed Sep 21, 2016 7:58 pm

CDogs1964 wrote:@markvk Can you explain what you mean by "opening the project-XDK file"? Thanks.

I meant opening by:
- start Intel XDK
- choose 'Open an Intel XDK project' (bottomleft)
B
6
S
2
Posts: 7
Reputation: 466

Post » Tue Oct 04, 2016 9:12 pm

Tried the above mentioned fix... still nothing and it just shows the black screen on test devices as well.
B
6
S
1
Posts: 27
Reputation: 472

Post » Wed Oct 12, 2016 6:01 pm

Really, it worked for me perfectly.
B
6
S
2
Posts: 7
Reputation: 466

Post » Thu Oct 13, 2016 12:57 am

I have been Reading forums in scirra and Intel XDK official page. I found one solution there and one by myself.

First, this problem seems to be caused mostly in iOS 10 devices, principally because the app is crashing due the WKview use.

There is the option shown in the XDK fórum:

Replace the line
1 this.isWKWebView = !!(this.isiOS && this.isCordova && window.indexedDB);
with
1 this.isWKWebView = false;
in c2runtime.js solved my black screen issue on iOS 10 devices

The option I found (and actually will keep it since it actually allow using the WKWebview (which increase performance)) is:
Just add the plugin "cordova-plugin-wkwebview-engine". It is actually in the Core plugins section.

Both worked for me, And I hope they will do it for you too.
B
13
S
6
G
5
Posts: 3
Reputation: 3,548

Post » Fri Oct 14, 2016 9:34 am

ManuelPerez wrote:I have been Reading forums in scirra and Intel XDK official page. I found one solution there and one by myself.

First, this problem seems to be caused mostly in iOS 10 devices, principally because the app is crashing due the WKview use.

There is the option shown in the XDK fórum:

Replace the line
1 this.isWKWebView = !!(this.isiOS && this.isCordova && window.indexedDB);
with
1 this.isWKWebView = false;
in c2runtime.js solved my black screen issue on iOS 10 devices

The option I found (and actually will keep it since it actually allow using the WKWebview (which increase performance)) is:
Just add the plugin "cordova-plugin-wkwebview-engine". It is actually in the Core plugins section.

Both worked for me, And I hope they will do it for you too.


That is really bizzare. Like a bad hack.

You disable WKWebView with that line for detection, and use the wkwebview plugin instead. Which should be there already if you import the project into XDK when you export C2 to use XDK & WKWebView. It's one of the core plugin.

I'm testing these things ATM too because I'm getting crash reports for my game on iOS 10.0.1 and onwards.

Wish Apple would stop messing things up everytime they release a new iOS version.. /facepalm
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,614

Post » Fri Oct 14, 2016 4:18 pm

Actually I didnt used both options at the same time. I honestly dont know what would happen if you do both.

Understand my suggestions as "option 1" or "option 2" thing.

Anyway, I should do more test because in iOS im still getting my App rejected due and IPv6 support (Even when i got everything working for iOS 10).
B
13
S
6
G
5
Posts: 3
Reputation: 3,548


Return to Construct 2 General

Who is online

Users browsing this forum: Colludium and 1 guest