Start a new topic

Kinvey Phonegap don't work

Hi, I'm trying to develope phonegap app using kinvey. I init my index and check connection with my backend app and it's ok reveing "hello app_name". but when I try to use any function like Kinvey.Datastore.get or Kinvey.Datastore.find it doesnt work.



I call like:

Kinvey.DataStore.find('APPGPS', null, {

success: function(response) {

alert("response: " + response);

}

});



I was testing the kinvey-phonegap-1.1.7.js code and saw that when i call to Kinvey.DataStore.find for example It stopped when try to do this line: var f=c.Persistence.read({namespace:d,collection:a,query:b,auth:z.Default,local:{req:!0,res:!0}},e)



I saw that namespace d="appdata",

a="mycollection" in my case appgps,

b=null because i don't use query



Can you help me?

Hi Alvaro, Since your question is about PhoneGap I've tagged it as JavaScript so we can get the correct eyes on it.
Since you mention that it "stopped", does it show an error message in the console? Also, can you try attaching an error handler to see if anything pops up:



```

Kinvey.DataStore.find('APPGPS', null, {

success: function(response) {

alert("response: " + response);

},

error: function(error) {

alert('error:' + JSON.stringify(error));

}

});

```
Hi, I said it "stopped" because I tried to attach the error like you propose but this alert doesn't showed. I think the problem is the javascript because the function I mentioned previously don't end because it stop in the middle of the code.
Hmm, this seems like a tricky problem. What platform are you building for? And is there any error logged in the console (outside of the callbacks), that should happen if the code just stops executing.
Login or Signup to post a comment