2016-08-25 74 views
0

我在Xamarin.Forms项目中安装了ZXing.Net.Mobile。我没有Android项目的问题,因为我在MainActivity中使用 MobileBarcodeScanner.Initialize (Application); 。但在我的iOS项目中,我尝试使用global::ZXing.Net.Mobile.Forms.iOS.Platform.Init();,这是AppDelegate.cs文件中无法访问的。我输入以下软件包:ZXing.Net.Mobile不能在Xamarin中使用iOS

using System; 
using System.Collections.Generic; 
using System.Linq; 
using ZXing.Mobile; 
using Foundation; 
using UIKit; 
+0

需要导入斑马线过和你的项目必须引用zxing.ios - >这是不同的从android一个! –

+0

zxing没有ios,即找不到zxing.ios。 – Dipak

回答

0

你有一个错误的库或不是你需要的全部。看看这个: References and Imports for mobilebarcodescanning


之后初始化一样简单:

scanner = new MobileBarcodeScanner(); 
     scanner.BottomText = "Der Barcode wird automatisch gescannt"; 
     scanner.TopText = "Bringen Sie den Barcode in die Mitte des Bildschirms"; 
     scanner.CancelButtonText = "Abbrechen"; 
     scanner.FlashButtonText = "Licht"; 
相关问题