App stopped working with iOS10 and cordova

0 favourites
  • 13 posts
From the Asset Store
The internet is bombarded daily with new apps (app is the short term for application)
  • 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:

    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 ... .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 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/

    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

  • - 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!

  • 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.

  • 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.

  • 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.

  • 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.

  • 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!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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?


    "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."

  • 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.

  • 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.

  • It was a quick fix, here it is:

    In c2runtime.js replace:

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


    this.isWKWebView = false;

  • COGames - that will also break your app if it tries to run in WKWebView mode.

  • Okay, so export the games with WKWebView mode selected when exporting with Cordova, and then, in Intel XDK, add the plugin for WKWEebView. Is this right?

    I did this and now my app running on my iPhone6 with iOS10, as well as my iPad2 with iOS9. The only thing is that I am unable to load the app via Intel's App Preview (I get "Error fetching data.js"), but it loads fine on the iPad. I guess this is Intel's problem?

    Just wondering now, the apps that I redid by changing the lines I mentioned in my previous post, how would they try to run in WKWebView mode? I didn't install the pluggin for that, so I should be good with those right? I should just use WKWebView in the future because it has better performance - right?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)