Adding info.plist entries to Meteor?

How to add an entry to the info.plist file in Meteor?

Is there a mobile-config setting or similar?

The Uber documentation provides an example of why you want to add an entry: https://developer.uber.com/docs/deep-linking

+5
source share
2 answers

I did not use Meteor, but you could use the cordova-custom-config plugin to define a custom configuration in project/cordova-build-override/config.xml (see Meteor Advanced Build Customization ) and apply it to the platform configuration at build time:

 meteor add cordova:cordova-custom-config 

config.xml:

 <platform name="ios"> <config-file platform="ios" target="*-Info.plist" parent="LSApplicationQueriesSchemes"> <array> <string>uber</string> </array> </config-file> </platform> 
+6
source

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.

0
source

Source: https://habr.com/ru/post/1244953/


All Articles