Database Implementation

So I have LITERALLY no idea where to start. I'm new to Swift and Xcode. I have an app that scans barcodes but all it displays is the numbers and underlying data of the barcode that it scans, I need to implement a databases for it to search and have it display the results. I have no idea how to even begin to do this. Right now they show the above mentioned data but it's just nonsense. Does anyone know where I should start with tis? What frameworks do I need? How do I add the barcode APIs into the project? And how do I get the results to show something other than unintelligible dtings of numbers and letters?


Any resources or starting points will be greatly appreciated. I wasn't chosen to go to WWDC this year so I missed out on that but I'm hoping that that setback won't hamper my future progress!


Thanks everyone!

For reading a QR Code, this tutorial will be very helpful.

h ttps://www.hackingwithswift.com/example-code/media/how-to-scan-a-qr-code


And for barcode

h ttps://www.appcoda.com/simple-barcode-reader-app-swift/


A second phase will be to implement a database, but I advise you do start by reading the barcode.


Before any coding, you should draw on a paper your application sketch design: just draw by hand the few screens that the user will see, describe what will be done in each view…


That will help you build your app progressively.


For instance :

- a launch screen to welcome use

- the initial screen where he/she can select reading a barcode or a QR code, with 2 buttons to link to video capture screen ; in this view, you could have a help button to explain rapidly how to use your app ; you have also the result of the scan.

- the screen captures, with possibility to tap to give up scanning

- depending on what you intend to do with database, a few views for managing the database…

It already reads. I need it to know that what it's reading is something other than just letters and numbers. I need it to return results. I alrady have a mockup of what I want it to look like and what I want it to do.

>they show the above mentioned data but it's just nonsense.


Can you share a snippet of your raw data?

So, you read the bar code and want to know what it means, what product it is ?


If it is EAN13 barcode, here is the structure: (h ttps://www.cognex.com/resources/symbologies/1-d-linear-barcodes/ean-13-barcodes)

Specifications: As their name implies, EAN-13 barcodes store a total of 13 digits, as opposed to UPC-A codes, which store 12. The first two digits are the GS1 Prefix, which identify the product's country of origin. Then is a five digit company number, to identify the brand, followed by a five digit item number, to identify the product itself. After that, there is a check number, to ensure the code's accuracy. Finally, there is a > symbol, indicating a "quiet zone," which signifies the end of the barcode.


if it is UPC-A (h ttps://www.cognex.com/resources/symbologies/1-d-linear-barcodes/upc-a-barcodes)

Specifications: A UPC-A barcode consists of 12 digits. It begins with a single digit number system character, which designates how the code should be classified: as a regular product, a weighted item, pharmaceuticals, coupons, etc. After that is a five digit manufacturer's number, followed by a five digit product number, and finally a check digit. Each digit is represented by a uniquely identifiable pattern of two bars and two spaces of varying width. No letters or other special characters aside from numbers may be used.


May be you could search, programmatically, on Internet to find what it is.


For instance, you have the upcIndex:

h ttps://www.upcindex.com/3574661065403 => opens on the product page


or eanDatabase, but it seems less complete

h ttps://eandata.com/lookup/3574661065410/


EDITED

They announce an API that may interest you. Soon !

h ttps://www.upcindex.com/api

Database Implementation
 
 
Q