Clarification on Cordova needed

It’s a rather simple question, really: If I build a website that’s responsive to screen sizes can I simply add both Cordova platforms (i.e. iOS and Android) and put that onto the respective stores?

Which means, iOS, Android and browser versions functionally identical with the same server backend?

And if that is possible, how would I best go about when I do need to use some additional Cordova capablities (e.g. Camera) and don’t want to have that automatically included in the browser version?

So, no one can answer this simple question? Can I create an iOS, Android and Browser version from almost the same code base?

Yes, your questions answered in the Meteor Guide.

It actually doesn’t but thanks nonetheless.

Just out of curiousity, have you read the Meteor Mobile docs, linked to by @skirunman? Your basic question of “Can I use the same code base to run the app in Cordova?” is answered at the top, which I have pasted here for easy reference:

Meteor integrates with Cordova, a well-known Apache open source project, to build mobile apps from the same codebase you use to create regular web apps. With the Cordova integration in Meteor, you can take your existing app and run it on an iOS or Android device with a few commands.

The link provided also discusses how to tie into phone specific APIs, like the camera:

Cordova also opens up access to certain native device features through a plugin architecture. Plugins allow you to use features not usually available to web apps, such as accessing the device camera or the local file system, interact with barcode or NFC readers, etc.

The article linked does a great job instructing exactly how to get started and develop with Cordova, however to your last question about only creating functionality for Cordova devices and not for webapps, it also directly addresses this:

Just as you can use Meteor.isServer and Meteor.isClient to separate your client-side and server-side code, you can use Meteor.isCordova to separate your Cordova-specific code from the rest of your code.

I hope all of this helps. If you have specific questions, please feel free to open an issue for that as well.

2 Likes