You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Aaron Barnes (JIRA)" <ji...@apache.org> on 2013/11/26 17:20:35 UTC
[jira] [Comment Edited] (CB-4731) Adding config entries in
plugin.xml results in duplicate .plist entries
[ https://issues.apache.org/jira/browse/CB-4731?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13832726#comment-13832726 ]
Aaron Barnes edited comment on CB-4731 at 11/26/13 4:19 PM:
------------------------------------------------------------
This is a terrible work-around, but for anyone finding themselves here who just want to get plist arrays working in a plugin without requiring users to manually edit their own -Info.plist, you can clobber the array with a simple one-dimensional value, and then re-clobber it with the proper array.
ie, this works without adding duplicate UIInterfaceOrientationPortrait keys each time:
<config-file target="*-Info.plist" parent="UISupportedInterfaceOrientations~ipad">
<string>CLOBBER</string>
</config-file>
<config-file target="*-Info.plist" parent="UISupportedInterfaceOrientations~ipad">
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>
</config-file>
was (Author: aaron_stasis):
This is a terrible work-around, but for anyone finding themselves here who just want to get plist arrays working in a plugin without requiring users to manually edit their own -Info.plist, you can clobber the array with a simple one-dimensional value, and then re-clobber it with the proper array.
ie, this works:
<config-file target="*-Info.plist" parent="UISupportedInterfaceOrientations~ipad">
<string>CLOBBER</string>
</config-file>
<config-file target="*-Info.plist" parent="UISupportedInterfaceOrientations~ipad">
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>
</config-file>
> Adding config entries in plugin.xml results in duplicate .plist entries
> -----------------------------------------------------------------------
>
> Key: CB-4731
> URL: https://issues.apache.org/jira/browse/CB-4731
> Project: Apache Cordova
> Issue Type: Bug
> Components: Plugman
> Affects Versions: 3.0.0
> Environment: macosx
> Reporter: Tim Croydon
> Assignee: Braden Shepherdson
> Priority: Minor
>
> I have the following in the plugin.xml file for a custom plugin:
> {code}
> <platform name="ios">
> <config-file target="*-Info.plist" parent="UIBackgroundModes">
> <array>
> <string>location</string>
> <string>voip</string>
> </array>
> </config-file>
> </platform>
> {code}
> However, this does not generate the expected entries in the .plist file. I get:
> {code}
> <key>UIBackgroundModes</key>
> <array>
> <string>location</string>
> <string>voip</string>
> <string>location</string>
> <string>voip</string>
> </array>
> {code}
> i.e. elements are repeated. I have tried with a single element in the source plugin.xml and get the same result.
> I am using the cordova CLI to manage my plugins, platforms and build.
> (p.s. I'm new to Cordova so apologies if this is filed under the incorrect component)
--
This message was sent by Atlassian JIRA
(v6.1#6144)