Search code examples
iossocketscansocketmobile

ios - SocketMobile SocketScan Carrier Name


I implemented socket scan API in iOS to scan and get the bar code and that seems to be working fine. I wanted to know if there is a way to find out the carrier name via the socket scan API ?


Solution

  • ScanAPI only provides the data that is encoded in the barcode and the barcode type. For example, the 12 digits of a UPC-A barcode - which are often printed below the barcode too.

    However, different carriers use different barcode types or format the encoded data differently. For example, UPS uses Aztec barcodes. USPS uses Code 128, which is quite common, but the barcode contains the tracking number which will start with a particular prefix depending on which service was used to send the letter/parcel.

    You can probably detect the carrier using this information, but you'd need to figure out the pattern for each carrier yourself.