From 0b8387431323023560824ab8f0650591dd0274bc Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 7 Dec 2020 16:48:24 +0100 Subject: build --- StoneIsland/config.xml | 2 +- .../user.xcuserdatad/UserInterfaceState.xcuserstate | Bin 21238 -> 22903 bytes .../ios/Stone Island/Stone Island-Info.plist | 4 ++-- StoneIsland/platforms/ios/Stone Island/config.xml | 2 +- StoneIsland/platforms/ios/www/js/index.js | 10 ++++++---- .../platforms/ios/www/js/lib/etc/analytics.js | 10 ++++++---- StoneIsland/platforms/ios/www/js/sdk/_sdk.js | 4 ++++ 7 files changed, 20 insertions(+), 12 deletions(-) diff --git a/StoneIsland/config.xml b/StoneIsland/config.xml index 70a999ee..541b5deb 100755 --- a/StoneIsland/config.xml +++ b/StoneIsland/config.xml @@ -1,5 +1,5 @@ - + Stone Island Stone Island diff --git a/StoneIsland/platforms/ios/Stone Island.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstate b/StoneIsland/platforms/ios/Stone Island.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstate index fc6981f5..21ad325f 100644 Binary files a/StoneIsland/platforms/ios/Stone Island.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstate and b/StoneIsland/platforms/ios/Stone Island.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/StoneIsland/platforms/ios/Stone Island/Stone Island-Info.plist b/StoneIsland/platforms/ios/Stone Island/Stone Island-Info.plist index 4765d97a..48e60769 100644 --- a/StoneIsland/platforms/ios/Stone Island/Stone Island-Info.plist +++ b/StoneIsland/platforms/ios/Stone Island/Stone Island-Info.plist @@ -17,11 +17,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.4.6 + 1.4.8 CFBundleSignature ???? CFBundleVersion - 1.4.6 + 1.4.8 LSRequiresIPhoneOS NSMainNibFile diff --git a/StoneIsland/platforms/ios/Stone Island/config.xml b/StoneIsland/platforms/ios/Stone Island/config.xml index 587110ac..955ae40a 100644 --- a/StoneIsland/platforms/ios/Stone Island/config.xml +++ b/StoneIsland/platforms/ios/Stone Island/config.xml @@ -1,5 +1,5 @@ - + diff --git a/StoneIsland/platforms/ios/www/js/index.js b/StoneIsland/platforms/ios/www/js/index.js index 0e9ee355..b61e545d 100755 --- a/StoneIsland/platforms/ios/www/js/index.js +++ b/StoneIsland/platforms/ios/www/js/index.js @@ -6,7 +6,7 @@ var app = (function(){ if (window.location.hostname === 'lvh.me' || window.location.hostname === 'dev.stone.giraffe.life' || window.location.hostname === 'staging.stone.giraffe.life') { console.log('launching in test mode') - sdk.init({ env: "test" }) + sdk.init({ env: "development" }) } else { sdk.init({ env: "production" }) @@ -115,7 +115,9 @@ var app = (function(){ // } push.init() - window.open = cordova.InAppBrowser.open + if (window.cordova) { + window.open = cordova.InAppBrowser.open + } if (navigator.onLine) { app.account.connect(window.deepLinkRoute || '/intro') @@ -150,11 +152,11 @@ var app = (function(){ var refresh_time = +Date.now() app.paused = function(){} app.resumed = function(){ - console.log( "app is ready?", app.is_ready ) + console.log("app resumed") geo.fetch() var now = +Date.now() - if (now - refresh_time > 60 * 60 * 1000) { + if (now - refresh_time > 10 * 1000) { refresh_time = now app.blog.refresh() } diff --git a/StoneIsland/platforms/ios/www/js/lib/etc/analytics.js b/StoneIsland/platforms/ios/www/js/lib/etc/analytics.js index f5f871f5..fcf42d5f 100644 --- a/StoneIsland/platforms/ios/www/js/lib/etc/analytics.js +++ b/StoneIsland/platforms/ios/www/js/lib/etc/analytics.js @@ -11,10 +11,12 @@ var analytics = (function() { analytics.sendPageView = function(path) { console.log("/a\\ send", path) - FirebasePlugin.logEvent("select_content", { - content_type: "page_view", - item_id: path, - }) + if (window.FirebasePlugin) { + FirebasePlugin.logEvent("select_content", { + content_type: "page_view", + item_id: path, + }) + } } return analytics diff --git a/StoneIsland/platforms/ios/www/js/sdk/_sdk.js b/StoneIsland/platforms/ios/www/js/sdk/_sdk.js index 4a76a519..3b1c98a9 100755 --- a/StoneIsland/platforms/ios/www/js/sdk/_sdk.js +++ b/StoneIsland/platforms/ios/www/js/sdk/_sdk.js @@ -44,6 +44,10 @@ var sdk = (function(){ // // possibly: application/json; charset=utf-8" // contentType: "application/json", // }) + if (!window.cordova) { + return $.ajax(opt) + } + var method = opt.method.toLowerCase() var url = opt.url var xhrOptions = { -- cgit v1.2.3-70-g09d2