我正在构建一个插件,使用iOS设备上的星形打印机,它们的SDK和一切正常,除了config-file
命令修改info.plist文件是工作不正常。在我的的plugin.xml我:Cordova:从plugin.xml修改* -Info.plist
<config-file target="*-Info.plist" parent="Supported external accessory protocols">
<array>
<key>item 0</key>
<string>jp.star-m.starpro</string>
</array>
</config-file>
有了,我应该得到一个Supported external accessory protocols
阵列1项名为item 0
,类型String
和价值jp.star-m.starpro
而是我得到两个项目,就好像一个数组我会做:
<array>
<key>item 0</key>
<string>item 0</string>
<key>item 1</key>
<string>jp.star-m.starpro</string>
</array>
相关问题:
我从这个问题读取执行的config-file
。
- Add entry to iOS .plist file via Cordova config.xml
- Two cordova plugins modifying “*-Info.plist” CFBundleURLTypes
可以尝试此配置:<配置文件中目标= “* - Info.plist的” 父= “支持的外部附件协议”> 项0 jp.star米。 STARPRO 配置文件> –
Gandhi
嗨@Gandhi,那会给我一个字符串数组内,一本字典所有项目0键里面我试了一下,无论如何,但它并没有活像ķ。 – Jose
如何使用这个简化你的任务的插件 - https://github.com/dpa99c/cordova-custom-config – Gandhi