Thanks for your reply Chris - it’s really important for us to be able to update this app that we’ve put so much work into. All help is more than welcome!
We double checked how we load cordova.js, and it appears to be the normal way. In the of our index.html there’s a cordova.js include. The file doesn’t exist in the www-folder, but it exists in the built www-folder (and therefore in the actual app) after being built.
I’ve double checked the content of the cordova.js file, and it says var PLATFORM_VERSION_BUILD_LABEL = '5.2.2';
on line 22.
These are all the includes done in the header:
<script src="lib/ionic/js/ionic.bundle.js"></script>
<script src="http://maps.googleapis.com/maps/api/js?libraries=places,geometry&sensor=false"></script>
<script src="lib/ngCordova/dist/ng-cordova.js"></script>
<!-- cordova script (this will be a 404 during development) -->
<script src="cordova.js"></script>
<script src="js/tabSlideBox.js"></script>
<script src="js/moment.min.js"></script>
<script src="js/app.js"></script><link href="tabSlideBox.css" rel="stylesheet">
<script src="tabSlideBox.js"></script>
<script src="js/controllers.js"></script>
<script src="js/services.js"></script>
<script src="js/ion-place-autocomplete.js"></script>
That should be the correct way of including cordova.js in an Ionic project, right?
I found some interesting notes on Stackoverflow, from people with similar experiences!
They explain an instance of unused cordova.js files hidden “deep in subfolders”, eventually leading to Google’s automatic search for Cordova version failing. After a grep command I could find that the plugin used for Facebook authentication (phonegap-facebook-plugin) had a cordova.js file in it’s folder for platform browser…that for some reason also gets built into the Android version.
$ grep -R PLATFORM_VERSION_BUILD_LABEL *
www/lib/phonegap-facebook-plugin/platforms/browser/platform_www/cordova.js:var PLATFORM_VERSION_BUILD_LABEL = '3.6.0';
platforms/android/build/intermediates/assets/debug/www/lib/phonegap-facebook-plugin/platforms/browser/www/cordova.js:var PLATFORM_VERSION_BUILD_LABEL = '3.6.0';
This says version 3.6.0, which is not lower than 3.5.1, but it might be the reason for why Google denies the app…it’s worth a try.
We’ve now removed it along with all the other platform browser files for the phonegap-facebook-plugin like this:
$ rm -rf www/lib/phonegap-facebook-plugin/platforms/browser/*
A new app is built, signed, aligned and sent to Google Play. I really hope they accept it this time. If it fails for the same weird reason, could any of you guys take a look at it? (after signing an NDA, the project is being developed for a third party) Would be most appreciated!
If anyone has any other ideas for why Google might be denying the app - please come with your ideas. All ideas that help us solve this problem are greatly appreciated!