-1

My app can generate QRCode. I want to share it with another person. Is it possible to generate QRCode with some user information? And when somebody scan it then it will save in user address book.

Dmitriy Greh
  • 684
  • 8
  • 17
  • 1
    "*Is it possible to generate QRCode with some user information?*" Anything in software is, generally speaking, possible with enough time, money, resources... etc. Questions in this form ("*is X possible?*") are *much* too broad for Stack Overflow's Q&A format. Please see [ask] – esqew Feb 18 '22 at 14:55
  • Encoding vCard-formatted data to a QR code is a well-documented standard; there are multiple ways to accomplish this within the iOS SDK specifically, with several resources on how to accomplish this right here on Stack Overflow. What research have you done? What code have you written so far? Can you share it here as a [mre], along with an explanation of where *specifically* you're getting stuck in that attempt? Duplicate of [How to Create Contact QR code in iphone](https://stackoverflow.com/questions/10413244/how-to-create-contact-qr-code-in-iphone) – esqew Feb 18 '22 at 14:56

1 Answers1

2

There's something called vCard format and I think that this could help you.

Here's a small example:

name = 'Carlos Sainz'
phone = 'xxxxxxxxx'
string_for_qr = f"BEGIN:VCARD\nVERSION:2.1\nFN:{name}\nTEL;CELL:{phone}\nEND:VCARD" 

If you create a QR code with the string "string_for_qr" then when you scan the QR code your phone will display the information with the option of save. Sorry for my poor english.