diff --git a/GoogleService-Info.plist b/GoogleService-Info.plist index 13167e087da59a32d561a1a681d62f487d2b55cb..28208172942f3d4c938f843285c41407630dc4c4 100644 --- a/GoogleService-Info.plist +++ b/GoogleService-Info.plist @@ -7,9 +7,9 @@ <key>AD_UNIT_ID_FOR_INTERSTITIAL_TEST</key> <string>ca-app-pub-3940256099942544/4411468910</string> <key>CLIENT_ID</key> - <string>1006878207346-9v61fspphkk57q334mq6td4p9i55dipv.apps.googleusercontent.com</string> + <string>1006878207346-t2fmp4lhu2mqd78mggonea7n9bmcgrs2.apps.googleusercontent.com</string> <key>REVERSED_CLIENT_ID</key> - <string>com.googleusercontent.apps.1006878207346-9v61fspphkk57q334mq6td4p9i55dipv</string> + <string>com.googleusercontent.apps.1006878207346-t2fmp4lhu2mqd78mggonea7n9bmcgrs2</string> <key>API_KEY</key> <string>AIzaSyBtDoADGTSBPirvlHEeQTz2APlMfwq3aJA</string> <key>GCM_SENDER_ID</key> @@ -17,7 +17,7 @@ <key>PLIST_VERSION</key> <string>1</string> <key>BUNDLE_ID</key> - <string>com.dimago.betskills</string> + <string>com.Dimago.Betskills</string> <key>PROJECT_ID</key> <string>betskills-145919</string> <key>STORAGE_BUCKET</key> @@ -33,7 +33,7 @@ <key>IS_SIGNIN_ENABLED</key> <true/> <key>GOOGLE_APP_ID</key> - <string>1:1006878207346:ios:9d4e0a7669d0f086</string> + <string>1:1006878207346:ios:18d4aecbe4e1184a</string> <key>DATABASE_URL</key> <string>https://betskills-145919.firebaseio.com</string> </dict> diff --git a/config.xml b/config.xml index 2a009cc6cf755ac7d420927ab1d8c42cbf656410..b3b74fd62aa4cb16287b43e9a35060d4100007cc 100644 --- a/config.xml +++ b/config.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<widget id="com.dimago.betskills" version="2.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> +<widget id="com.dimago.betskills" version="2.0.6" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> <name>Betskills</name> <description> Betskills app to see predictions of football and tennis games. @@ -13,8 +13,8 @@ <preference name="UIWebViewBounce" value="false"/> <preference name="DisallowOverscroll" value="true"/> <preference name="SplashScreenDelay" value="5000"/> - <preference name="ShowSplashScreenSpinner" value="false" /> - <preference name="android-minSdkVersion" value="16"/> + <preference name="ShowSplashScreenSpinner" value="false"/> + <preference name="android-minSdkVersion" value="23"/> <preference name="BackupWebStorage" value="none"/> <preference name="SplashScreen" value="screen"/> <preference name="xwalkVersion" value="18+"/> @@ -40,6 +40,8 @@ <variable name="APP_NAME" value="Betskills"/> </plugin> <platform name="ios"> + <access origin="cdvfile://*"/> + <allow-intent href="cdvfile://*"/> <preference name="iosPersistentFileLocation" value="Library"/> <splash height="1136" src="resources/ios/splash/Default-568h@2x~iphone.png" width="640"/> <splash height="1334" src="resources/ios/splash/Default-667h.png" width="750"/> @@ -71,8 +73,8 @@ <icon src="resources/ios/icon/icon-small@3x.png" width="87" height="87"/> </platform> <platform name="android"> - <preference name="android-minSdkVersion" value="22"/> - <preference name="android-targetSdkVersion" value="22"/> + <preference name="android-minSdkVersion" value="23"/> + <preference name="android-targetSdkVersion" value="23"/> <preference name="SplashMaintainAspectRatio" value="true"/> <preference name="SplashShowOnlyFirstTime" value="false"/> <preference name="AndroidPersistentFileLocation" value="Compatibility"/> diff --git a/www/index.html b/www/index.html index aa93121acd4aa377abcd3326d57b57696b0d97e4..04fa1072e90113fdfe2f0a3988994a3ee37dc391 100644 --- a/www/index.html +++ b/www/index.html @@ -4,9 +4,6 @@ <meta charset="utf-8"> <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width"> <meta name="format-detection" content="telephone=no"> - <meta http-equiv="Content-Security-Policy" content="default-src *; - style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' - 'unsafe-eval'"> <title></title> <link href="dist/project.css" rel="stylesheet"> diff --git a/www/js/app.js b/www/js/app.js index 274b9ca495a22055859dc32e5a595c1e04143854..bbe360e600f32721c88d2a6a6d00367931ac43b8 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -30,7 +30,7 @@ "purchase_ok": "Congratulations, your payment has been successfully made. You have now access to the selected elements." }, "fr": { - "info_title_1": "Comment resté connecté ?", + "info_title_1": "Comment rester connecté ?", "info_title_2": "Qui sommes-nous ?", "info_title_3": "Comment utiliser Betskills ?", "who_we_are_1": "Betskills a pour vocation d’allier les mathématiques et l’analyse statistique au sport. Nous avons développé un algorithme mathématique complexe qui analyse les données des dernières rencontres sportives. Notre activité se concentre principalement aujourd’hui sur le football ainsi que le tennis.", @@ -76,6 +76,9 @@ }); ionic.Platform.ready(function () { + if (ionic.Platform.isIOS()) { + window.FirebasePlugin.grantPermission(); + } NotificationService.registerDevice(); ionic.Platform.ready(function () { constantConfig.uuid = window.cordova ? ionic.Platform.device().uuid : '7f4a6a40e5c87157'; diff --git a/www/js/modules/notification/service.js b/www/js/modules/notification/service.js index 3f3b94cd6377dcbd05991e46b9743f11bd9972ba..b590f85f879758f1072768b5b59d18e4e8a6f099 100644 --- a/www/js/modules/notification/service.js +++ b/www/js/modules/notification/service.js @@ -26,22 +26,26 @@ var device = ionic.Platform.device(); deviceData = device; var tokenAlreadyCreated = false; - if (ionic.Platform.isIOS()) { - window.FirebasePlugin.grantPermission(); - } window.FirebasePlugin.getToken(function (token) { deviceData = Object.assign(device, {'locale': locale, 'token': token}); tokenAlreadyCreated = true; }, function (error) { + deviceData = Object.assign(device, {'locale': locale, 'token': 'tokenCannotBeCreated'}); }); if (!tokenAlreadyCreated) { window.FirebasePlugin.onTokenRefresh(function (token) { deviceData = Object.assign(device, {'locale': locale, 'token': token}); }, function (error) { + deviceData = Object.assign(device, {'locale': locale, 'token': 'tokenCannotBeCreated'}); }); } + if (typeof deviceData.token === 'undefined' || deviceData.token == null) { + deviceData.locale = locale; + deviceData.token = 'tokenCannotBeCreated'; + } + } else { //Mock deviceData deviceData = { diff --git a/www/js/pages/football/controller.js b/www/js/pages/football/controller.js index 6319e8361723ac3bdd49661ff6b496b6ae5db37b..9e0abf41e362783279f97dcd35048cc552d9a17b 100644 --- a/www/js/pages/football/controller.js +++ b/www/js/pages/football/controller.js @@ -240,13 +240,14 @@ }); ionic.Platform.ready(function () { - self.uuid = window.cordova ? ionic.Platform.device().uuid : '7f4a6a40e5c87157'; $ionicLoading.show({ template: '<ion-spinner icon="ripple" class="spinner-assertive"></ion-spinner>', animation: 'fade-in', showBackdrop: true }); + self.uuid = window.cordova ? ionic.Platform.device().uuid : '7f4a6a40e5c87157'; + var freePredictionsPromise = $http.get(constantConfig.apiUrl + 'predictions/football/free'); var leaguesPromise = $http.get(constantConfig.apiUrl + self.uuid + '/leagues/football'); var promises = [freePredictionsPromise, leaguesPromise]; @@ -271,6 +272,7 @@ }).finally(function () { $ionicLoading.hide(); }); + });