If your Meteor application targets mobile platforms such as iOS or
Android, you can configure your app’s metadata and build process
in a special top-level file called
mobile-config.js which is not included in your application and is used only
for this configuration.
The code snippet below is an example
mobile-config.js file. The rest of this
section will explain the specific API commands in greater detail.
Set your mobile app's core configuration information.
- id, version, name, description, author, email, website String
Each of the options correspond to a key in the app's core configuration as described in the Cordova documentation.
Add a preference for your build as described in the Cordova documentation.
- name String
A preference name supported by Cordova's
- value String
The value for that preference.
- platform String
Optional. A platform name (either
android) to add a platform-specific preference.
Set a new access rule based on origin domain for your app. By default your application has a limited list of servers it can contact. Use this method to extend this list.
Default access rules:
market:*are allowed and are handled by the system (e.g. opened in the phone app or an email client)
http://localhost:*is used to serve the app's assets from.
- The domain or address of the Meteor server to connect to for DDP and hot code push of new versions.
Read more about domain patterns in Cordova docs.
Starting with Meteor 1.0.4 access rule for all domains and protocols
<access origin="*"/>) is no longer set by default due to
certain kind of possible
- pattern String
The pattern defining affected domains or URLs.
- type String
'intent': Controls which URLs the app is allowed to ask the system to open. (e.g. in the phone app or an email client).
'navigation': Controls which URLs the WebView itself can be navigated to (can also needed for iframes).
'network'or undefined: Controls which network requests (images, XHRs, etc) are allowed to be made.
- launchExternal Boolean
Set the build-time configuration for a Cordova plugin.
- id String
The identifier of the plugin you want to configure.
- config Object
A set of key-value pairs which will be passed at build-time to configure the specified plugin.
Set the icons for your mobile app.
- icons Object
An Object where the keys are different devices and screen sizes, and values are image paths relative to the project root directory.
Valid key values:
Set the launch screen images for your mobile app.
- launchScreens Object
A dictionary where keys are different devices, screen sizes, and orientations, and the values are image paths relative to the project root directory.
For Android, launch screen images should be special "Nine-patch" image files that specify how they should be stretched. See the Android docs.
Valid key values:
Append custom tags into config's widget element.
- element String
The XML you want to include