App stopped working with iOS10 and cordova

Bugs will be moved here once resolved.

Post » Sat Sep 17, 2016 12:20 am

Problem Description

note: not a construct2 .capx bug, but a config.xml issue after exporting for cordova and ios . This started after ios10 released. The config.xml on the export does not have settings that iOS10 now uses. Found a solution this weekend. Maybe the settings can be included in the export for cordova when building for iOS.

C2 Cordova build will not run on iOS10. The app was working fine until upgrading to iOS10. It will not run in the simulator with xCode 8.

Another user has reported the same issue at:
https://www.scirra.com/forum/game-fails-to-launch-with-ios-10-cordova_t181911

Cordova build on iOS 10 is working with another js framework, but it is are using a cordova plugin other than from the cordova template that is auto created. They also don't have another config.xml file either, so there is a difference.

Attach a Capx
https://www.dropbox.com/s/62pnctl1ywtzu ... .capx?dl=0

Description of Capx
has initial layout that displays a text box with the word text

Steps to Reproduce Bug
  • Export project -> Cordova -> default settings -> default settings
  • oSX - cordova create testApp test.app testApp
  • cordova platform add ios
  • copy exported folder to www folder
  • cordova build ios
  • run xcode8, run on any simulator device running iOS10

Observed Result
The app hangs at start up. the follow is the last in the console:

Console runs this spot and hangs:
testApp[8514:183151] Finished load of: file:///Users/me/Library/Developer/CoreSimulator/Devices/160A645A-118A-4AAB-B9D8-5BD5DC905CF3/data/Containers/Bundle/Application/A9BC6004-D6B1-45BD-8B00-62FE7DAB2A28/testApp.app/www/index.html

This is happening on my production application in the app store which worked pre ios10. No changes were made between then.

Expected Result
the app should start

Affected Browsers
  • this is related to cordova in iOs

Operating System and Service Pack
Win 7, sp1, OSX 10.11.6

Construct 2 Version ID
Release 233
Last edited by Guinness on Sun Sep 18, 2016 11:48 pm, edited 4 times in total.
B
19
S
3
G
1
Posts: 22
Reputation: 1,699

Post » Sat Sep 17, 2016 3:05 am

@Guiness - Thanks for posting this Bug report. I am curious why more people are not experiencing this problem. Like you, I have a game on the app store that has worked for months and now it will not work if user upgrades to iOS10. I have to think this has affected many people who build with C2. Why hasn't there been a major uproar? I hope there is a solution over the weekend!
B
42
S
16
G
3
Posts: 169
Reputation: 4,383

Post » Sat Sep 17, 2016 8:50 am

Reassured to see others experiencing this, and thanks for posting it as a bug. I'm not convinced we can blame C2 over Cordova or iOS, but I'm happy to contribute more information as required if Scirra will look into it.
B
5
Posts: 7
Reputation: 239

Post » Sat Sep 17, 2016 1:11 pm

Hopefully it's just a new setting that is needed as part of the export or something along those lines. I'll keep trying as people are paying for my app right now.
B
19
S
3
G
1
Posts: 22
Reputation: 1,699

Post » Sat Sep 17, 2016 9:21 pm

I cannot believe we have not heard other people experiencing this problem. I really thought it was going to a huge issue. I have been checking other forums and I have not come across anything else.
B
42
S
16
G
3
Posts: 169
Reputation: 4,383

Post » Sun Sep 18, 2016 5:28 am

I have found a solution. There are more settings that apparently ios10 uses now. I combined the settings in the config.xml that cordova generates with the config.xml that construct exports and it worked. I did add a few more settings.

Maybe the construct exporter for cordova could include these settings so that the config.xml would be complete. Not sure, but at least its working now.

there are more details at the referenced post above.
B
19
S
3
G
1
Posts: 22
Reputation: 1,699

Post » Tue Sep 20, 2016 8:19 pm

Checking in to let you know your suggestion has not solved this in the issue I originally reported.

I have tried every possible combination of lines that might vary between the two config.xml files and still haven't got past the black screen. The access control lines you said you thought made the difference were actually included in my (no-longer-working) project already though.

Perhaps I'm just not understanding what you've said correctly. Is there any chance you could step through with a "Hello World" type app and find the point at which a C2-exported project becomes a working project again? I suspect this precise difference is what would be needed to fix the exporter anyhow!
B
5
Posts: 7
Reputation: 239

Post » Tue Sep 20, 2016 10:48 pm

chrisnewman - I'm having the same problem. I think people are just starting to download iOS10 and are just noticing that some apps aren't working. I just received an email from someone who bought my app, so I did a search and found that there are others with this problem. I just downloaded iOS10 on my iPhone6 and confirmed (sadly).

Did you try this yet?
(https://forums.adobe.com/thread/2167432)
"Panic over, got it working.
Just needed to add gap://ready and also file: to my Content-Security-Policy for the default source
<meta http-equiv="Content-Security-Policy" content="default-src * gap://ready file:; style-src 'self' 'unsafe-inline' *; script-src 'self' 'unsafe-inline' 'unsafe-eval' *">

Hope this doesn't hit anyone else who doesn't update their app before iOS 10 is released."
B
11
S
3
Posts: 52
Reputation: 791

Post » Wed Sep 21, 2016 6:08 am

Try creating a new project in XDK. I tried other solutions offered and none of them worked. I created a new project in XDK and everything seems OK now. (Other than a sound issue I am seeing for the first time.) Hope this helps.
B
42
S
16
G
3
Posts: 169
Reputation: 4,383

Post » Fri Sep 23, 2016 1:20 pm

The issue appears to be that a breaking change in iOS 10 has broken UIWebView apps. WKWebView apps still work, so that should be an easy workaround, and WKWebView is faster anyway.

I posted a more detailed update about this issue here. We may decide to resolve this simply by dropping UIWebView support. Please post in that thread if there is any reason that would be a problem for you.
Scirra Founder
B
395
S
233
G
88
Posts: 24,376
Reputation: 193,852

Next

Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests