I\'m currently developing a webapp using Cordova (Phonegap), Backbone and JQtouch. Among other things, I need to add events in the user calendar.
Everything works fi
Sorry to answer my own question.
It was what I thought in my last edit: RequireJS is messing with Cordova 2.2.0!
Before, I used this code to load cordova:
require.config({
paths: {
cordova: 'libs/cordova/cordova-2.2.0', ...
Before any of my script which use cordova, I was writing:
define([
'jquery',
'cordova',
...
], function($) { ... }
In my index.html, I had:
And it worked well with cordova 2.0.0! But with cordova 2.2.0, this is just WRONG.
To resolve my problem:
I got rid of everything about cordova in the previous lines.
Instead, I added just one line in my index.html:
And everything works fine! I can call cordova.exec() again! (Tested on iOS 4, iOS 6, and on iPhone 5).
To be honest, I don't understand very well how all of this work. I just suppose that cordova needs to be loaded before everything else (like jquery), and RequireJS is not good at doing this (or I don't know how to use it).
It was awful going through this. I'm glad it's over :)
Anyway, I hope this will be useful for someone.