The answer from @davealden is not the right answer for Meteor. Meteor uses mobile-config.js
for mobile configurations. You should avoid using third-party methods, since Meteor checks this file when creating an assembly and using a third-party will lead to inconsistency.
An example mobile-config.js
might be as follows:
// This section sets up some basic app metadata, the entire section is optional. App.info({ id: 'com.example.matt.uber', name: 'über', description: 'Get über power in one button click', author: 'Matt Development Group', email: ' contact@example.com ', website: 'http://example.com' }); // Set up resources such as icons and launch screens. App.icons({ 'iphone_2x': 'icons/ icon-60@2x.png ', 'iphone_3x': 'icons/ icon-60@3x.png ', // More screen sizes and platforms... }); App.launchScreens({ 'iphone_2x': 'splash/ Default@2x ~iphone.png', 'iphone5': 'splash/Default~iphone5.png', // More screen sizes and platforms... }); // Set PhoneGap/Cordova preferences. App.setPreference('BackgroundColor', '0xff0000ff'); App.setPreference('HideKeyboardFormAccessoryBar', true); App.setPreference('Orientation', 'default'); App.setPreference('Orientation', 'all', 'ios'); // Pass preferences for a particular PhoneGap/Cordova plugin. App.configurePlugin('com.phonegap.plugins.facebookconnect', { APP_ID: '1234567890', API_KEY: 'supersecretapikey' }); // Add custom tags for a particular PhoneGap/Cordova plugin to the end of the // generated config.xml. 'Universal Links' is shown as an example here. App.appendToConfig(` <universal-links> <host name="localhost:3000" /> </universal-links> `);
To modify Info.plist
, you can use the App.appendToConfig
object. For example, to request access to the device’s microphone, you must add the following snippet to your mobile-config.js
;
App.appendToConfig(` <edit-config target="NSMicrophoneUsageDescription" file="*-Info.plist" mode="merge"> <string>Need microphone access to enable voice dialogs</string> </edit-config> `);
The official documentation contains comprehensive information.
source share