我正在尝试使用斑马蓝牙打印机开发一个用我的离子应用打印的插件。
在尝试打印说" opennig会话失败时,我发现错误,因为协议com.zebra.rawport未在Info.plist中宣布"
这是我在下面描述的Info.plist文件:
如果我将协议放在文件上,我真的不知道该怎么办。
这里我添加了plugin.xml文件:
<?xml version="1.0" encoding="utf-8"?>
<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0" id="com.ecuaquimica.zebraPrinterBluetooth" version="0.0.1">
<name>ZebraPrinter Bluetooth</name>
<engines>
<engine name="cordova" version=">=3.4.0"/>
</engines>
<js-module src="www/zebraPrinterBluetooth.js" name="zebraPrinterBluetooth">
<clobbers target="zebraPrinterBluetooth"/>
</js-module>
<platform name="android">
<config-file target="AndroidManifest.xml" parent="/*">
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
</config-file>
<config-file target="res/xml/config.xml" parent="/*">
<feature name="ZebraPrinterBluetooth">
<param name="android-package" value="com.ecuaquimica.plugin.ZebraPrinterBluetooth"/>
</feature>
</config-file>
<source-file src="src/android/ZebraPrinterBluetooth.java" target-dir="src/com/zebraPrinterBluetooth/plugin/"/>
<source-file src="src/android/ZSDK_ANDROID_API.jar" target-dir="libs"/>
</platform>
<platform name="ios">
<config-file target="config.xml" parent="/*">
<feature name="ZebraPrinterBluetooth">
<param name="ios-package" value="ZebraPrinterBluetoothPlugin"/>
</feature>
</config-file>
<header-file src="src/ios/ZebraPrinterBluetooth.h" target-dir="ZebraPrinterBluetoothPlugin"/>
<source-file src="src/ios/ZebraPrinterBluetooth.m" target-dir="ZebraPrinterBluetoothPlugin"/>
<config-file target="*-Info.plist" parent="UISupportedExternalAccesoryProtocols">
<array>
<string>com.zebra.rawport</string>
</array>
</config-file>
<config-file target="*-Info.plist" parent="Required Background modes">
<array>
<string>App Communicates with an accesory</string>
</array>
</config-file>
<source-file src="src/ios/libZSDK_API.a" framework="true"/>
<framework src="ExternalAccesory.framework" />
<header-file src="src/ios/include/DiscoveredPrinter.h" target-dir="ZebraPrinterBluetoothPlugin/Headers"/>
<header-file src="src/ios/include/DiscoveredPrinterNetwork.h" target-dir="ZebraPrinterBluetoothPlugin/Headers"/>
<header-file src="src/ios/include/FieldDescriptionData.h" target-dir="ZebraPrinterBluetoothPlugin/Headers"/>
<header-file src="src/ios/include/FileUtil.h" target-dir="ZebraPrinterBluetoothPlugin/Headers"/>
<header-file src="src/ios/include/FormatUtil.h" target-dir="ZebraPrinterBluetoothPlugin/Headers"/>
<header-file src="src/ios/include/GraphicsUtil.h" target-dir="ZebraPrinterBluetoothPlugin/Headers"/>
<header-file src="src/ios/include/MagCardReader.h" target-dir="ZebraPrinterBluetoothPlugin/Headers"/>
<header-file src="src/ios/include/MfiBtPrinterConnection.h" target-dir="ZebraPrinterBluetoothPlugin/Headers"/>
<header-file src="src/ios/include/NetworkDiscoverer.h" target-dir="ZebraPrinterBluetoothPlugin/Headers"/>
<header-file src="src/ios/include/PrinterStatus.h" target-dir="ZebraPrinterBluetoothPlugin/Headers"/>
<header-file src="src/ios/include/PrinterStatusMessages.h" target-dir="ZebraPrinterBluetoothPlugin/Headers"/>
<header-file src="src/ios/include/SGD.h" target-dir="ZebraPrinterBluetoothPlugin/Headers"/>
<header-file src="src/ios/include/SmartCardReader.h" target-dir="ZebraPrinterBluetoothPlugin/Headers"/>
<header-file src="src/ios/include/TcpPrinterConnection.h" target-dir="ZebraPrinterBluetoothPlugin/Headers"/>
<header-file src="src/ios/include/ToolsUtil.h" target-dir="ZebraPrinterBluetoothPlugin/Headers"/>
<header-file src="src/ios/include/ZebraErrorCode.h" target-dir="ZebraPrinterBluetoothPlugin/Headers"/>
<header-file src="src/ios/include/ZebraPrinter.h" target-dir="ZebraPrinterBluetoothPlugin/Headers"/>
<header-file src="src/ios/include/ZebraPrinterConnection.h" target-dir="ZebraPrinterBluetoothPlugin/Headers"/>
<header-file src="src/ios/include/ZebraPrinterFactory.h" target-dir="ZebraPrinterBluetoothPlugin/Headers"/>
<header-file src="src/ios/include/ZplPrintMode.h" target-dir="ZebraPrinterBluetoothPlugin/Headers"/>
</platform>
</plugin>
&#13;