Guinness's Forum Posts

  • Did you get it going COGames? I had the same situation. My app was just starting to make a few sales and was going up in rank. I had to warn of the issue and resubmit a new app. Now its dropped again with the only update saying "now works with ios10". At least its going.

    There seems to be a variety of ways to work around the issue.

  • Good to know!

    Thanks.

  • Thats what I did. I basically used the new config file from the test project that I created. I did this after upgrading xCode to 8 and verifying the cordova was at the lastest version. Also ran cordova platform update.

    I then took that config.xml file and put it in my "old project". I didn't want to start over with the assets, plist items, etc. I then took the necessary records from my config.xml that came from Construct2. Basically that was just the plugins and a couple gap settings. I put those in the project level config.xml.

    I then just removed the settings from the new file that aren't needed to remove any variables. For me, that was settings related to android/crosswalk as I'm not dealing with Android just yet. I then deleted the config.xml file that came with the construct export from the www folder. It is not complete from that export and I don't think it really gets hit when there is the project level config file there already. That is where I thought it would be great if Construct2 could add the settings that are now required for iOS10 to the config.xml export. Then that file would out of Construct would be usable. I'd just move it to the project level on each update.

    From there it was just a matter of cordova clean and cordova build ios then simulate in xcode. All worked. That was a relief! Now it is the wait for Apple to take their time approving the fact that the application now starts up correctly.

    Yes, i put * for those setting so that I was sure that I was giving it every option. Those entries are there with the cordova template, but they are not set as *. It would probably work more limited scope, but I was going on 13 hours and just needed to get it going. The config file that I posted is complete and it is what I am using right now. The www/config.xml is deleted and when I do a new import, I don't copy that file in. I may just add new settings if there are any (until Construct2 provides a compete config.xml for Cordova).

    If you want to send your files, I could show you what I did using them. I went around and around with these for awhile as I never really paid much attention to them before. This should eventually get resolved in a better way , but since your app is dead, waiting isn't really an option.

  • Before. I am not using prepare, just building from the command line first, then run/rebuild with xcode 8.

    Every time I changed the config.xml, I ran

    cordova clean
    cordova build ios[/code:d11cr2hd]
    Then run in simulator.
    
    As far as I could tell, all of the records were needed due to the requirements of my app.  I expect that the start up issue is resolved by :
    [code:d11cr2hd]
    <plugin name="cordova-plugin-whitelist" source="npm" />
        <access origin="*" />
        <allow-intent href="*" />
        <allow-navigation href="*" />[/code:d11cr2hd]
    I think instead of using wildcard "*", it could  be "self" instead.   If your app has any chance of running outside code, you would want to limit that down.  My app does not have any external integration at all.   
    
    I literally took every cordova provided config.xml setting that I could find, put in the file and then backed out until I got to what was needed since I don't see any documentation regarding this and iOS10.   
    
    also these became necessary for "downstream" errors after the startup [code:d11cr2hd]
        <preference name="AllowInlineMediaPlayback" value="true"/>
        <preference name="CordovaWebViewEngine" value="CDVUIWebViewEngine" />[/code:d11cr2hd]
    and these plug ins [code:d11cr2hd]    
        <plugin name="cordova-plugin-wkwebview-engine" source="npm"/>
        <plugin name="cordova-plugin-file" source="npm" />
        <plugin name="cordova-plugin-media" source="npm" />[/code:d11cr2hd]
    
    In the end, I just took the project related construct 2 created items from the construct created config.xml and put them into the cordova created xml.  I expect that it could be done the other way (take the cordova created items and move to the construct created file).  I think if the project level comfig.xml file as gone and the config.xml that construct creates has everything included, it will work.  I just didn't have time or energy to test that out.  
    
    Another thing I did along the way because some of these base plugins had a lot of warnings in xcode, I ran cordova platform update to be sure all of that is current.  I think there were still about 7 warnings from inAppBrowser and Canvas2Image to fix.  But, those don't affect the running of the app.  
    
    Do you have two config.xml files in the project structure?  One at the root and then one in the www folder that copies out of the construct build?
    
    Going forward, ideally the construct2 export would include the security settings needed for the construct2 provided plugins and options in the config.xml file.  Then we could just use that file.  It's just unfortunate that these settings became required by iOS10 and nobody knew ahead of time.
  • 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.

  • I am not 100% sure if the config.xml files get combined when building. So, I just took the contents from the config.xml file that Construct2 creates and put them into the config.xml file that cordova creates when generating the app. I think all of these settings need to be in the same file.

    Thats the file you are asking about. In the cordova project, it is just one level above the www folder. So it would be :

    [app folder]\config.xml

    [app folder]\www

    [app folder]\platforms

    etc

    I just put all of the configs in the config.xml at the top level. When building cordova will pull in all of the plug ins that you need. Below is what my file looks like. There were several things that I needed because of the the plugins I have and things that are needed. It is not recommended to have the intent entries with the wildcard, but I'm just getting this working again. This does work without any changes in the construct.

    Its just combining the export config from construct with the config that cordova creates. Putting the security policy entry in the index.html file actually prevented the app from working . I did try that with wide open options. This is just what I've found. I'm not a cordova expert but at least its up and running again.

    config.xml

    <?xml version='1.0' encoding='utf-8'?>
    
    <widget id="com.rggames.mathfactchallenger" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
        
        <name>MathFactChallenger</name>
        <description>
            Math Fact Challenger - practice math facts!
        </description>
        <author email="ryan@mathfactgames.net"
            href="http://mathfactgames.net">
            Math Fact Games
        </author>
        <plugin name="cordova-plugin-whitelist" source="npm" />
        <access origin="*" />
        <allow-intent href="*" />
        <allow-navigation href="*" />
    
        <preference name="orientation" value="default" />
        <preference name="fullscreen" value="true" />
        <gap:config-file platform="ios" parent="UIStatusBarHidden"><true/></gap:config-file>
        <gap:config-file platform="ios" parent="UIViewControllerBasedStatusBarAppearance"><false/></gap:config-file>
        <preference name="AllowInlineMediaPlayback" value="true"/>
        <preference name="BackupWebStorage" value="local"/>
        <preference name="CordovaWebViewEngine" value="CDVUIWebViewEngine" />
       
        
        <plugin name="cordova-plugin-wkwebview-engine" source="npm"/>
        <plugin name="cordova-plugin-file" source="npm" />
        <plugin name="cordova-plugin-media" source="npm" />
        <plugin name="cordova-plugin-inappbrowser" source="npm" />
        <plugin name="cordova-plugin-canvas2image" source="npm" />
        
        
    </widget>
    [/code:7zk48j4c]
  • I've made a little progress. I moved some of the settings from the config.xml file to the platform/ios/app/config.xml file but kept the intent tags. The app does load now.

    I did not add the CSP tag to index.html. I basically just merged the config.xml files. I don't know exactly what should be happening there, but without the content in both of those files, the app will not start.

    Below is what it looks like. I know the general intent with wild card is very open, but I am just trying to get this going right now.

    I'll post more as I get to everything working.

    (working config posted below)[/code:4gqyjg9c]
  • 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.

  • 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

  • Another update. I did as you did with a different app. I built an old impactJs project I had from years ago and it runs fine on Cordova/OSX 10.

    This seems isolated to construct2 exports for Cordova based on the cordova apps that i have.

  • I am having the exact same issue and my app is for sale. I just started over as well. My app worked fine as well before. It is a $.99 app, so this is very challenging. I may have to pull it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • cranberrygame

    Hi,

    I just purchased the cordova plugins. I am trying to use the Canvas2Image plugin. I've added the plug in to my construct2 project and an event to call it. I installed the corresponding cordova plugin into cordova. After deploying to ios and the app calls the plug in, my screen goes black and the app stops working.

    This does not appear to work. Any ideas?

    Thank You

  • Like it. I am starting a new creative spin on pinball that should be less of a web toy.

  • I like the theme!

  • Yes, it does. I'd like to see what you come up with. This is really experimental at the moment.