This is a migrated thread and some comments may be shown as answers.

online/offline undefined

1 Answer 57 Views
JavaScript SDK
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
sebastien
Top achievements
Rank 1
sebastien asked on 23 May 2015, 04:36 PM

I am trying to force Everlive to go online of offline,however whenever I launch the app I get an "undefined" function for the call.

 I use a Native app with Appbuilder and the IOs companion app.

 var Everlive = require("../lib/everlive");
    var el  = new Everlive({
            apiKey: 'mykey',
            offlineStorage: true
        });
           
        el.online(); <-- does not seem to be defined

 

Is this feature working ?

 

The service itself does work because I am able to remove and add data to my dataservice tables.

 

   

1 Answer, 1 is accepted

Sort by
0
Vasil
Telerik team
answered on 25 May 2015, 09:06 AM
Hello Sebastien,

It seems you are initializing the SDK correctly. Please specify which version of the SDK you are using. The offline storage functionality was added in version 1.3.0. However, I'd recommend using the latest version, which is 1.3.1. You can find it here:

http://bs-static.cdn.telerik.com/1.3.1/everlive.all.js

You can also use the el.isOffline() and el.isOnline() methods to check the state of the SDK. One more thing I can recommend is checking out the offline mode sample app: https://github.com/telerik/platform-deliveries-hybrid

Please, let me know if this fixes the issue you are experiencing.

Regards,
Vasil
Telerik
 
Everlive is now Telerik Backend Services, and is part of the Telerik Platform.
 
Tags
JavaScript SDK
Asked by
sebastien
Top achievements
Rank 1
Answers by
Vasil
Telerik team
Share this question
or