How to check if barcode software is installed and run it (or install it) on iPhone iPad iPod?

StackOverflow https://stackoverflow.com/questions/23300174

  •  09-07-2023
  •  | 
  •  

Question

I am writing a web application that will use barcode scanning software.


The process for Android devices is following:
I have the element on page: <a href="intent://scan/?ret=www.mysite.com%2F%7BCODE%7D%2F#Intent;scheme=zxing;package=com.google.zxing.client.android;end">

After click, it is checked if user's device has Barcode Scanner installed. If not installed, user is redirected to Google Play and software is downloaded and installed. If installed, the Barcode Scanner is opened, user scans the barcode and the results are sent back (callback) to www.mysamplesite.com/{CODE}/ where {CODE} is a barcode content sent via $_GET. Pretty cool!

The process for iPod/iPad/iPhone devices is following:

This would be my question :). How to do the exact same thing on iOS devices? Is there any software that has similar capabilities please?

Was it helpful?

Solution

If anyone is interested, I have found a solution (jQuery is not necessary but I use it in my app anyway):

<iframe id="ios" width="1" height="1" style="visibility:hidden"></iframe>

$('body').on('click', '.scan_button', function() {
    var scan_link = 'p2spro://scan?formats=EAN13,EAN8,UPCE,ITF,CODE39,CODE128,CODE93,STD2OF5,CODABAR,QR&callback=www.mysamplesite.com%2FCODE%2F';
    $('#ios').attr("src", scan_link);

    setTimeout(function() {               
        window.location = "https://itunes.apple.com/us/app/pic2shop-pro-diy-barcode-scanner/id382585125?mt=8";
    }, 1000);    
});

The functionality is similar to 'Barcode Scanner' on Android, but unfortunately, 'pic2shop PRO' for iOS is not free. Anyway it works.

OTHER TIPS

In iOS you will have add ZXingObjC in your app to scan or create barcode.

Check how to open app if it exists in Apple Store using this link. But here scanned or created barcode would not be redirected to your app.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top