Game fails to launch with iOS 10 + Cordova

Discussion and feedback on Construct 2

Post » Sun Sep 18, 2016 3:41 pm

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
Code: Select all
cordova clean
cordova build ios

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: Select all
<plugin name="cordova-plugin-whitelist" source="npm" />
    <access origin="*" />
    <allow-intent href="*" />
    <allow-navigation href="*" />

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: Select all
    <preference name="AllowInlineMediaPlayback" value="true"/>
    <preference name="CordovaWebViewEngine" value="CDVUIWebViewEngine" />

and these plug ins
Code: Select all
   
    <plugin name="cordova-plugin-wkwebview-engine" source="npm"/>
    <plugin name="cordova-plugin-file" source="npm" />
    <plugin name="cordova-plugin-media" source="npm" />


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.
B
19
S
3
G
1
Posts: 22
Reputation: 1,699

Post » Sun Sep 18, 2016 4:37 pm

What do you mean by config files get combined? When I deploy from C2, there is a config.xml file under the www folder. There is also one in the directory above www that does not seem to be updating so I assume this is from me exporting in the old format at some point. Are you saying i need to copy the file from the www folder to the root? Also, are you putting '*' in the Intent and Navigation boxes?

I am not having any success trying different things. Any help is greatly appreciated!
B
42
S
16
G
3
Posts: 169
Reputation: 4,383

Post » Sun Sep 18, 2016 11:31 pm

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.
B
19
S
3
G
1
Posts: 22
Reputation: 1,699

Post » Mon Sep 19, 2016 1:16 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 » Mon Sep 19, 2016 2:39 am

Good to know!

Thanks.
B
19
S
3
G
1
Posts: 22
Reputation: 1,699

Post » Tue Sep 20, 2016 8:22 pm

Has not worked for me, even copy/pasting your config.xml and building my app with your app's name.

Has anybody else had success, using Cordova on a Mac to create the Xcode project (i.e. not letting XDK do the work)?
B
5
Posts: 7
Reputation: 239

Post » Tue Sep 20, 2016 10:28 pm

Just got an email from someone who purchased one of my apps - black screen on all devices using iOS10. This is going to be a nightmare :(
B
11
S
3
Posts: 62
Reputation: 813

Post » Tue Sep 20, 2016 11:04 pm

@chrisnewman @guinness @cdogs1964 -- please see second part of the top post for possible solution to the black screen problem on iOS 10 > https://software.intel.com/en-us/forums ... pic/685395 <
Intel Corporation
B
13
S
3
Posts: 79
Reputation: 925

Post » Thu Sep 22, 2016 8:23 pm

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.
B
19
S
3
G
1
Posts: 22
Reputation: 1,699

Post » Tue Sep 27, 2016 10:12 am

xmnboy wrote:@chrisnewman @guinness @cdogs1964 -- please see second part of the top post for possible solution to the black screen problem on iOS 10 > https://software.intel.com/en-us/forums ... pic/685395 <


Thanks. Doing this in construct2.js
Code: Select all
/*      this.isWKWebView = !!(this.isiOS && this.isCordova && window.indexedDB); */
        this.isWKWebView = false;


has got me out of a hole until this is properly addressed.
B
5
Posts: 7
Reputation: 239

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 12 guests