简体   繁体   中英

Secret QR Code - Only read by my own scanner app

I am working on a social app like Instagram, Snap Chat, and Facebook. I need to generate a QR code of user profiles. I have hidden user ids from the database. I have a scanner in my app to scan the QR code. The functionality is working fine.

But when my generated QR codes are read by other scanner apps, like the iOS default scanner, it reads the user id (string, text) from the QR code.

I have used Swift default code for QR code generation.

QR code read only by my app.

Like Snap Chat, Messenger, etc.

Have a look at this article

How is Snapchat QR code so different than others?

Snapchat and other apps have designed their own methods to create and read a QR code. Snapchat uses its own processing techniques to detect a series of dots to scan the code. It uses the snapchat logo for reference in the image to know where exactly to start the scanning. I am pretty sure Facebook and other apps are doing something similar.

You can maybe look at something that Instagram is doing. They use Text Detection to read a users name tag. You can look into this article for the same.

Text Detection Article

As far as i know there is no direct way that you can achieve this. You will have to essentially re-invent the wheel and come up with your own way to generate and read a code that is specific to your app.

Another approach would be to use an encryption algorithm to encrypt and decrypt your message and then using the QR code generator to generate a QR code of the encrypted message.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM