Jos*_*ose 9 info.plist ios cordova cordova-plugins
我正在构建一个插件来使用iOS设备中的星形打印机,使用它们的SDK,一切正常,但config-file
修改info.plist文件的命令无法正常工作.在我的plugin.xml里面,我有:
<config-file target="*-Info.plist" parent="Supported external accessory protocols">
<array>
<key>item 0</key>
<string>jp.star-m.starpro</string>
</array>
</config-file>
Run Code Online (Sandbox Code Playgroud)
有了这个我应该得到一个Supported external accessory protocols
数组,其中包含一个名为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>
Run Code Online (Sandbox Code Playgroud)
相关问题:
我config-file
通过阅读这些问题来实现.
经过进一步的测试和研究,我找到了如何编写config-file
才能正常工作。这是 XML
<config-file target="*-Info.plist" parent="UISupportedExternalAccessoryProtocols">
<array>
<string>jp.star-m.starpro</string>
</array>
</config-file>
Run Code Online (Sandbox Code Playgroud)
在这里,我将父名称从 更改为Supported external accessory protocols
并UISupportedExternalAccessoryProtocols
删除了<key>
标签,现在可以按预期工作。
归档时间: |
|
查看次数: |
4118 次 |
最近记录: |