Adding plugin parameters via config.xml in Visual Studio does not work

I am using VS2013 Update 4 using Apache Cordova Tools CTP 3.1. I struggled with installing two plugins where both of them use a tag <preference>in their plugin.xml file.

This is basically the same as this , but the sentences in the answers do not seem to help at all. It also seems like the problem is not related to the Facebook Connect plugin, so this is a new question.

https://msdn.microsoft.com/en-us/library/dn757051.aspx#Configuring shows that adding parameters to plugins is supported through config.xml, but so far I’m out of luck,

<vs:plugin name="com.phonegap.plugins.facebookconnect" version="0.8.1">
    <param name="APP_ID" value="12345678" />
    <param name="APP_NAME" value="My Facebook App" />
</vs:plugin>

I get:

TypeError: cannot use the 'in' operator to search for 'APP_ID' in undefined

The same goes for the following plugin: https://github.com/EddyVerbruggen/Custom-URL-scheme

<vs:plugin name="nl.x-services.plugins.launchmyapp" version="3.2.2">
    <param name="URL_SCHEME" value="appname" />
</vs:plugin>

where i get:

TypeError: cannot use the 'in' operator to search URL_SCHEME 'in undefined

I struggled with this for a while, but there seems to be no solution. Has anyone seen the same problem, and if so, found a solution?

+1
source share
1 answer

, - Cordova Cordova < 5.0.0. , "" , . , Cordova 5.0.0, VS 2015 RC. 5.0.0 , VS .

  • .
  • Cordova 5.0.0 ( > Cordova CLI)
  • :
    • .
    • , :
      • npm install -g cordova
      • cordova plugin nl.x-services.plugins.launchmyapp --variable URL_SCHEME = myscheme

, . , 5.0.0 .

https://www.visualstudio.com/explore/cordova-known-issues-vs

, Facebook Cordova iOS. , VS - NTFS Windows. : https://github.com/Chuxel/taco-tricks/tree/master/ios-plugin-symlink-fix

+4

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


All Articles