cancel
Showing results for 
Search instead for 
Did you mean: 

Documentation needs an example for scanning Barcodes, FUIBarcodeScanViewController unclear

0 Kudos

Hey, basically I just want to either:

1) Start a predefined view that scans a QR code, and gives me a String back or

2) Start my own View/ViewController which embeds the SDK's Scanner.

Both of these are outside of a searchbar etc.

I tried to follow the instructions at the docs but they do not work at all.

I'll start listing the things which I do not understand:

"Developer may use segue in their storyboard to access this FUIBarcodeScanViewController in FUIBarcodeScanViewController.storyboard." What storyboard file? It was not created within my project.

I don't know how to use the variant with prepare.

Next on, the version with customScanFromCode. Gist to my code

FUIBarcodeScanViewController.createInstanceFromStoryboard() always returns an instance with almost all values set to nil.

My app crashes by the time "scanViewController.barcodeScanner.scanMode = .qr" got executed, because barcodeScanner gets force-unwrapped, and it was nil.

I am not able to launch a Scanner in any way. There is also no example or guide which I could find.

Accepted Solutions (1)

Accepted Solutions (1)

Qualiture
Active Contributor

Hi Carsten,

There is a step-by-step tutorial which covers the basic implementation of a barcode / QR code scanner: Implement Barcode Scanner.

If you plan on using the scanner using the List Report Floorplan design pattern, the scanner implementation is covered in tutorial List Report Floorplan.

Hope this helps!

Best regards,

Robin van het Hof

0 Kudos

Hey, I've just followed this tutorial, but the barcode button does not appear at all.

Screenshot, iPhone

You can look at the code @ this Gist.

I've added 2 sample strings so the table shows something. Filtering works. No icon on iPad either.

Qualiture
Active Contributor

Hi Carsten,

Have you tried it running on a physical device? The simulator does not work for me, obviously, since it doesn't have a camera. The tutorial code does work on a physical iPhone

Sadly I had missed your comment until now. Figured this out today.

I was surprised the SDK doesn't launch a dialog/popup, or console warning that Simulator devices aren't supported. The FUIBarcodeScanViewController docs don't mention it either, only in the tutorial it's noted.

If anyone needs some more pointers on how to use FUIBarcodeScanViewController, I've uploaded a gist which shows how it works, and I've added some checks so it doesn't crash on Simulator devices.

https://gist.github.com/carstenhag/f21300611bc1ffecfa386e698b7429f2

Thanks Robin! 🙂

Answers (1)

Answers (1)

perage
Participant
0 Kudos

Hi,

I came accross this as well, and what the neither the tutorial nor the gist cover is how to invoke the barcodescanner when touching the barcode symbol. From the API it says that method searchBarSearchButtonClicked will be invoked, but I've implemented that method, and nothing happens when touching the barcode icon.

Any clues?