I'm with a difficult to use a Cordova plugin with Meteor and React, from the docs I saw that:
You should wrap any functionality which relies on a Cordova plugin in a Meteor.startup() block to make sure the plugin has been fully initialized (by listening to the deviceready event). For example, when using the Cordova geolocation plugin:
Meteor.startup(function() {
// Here we can be sure the plugin has been initialized
navigator.geolocation.getCurrentPosition(success); });
}
And I know I need to define this:
Cordova.depends({
'org.apache.cordova.camera': '0.3.1'
});
But I have some questions:
1º - Can I put this function Meteor.startup()
anywhere inside server and about inside the client?
2º - Where I need to put the Cordova.depends()
? There is a packages file on Meteor > local, but it's not a js file.
3º - After define the Cordova.depends()
could I invoke the functions from the client side with react? If so, How?
Some example with that would be great!