That works. Thanks.

On 4/14/14 4:26 PM, "Shazron" <shaz...@gmail.com> wrote:

>Yes, that is the known limitation. My suggestion is to prefix the
>preference name with your plugin name, or whatever you prefer.
>
>
>On Mon, Apr 14, 2014 at 1:12 PM, Li, Jonathan <jonathan...@sap.com> wrote:
>
>> Although the preference can be defined in plugin.xml on per platform and
>> plugin level, but when the information is used to generate config.xml,
>>the
>> related preference element will be generated under the root "widget"
>> element, and so shared by all plugins. This may cause conflict if the
>>same
>> preference name is used by multiple plugins.
>>
>>
>>
>> On 4/14/14 3:48 PM, "Shazron" <shaz...@gmail.com> wrote:
>>
>> >per platform in the platform tag - yes.
>> >plugin level  - yes.
>> >
>> >
>> >On Mon, Apr 14, 2014 at 11:34 AM, Li, Jonathan <jonathan...@sap.com>
>> >wrote:
>> >
>> >> Does "preference" can be set on per platform and plugin level?
>> >>
>> >> On 4/14/14 2:27 PM, "Shazron" <shaz...@gmail.com> wrote:
>> >>
>> >> >Will a <preference />  tag not suffice?
>> >> >
>> >> >
>> >> >On Mon, Apr 14, 2014 at 11:23 AM, Li, Jonathan <jonathan...@sap.com>
>> >> >wrote:
>> >> >
>> >> >> Hi,
>> >> >> In the following sample plugin.xml and config.xml , the parameter
>> >> >> "enable-redirect" can be configured by app developers when they
>>add
>> >>the
>> >> >> plugin to cordova project. However, currently only "ios-package"
>>and
>> >> >> "onload" parameters are parsed and stored by config.xml's settings
>> >> >>parser,
>> >> >> other parameters (like "enable-redirect") are ignored by the
>>settings
>> >> >> parser, so plugin developer has to parse the config.xml again by
>> >> >>themselves
>> >> >> in order to get the other parameters' value.
>> >> >>
>> >> >> Just wonder it maybe a good idea to parse all parameters under
>> >>feature
>> >> >> element, and return it as a "param" dictionary, so as to make it
>> >>ready
>> >> >>to
>> >> >> use by developers within plugin's native code.
>> >> >>
>> >> >> Plugin.xml:
>> >> >>   <platform name="ios">
>> >> >> <config-file target="config.xml" parent="/widget">
>> >> >> <feature name="myplugin">
>> >> >> <param name="ios-package" value="myPlugin"/>
>> >> >> <param name="onload" value="true"/>
>> >> >> <param name="enable-redirect" value="$REDIRECT"/>
>> >> >> </feature>
>> >> >> </config-file>
>> >> >>         <source-file src="ios/libs/myPlugin.a" framework="true"/>
>> >> >>     </platform>
>> >> >>
>> >> >> Config.xml
>> >> >>     <feature name="myplugin">
>> >> >>         <param name="ios-package" value="myplugin" />
>> >> >>         <param name="onload" value="true" />
>> >> >>         <param name="enable-redirect" value="true" />
>> >> >>     </feature>
>> >> >>
>> >> >> Thanks
>> >> >> Jonathan
>> >> >>
>> >>
>> >>
>>
>>

Reply via email to