I’m using Cordova 1.8.0 and an old version of Childbrowser (the new one doesnt seem to work).
Anyway, until yesterday night, this piece of code worked without any problem, this morning I clicked on run and the cb.onLocationChange stopped working.
I can’t get how this is possible. Is there any one that can give me hints on that? onLocationChange doest return me any console.log 🙁
var cb = ChildBrowser.install(); // install our ChildBrowser ( cb )
console.log("AAAA We don't have a user saved yet");
oauth = OAuth(options);
oauth.get('https://api.twitter.com/oauth/request_token',
function(data) {
console.log("AAAA Sent request token");
requestParams = data.text;
cb.showWebPage('https://api.twitter.com/oauth/authorize?'+data.text); // This opens the Twitter authorization / sign in page
console.log("AAAAAA onLocation chenge");
cb.onLocationChange = function(loc){ console.log("AAAAAA"); Twitter.success(loc); }; // When the ChildBrowser URL changes we need to track that
},
function(data) {
console.log("ERROR: "+data);
}
);
I found this question while I experiencing the same problem. The answer is here –
Reference Error: Can't find variable: ChildBrowser, Cordova 1.7.0, jQueryMobile 1.0.1, iOS 5.1
The short answer in ChildBrowser.install() doesn’t work anymore. Change your code’s first line to