Community
cancel
Showing results for 
Search instead for 
Did you mean: 
PaulF_IntelCorp
Employee
383 Views

iOS 10 black screen, store rejection with IPv6 support error

Some users have reported an issue with good working apps that work on iOS 9 are not running on iOS 10. It is not clear what the precise source of this issue is, but it appears to be due to a requirement for an updated CSP rule in your index.html file.

See this post on StackOverflow > http://stackoverflow.com/questions/38410159/cordova-app-hanging-during-startup-on-ios-10-beta < and the answer from "kerrishotts" on this PhoneGap Build post which has some useful info regarding Cordova and iOS.

Here's a starting point for a CSP rule that might help:

<meta http-equiv="Content-Security-Policy" content="default-src 'self' 'unsafe-inline' data: gap: file: https://ssl.gstatic.com *  ">

Additional help for CSP rules can be found here:

https://software.intel.com/en-us/xdk/docs/using-cordova-whitelist-rules-with-intel-xdk

---- for Construct2 users ----

If your Construct2 app displays a black screen when it starts on an iOS 10 device, but works fine on an iOS 9 device, then you are likely running a Construct2 app that is configured to use the standard iOS webview (you have not selected to use the iOS WKWebView).

In that case, this line in the c2runtime.js file is incorrectly detecting the presence of the iOS WKWebView:

this.isWKWebView = !!(this.isiOS && this.isCordova && window.indexedDB);

when the app is not running in a iOS WKWebView (that is, when it is running in the standard iOS webview).

On an iOS 9 device window.indexedDB is false in the standard iOS webview. On an iOS 10 device window.indexedDB is true in the standard iOS webview. The result is that some Construct2 code that depends on the presence of a WKWebView on iOS is allowed to run and hangs, in the c2runtime.js file, causing your application to hang.

One workaround is to change that line in the c2runtime.js file to always set "this.isWKWebView" to false, or to add the WKWebView to your app and use that webview rather than the standard webview. The latter workaround will limit your app to iOS 9 and iOS 10 devices, since the WKWebView plugin is not compatible with earlier versions of iOS.

NOTE to Construct2 Users: the issue described above has nothing to do with the Intel XDK or updates to the Intel XDK, it is a Construct2 problem that is caused by changes to the iOS 10 webview runtime by Apple. The Intel XDK does not control the device webview runtime; that is controlled by the device manufacturers and varies by device type, device vendor, device OS and the OS versions. You can think of these webview differences as being similar to running a web app in different types and versions of browsers. See this article for more information > https://blogs.intel.com/evangelists/2014/09/02/html5-web-app-webview-app/ < which contains an introduction to webviews.

Tags (2)
0 Kudos
19 Replies
Jaap
Beginner
383 Views

All my previous apps, build with XDK seem to be incompatible with iOS 10.0.1
Just found out after submitting a new update which got bounced by apple due to "IPv6 support error" mentioned in this post.

Updated my test device to iOS 10.0.1 and running build ipa file via test flight, gave black screen after the cordova splash screen.

Adding the CSP meta tag did unfortunately not solve this issue.

Debugging on my device also broke with the iOS update, XDK (3522) reports "null (serial unavailable)" 
(web inspector enabled / iTunes 12.5.1.21 detects device)

Any help would be appreciated!

 

 

Christopher_G_1
Beginner
383 Views

@Jaap May I ask what you are developing with? I have a game on the AppStore that I built with Construct 2 that is experiencing the same issue. Others on the C2 forum are experiencing the same thing. It would be nice to be able to narrow down the issue to XDK if possible. Thanks.

Jaap
Beginner
383 Views

@Christopher Same thing over here, all my games / apps are developed using C2 and exported to cordova. So can't narrow it down ... yet

PaulF_IntelCorp
Employee
383 Views

If you have access to a Mac, you can use the process described here > https://software.intel.com/en-us/xdk/articles/debugging-xdk-cordova-apps-built-for-ios-using-mac-and-safari < to try and debug the problem on your iOS device -- there's a good chance you'll see some error messages in the JavaScript console using this technique that might lend some insight into the problem.

At this point we have no explanation for the problem. If there is someone who is willing to share their app it might help us to see what is happening. Please let me know if you are willing to share your app and I will send you a private message with instructions.

