3 added 903 characters in body; edited title
source | link

Having nHaving Issues When Salesforce Mobile SDK 2.1 App Upgraded to Salesforce Mobile SDK 3.0 on iOS

We have a mobile application which has been developed using Salesforce Mobile SDK 2.1 and Backbone.JS (Smartstore + smartsync) on iOS platform and we recently, move it to Salesforce Mobile SDK 3.0.

We en-counted some issues, specially with addEventListener event where it didn't work which works fine with SDK 2.1.

document.addEventListener("offline", function () {}

document.addEventListener("online", function () {}

But somehow, once we changed to window from document as below it triggers the listeners but both firing at the same time and when the application comes online it fires twice each

window.addEventListener("offline", function () {}

window.addEventListener("online", function () {}

Offline Tracker Code :

        app.models.OfflineTracker = Backbone.Model.extend({
              initialize: function () { 
                  var that = this;
                  this.set("isOnline", navigator.onLine);
                  //start here
                  document.addEventListener("offline", function () {
                      debugLog("Received OFFLINE event");

                      that.set("isOnline", false);

                      app.router.navigate('#getUserLanguage', true);
                  }, false);
                  document.addEventListener("online", function () {
                      debugLog("Received ONLINE event");

                      that.set("isOnline", true);

                      app.router.navigate('#home', true);

                  }, false);
              }
          });

Is there any solution for this?

Having Issues When Salesforce Mobile SDK 2.1 App Upgraded to Salesforce Mobile SDK 3.0 on iOS

We have a mobile application which has been developed using Salesforce Mobile SDK 2.1 and Backbone.JS (Smartstore + smartsync) on iOS platform and we recently, move it to Salesforce Mobile SDK 3.0.

We en-counted some issues, specially with addEventListener event where it didn't work which works fine with SDK 2.1.

document.addEventListener("offline", function () {}

document.addEventListener("online", function () {}

But somehow, once we changed to window from document as below it triggers the listeners but both firing at the same time and when the application comes online it fires twice each

window.addEventListener("offline", function () {}

window.addEventListener("online", function () {}

Is there any solution for this?

nHaving Issues When Salesforce Mobile SDK 2.1 App Upgraded to Salesforce Mobile SDK 3.0 on iOS

We have a mobile application which has been developed using Salesforce Mobile SDK 2.1 and Backbone.JS (Smartstore + smartsync) on iOS platform and we recently, move it to Salesforce Mobile SDK 3.0.

We en-counted some issues, specially with addEventListener event where it didn't work which works fine with SDK 2.1.

document.addEventListener("offline", function () {}

document.addEventListener("online", function () {}

But somehow, once we changed to window from document as below it triggers the listeners but both firing at the same time and when the application comes online it fires twice each

window.addEventListener("offline", function () {}

window.addEventListener("online", function () {}

Offline Tracker Code :

        app.models.OfflineTracker = Backbone.Model.extend({
              initialize: function () { 
                  var that = this;
                  this.set("isOnline", navigator.onLine);
                  //start here
                  document.addEventListener("offline", function () {
                      debugLog("Received OFFLINE event");

                      that.set("isOnline", false);

                      app.router.navigate('#getUserLanguage', true);
                  }, false);
                  document.addEventListener("online", function () {
                      debugLog("Received ONLINE event");

                      that.set("isOnline", true);

                      app.router.navigate('#home', true);

                  }, false);
              }
          });

Is there any solution for this?

2 added 16 characters in body; edited tags; edited title
source | link

Having Issues When Salesforce Mobile SDK 2.1 App Upgraded to Salesforce Mobile SDK 3.0 on iOS

We have a mobile application which has been developed using Salesforce Mobile SDK 2.1 and Backbone.JS (Smartstore + smartsync) on iOS platform and we recently, move it to Salesforce Mobile SDK 3.0.

We en-counted some issues, specially with addEventListener event where it didn't work which works fine with SDK 2.1.

document.addEventListener("offline", function () {}

document.addEventListener("online", function () {}

But somehow, once we changed to window from document as below it triggers the listeners but both firing at the same time and when the application comes online it fires twice each

window.addEventListener("offline", function () {}

window.addEventListener("online", function () {}

Is there any solution for this?

Having Issues When Salesforce Mobile SDK 2.1 App Upgraded to Salesforce Mobile SDK 3.0

We have a mobile application which has been developed using Salesforce Mobile SDK 2.1 and Backbone.JS (Smartstore + smartsync) and we recently, move it to Salesforce Mobile SDK 3.0.

We en-counted some issues, specially with addEventListener event where it didn't work which works fine with SDK 2.1.

document.addEventListener("offline", function () {}

document.addEventListener("online", function () {}

But somehow, once we changed to window from document as below it triggers the listeners but both firing at the same time and when the application comes online it fires twice each

window.addEventListener("offline", function () {}

window.addEventListener("online", function () {}

Is there any solution for this?

Having Issues When Salesforce Mobile SDK 2.1 App Upgraded to Salesforce Mobile SDK 3.0 on iOS

We have a mobile application which has been developed using Salesforce Mobile SDK 2.1 and Backbone.JS (Smartstore + smartsync) on iOS platform and we recently, move it to Salesforce Mobile SDK 3.0.

We en-counted some issues, specially with addEventListener event where it didn't work which works fine with SDK 2.1.

document.addEventListener("offline", function () {}

document.addEventListener("online", function () {}

But somehow, once we changed to window from document as below it triggers the listeners but both firing at the same time and when the application comes online it fires twice each

window.addEventListener("offline", function () {}

window.addEventListener("online", function () {}

Is there any solution for this?

1
source | link

Having Issues When Salesforce Mobile SDK 2.1 App Upgraded to Salesforce Mobile SDK 3.0

We have a mobile application which has been developed using Salesforce Mobile SDK 2.1 and Backbone.JS (Smartstore + smartsync) and we recently, move it to Salesforce Mobile SDK 3.0.

We en-counted some issues, specially with addEventListener event where it didn't work which works fine with SDK 2.1.

document.addEventListener("offline", function () {}

document.addEventListener("online", function () {}

But somehow, once we changed to window from document as below it triggers the listeners but both firing at the same time and when the application comes online it fires twice each

window.addEventListener("offline", function () {}

window.addEventListener("online", function () {}

Is there any solution for this?