I installed ZXing.Net.Mobile in my Xamarin.Forms project. I have no issue with Android project as I am using MobileBarcodeScanner.Initialize (Application);
in MainActivity. But in my iOS project I am trying to use global::ZXing.Net.Mobile.Forms.iOS.Platform.Init();
which is not accessiblein AppDelegate.cs file. I import following packages :
using System;
using System.Collections.Generic;
using System.Linq;
using ZXing.Mobile;
using Foundation;
using UIKit;
You have either the wrong library or not all you need. Take a look at this:
After that the initialization is as easy as:
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";
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.