Jaap
Beginner
383 Views

@paul I'm willing to share one of my projects please pm the instructions.

Are more people having the same issue "null (serial unavailable)" regarding debugging with XDK on an iOS 10.0.1 device?

Update:
Tried debugging on mac, but when selecting index.html from developer tab in safari, the app shuts down on device.
(while hovering on the index.html file screen on device turns blue, indicating it's selecting the correct app)

Jherico_T_
Beginner
383 Views

All my games are developed using Construct 2 and exported to cordova.  I tried to isolate the problem by removing plugins, exporting without the "WkWebView" from Construct 2 and added the CSP line as suggested by Paul.  I don't get the iPv6 error when I upload my app through the application loader, but when I actually run it, I get the blank screen. 

PaulF_IntelCorp
Employee
383 Views

Jaap wrote:

Are more people having the same issue "null (serial unavailable)" regarding debugging with XDK on an iOS 10.0.1 device?

We have confirmed that you cannot use the Debug tab with an iOS 10 device. We do not know the precise reason for the issue, but have confirmed it is a problem. The only workaround, at this time, is to use an iOS 9 device, weinre or Safari remote (if you have a Mac).

Fucking_I_
Beginner
383 Views

Hey everybody!
I have the same problem with the black screen, but i don't think that this is IPv6 problem, because i tryed to build even clear project(without objects and events) and problem still there - black screen and statusbar.

I was have this problem once before(on another project was a blackscreen) but it was solved by removing one audiofile. Now, for test, i totaly cleared the project(just white background stay) - and problem still there. I gues it's Intel XDK + IOS 10 problem. On previos IOS version everything works good.

Can someone help me, maybe i doing something wrong?

Fucking_I_
Beginner
383 Views

Guys, can someone, who already solve this problem in own project, upload the screenshot of index.html file with changes?

I try diferent places, and i might be wrong where " <meta http-equiv="Content-Security-Policy" content="default-src 'self' 'unsafe-inline' data: gap: file: https://ssl.gstatic.com *  ">" should be placed.

See the screenshot in project that works will be great!

Thank you.

PaulF_IntelCorp
Employee
383 Views

The black screen issue that Jaap is seeing is a Construct2 problem.

This line in the c2runtime.js file is incorrectly detecting the presence of the iOS WKWebView:

this.isWKWebView = !!(this.isiOS && this.isCordova && window.indexedDB);

when the app is not running in a WKWebView (when it is running in the standard webview).

On an iOS 9 device window.indexedDB is false in the standard iOS webview. On an iOS 10 device window.indexedDB is true in the standard iOS webview. The result is that some Construct2 code that depends on the presence of a WKWebView on iOS is allowed to run and hangs, in the c2runtime.js file, causing your application to hang.

One workaround is to change that line in the c2runtime.js file to always set this.isWKWebView to false, or to add the WKWebView to your app and run it in that webview, rather than the standard webview. The latter workaround will limit your app to iOS 9 and iOS 10 devices, since the WKWebView plugin is not compatible with earlier versions of iOS.

Fucking_I_
Beginner
383 Views

Paul, thank for  unswer!

Can u please tell, how the code need to looks like for c2 users? is that right?

 

1

this.isWKWebView = false(this.isiOS && this.isCordova && window.indexedDB)
 

 

Jaap
Beginner
383 Views

Replace the line

this.isWKWebView = !!(this.isiOS && this.isCordova && window.indexedDB);

with

this.isWKWebView = false;

in c2runtime.js solved my black screen issue on iOS 10 devices

Thanks Paul.

Cheryl_O_
Beginner
383 Views

Hi - I'm a Construct2 user and wanted to add that I changed the line in the c2runtime.js ​file as suggested above (clearly stated by Jaap), and now my iPhone6 (iOS10) and my iPad2 (iOS9) now load and run like before. Now I have to go and do this for 7 of my available apps (huge pain in the ass). This makes me nervous about future updates especially if I have many more apps at that point in time.

PaulF_IntelCorp
Employee
383 Views

Cheryl -- note that this has nothing to do with the XDK, it is a Construct2 problem caused by changes in the iOS 10 runtime. The XDK does not control the device runtime, that is controlled by the device manufacturers. See this article for more information > https://blogs.intel.com/evangelists/2014/09/02/html5-web-app-webview-app/ <

Daniel_B_10
Beginner
383 Views

also for me worked the solution in c2runtime.js  this.isWKWebView = false;

today submit ; today in review; today ready for sale

thanks Paul

 

MATRIX_R_1
Beginner
383 Views

Paul F. (Intel) wrote:

The black screen issue that Jaap is seeing is a Construct2 problem.

This line in the c2runtime.js file is incorrectly detecting the presence of the iOS WKWebView:

this.isWKWebView = !!(this.isiOS && this.isCordova && window.indexedDB);

when the app is not running in a WKWebView (when it is running in the standard webview).

On an iOS 9 device window.indexedDB is false in the standard iOS webview. On an iOS 10 device window.indexedDB is true in the standard iOS webview. The result is that some Construct2 code that depends on the presence of a WKWebView on iOS is allowed to run and hangs, in the c2runtime.js file, causing your application to hang.

One workaround is to change that line in the c2runtime.js file to always set this.isWKWebView to false, or to add the WKWebView to your app and run it in that webview, rather than the standard webview. The latter workaround will limit your app to iOS 9 and iOS 10 devices, since the WKWebView plugin is not compatible with earlier versions of iOS.

Hi paul ... how are you ?

so ... if we set this.isWKWebView = false; that mean that we force to NOT USE WKWEBVIEW engin ....

so how we can change that line to made the app using the wkwebview ?

thank you

PaulF_IntelCorp
Employee
383 Views

Do you want to run inside of WKWebView or not? It is not clear what you want to do.

If you want to use the WKWebVew, then use the WKWebView plugin and limit your app to distribution on iOS 9 and later devices. Those two versions of iOS cover 94% of the available iOS devices, as of January 4, 2017. In this case you do not have to change anything inside of c2runtime.js, it will work correctly.

Otherwise, if you do not want to use the WKWebView, and prefer to use the standard WebView, then change the code in c2runtime.js to set "this.isWKWebView = false." In that case, you can build and distribute your app for older versions of iOS.

You should be building with CLI 6.2.0 and that version of Cordova only supports building for iOS 8 and above. Given that some portion of those iOS devices are stuck at iOS 6, adding support for iOS 8 probably only adds about 2% of the total population of devices.

Gina_B_
Beginner
383 Views

Hi, I have the same problem with the iOs app review: Guideline 2.1 - Performance We discovered one or more bugs in your app when reviewed on iPad and iPhone running iOS 10.3.1 on Wi-Fi connected to an IPv6 network. Specifically, the application fails to proceed passed the opening screen. I Add the Content-Security-Policy, but still getting the rejection for the same problem. I was trying to add the WKWebView line, but I can't find the c2runtime.js, Is that a file created by the Inter XDK in side the project folder?? Where can I find this file pls? Thanks
PaulF_IntelCorp
Employee
383 Views

Gina B. wrote:

I was trying to add the WKWebView line, but I can't find the c2runtime.js, Is that a file created by the Inter XDK in side the project folder?? Where can I find this file pls?

The c2runtime.js file is specific to Construct2 apps, and the problem described relating to c2runtime.js is specific to Construct 2. Construct 2 apps are apps that have been created using a game editor by Scirra known as Construct 2. If you are not using Construct 2 you will not find such a file in your app.

Gina B. wrote:

Specifically, the application fails to proceed passed the opening screen.

In your case, this probably means that your app is hung on the open screen. This can be caused by many things, but usually it is due to trying to open a network resource (such as downloading a JavaScript file or some fonts or images from an Internet resource) when you have limited or no network connectivity. It could also mean you have a whitelist problem, where your app is being blocked from performing some network activites. Or it could simply be that you've got some JavaScript code in your app that has encountered a fatal error and has stopped executing.

The only way to know is to perform some debugging on a real iOS device. When you run in the Simulate tab you are running in an unrestricted Chrome browser, you are not simulating the environment on a real device. There are many things that will work differently. See this doc page for more help with on-device debugging options > https://software.intel.com/en-us/xdk/docs/intel-xdk-debug-and-test-overview <

Reply