Reputation: 390
I'm building a hybrid app with Meteor and Cordova. I'm stuck trying to get my Cordova apps to connect to my production server. Everything runs smoothly in my local dev environment and my mobile apps have no trouble to connect to the local server. It also works when I deploy to meteor.com. It only falls apart when I try to use my own server.
I tried to use app versions provided by meteor build --server http://my.server.ip
as well as meteor run android-device --server http://my.server.ip
. My server meteor server runs on an Ubuntu VM and I tried running it with and without Nginx.
In all cases I have no trouble accessing my app via the web but both apps just log cordova.file.dataDirectory is null
and don't connect to the server. Is there anything else I need to do?
Upvotes: 1
Views: 483
Reputation: 438
have you ever tried your app in a real device ?
most of emulators are not supporting cordova.file or some other plugins that depends on operating system. i hope it helps to every one's who has null references in emulators
Upvotes: 0
Reputation: 75965
There seems to be some issue with this as discussed on https://github.com/meteor/meteor/issues/3698#issuecomment-76955905
Try using --mobile-server
meteor build --mobile-server=https://domain:443
Or use the DDP_DEFAULT_CONNECTION_URL
environment variable on your server app as well as ROOT_URL
to declare your app's url.
Upvotes: 1