Business Card QR Codes and the Apple vCard Problem

by Harry Tarnoff

You may have heard the buzz on “quick response codes” – QR codes, typically one-inch square barcodes that are appearing on advertisements, coupons, in stores, even on T-shirts and shopping bags. The idea is someone interested in the product, store or event could whip out their cellphone, take a picture of the code and have the phone’s browser instantly bring up their associated web page with more information. Wouldn’t it be nice to do something similar on business cards so that someone can scan a code and have the contact information automatically added to their electronic address book?

As we opened up our new offices in Downtown Los Angeles, we wanted to do exactly this, not only because it would make it easier for the people to whom we gave our business cards to add us to their devices’ contact list, but it would also demonstrate some high-tech capability on an otherwise non-technical piece of paper – perfect for a technology strategy company. Well, it’s good that we know technology because there were a couple of issues along the way, the solutions for which we are more than happy to share.

The vCard and the QR Code

The generally accepted format for a electronic business card is called a “vCard.” It has been around since the mid-1990′s and is supported by all the major email and CRM programs. A vCard file can be attached to an email message or linked on the web. It is a readable text file with fields for names, addresses, phone numbers, and other personalized data.

QR or Quick Response codes represent an improvement over their UPC bar code ancestors because they can reliably carry more information for easy access by a business’ customers. Instead of a series of parallel lines as with UPC bar codes, QR codes are in a two-dimensional matrix with blacked out squares at certain row-column intersections, much like a crossword puzzle. Customers use smartphones to scan these codes to see more information – typically a web page associated with the codes – about whatever it is that these codes are associated with.

Let’s now say you want to put the equivalent of your vCard on your business card as a QR code. It may be a natural thought to simply put all of the vCard information directly into the code. This is not a good idea. Besides the code becoming too detailed and harder to scan, when someone scans it using a typical scanner app, they would get only the vCard text. The vCard information does not get added automatically to the Address Book unless the app itself is aware that the data represents a vCard and adds it to the Address Book itself. Your potential customers lacking an appropriate scanner application could become frustrated.

What you do instead is what the advertisers do, that is put a single web link into the QR code. This approach has wide support and will undoubted work fine. After all, that is the primary purpose of QR codes, to be scanned and take a user to a predefined web address.

The plan, then, is to create a code that takes the user to a web address which has a vCard file. The device’s browser, seeing that the “web page” is a vCard, will download the contact information and allow the user to add it to the Address Book.

The Apple Mobile Device Issue

While this approach works on virtually all desktops, notebooks, and many mobile devices including those based on Android, there is a big snag when it comes to Apple mobile devices. For years, Apple has supported vCards as the only easy way to export Address Book entries.  However, Apple’s mobile device browsers do not support vCard files. If you scan a link to a vCard file, all you get is a “Safari cannot download this file” message. Oops.

While this oversight will most likely eventually be fixed, it is probably not prudent to march forward adding QR codes to business cards and hope that Apple fixes this problem. Some kind of hopefully temporary workaround is in order.

You could email the vCard to the Apple device. The device will then ask the owner to confirm adding the data to the Address Book. The disadvantages to the approach are:

  1. It is not automatic since the user needs to enter an email address on which to receive the vCard
  2. The user has to give up his e-mail address which he or she may not want to do
  3. Emails are not always fast and reliable, so the user is forced to wait and possibly retry

The Solution

Fortunately, we have a much better workaround. It requires an entry in Google Places (or Google Maps) and administrative rights to a website.

Our DataPlex entry with Google Places has a bunch of business-related information and is a fine place to send someone who scans in the QR code from the back of our DataPlex business cards. The solution is to forward someone on an iPhone or iPad to this alternate URL. If you haven’t already, set up your entry in Google Places.

The Technical Part

The key part of the solution is adding a URL rewrite rule. Although the following is for Apache, there is a similar process for Microsoft’s IIS.

Here are the lines to add to the .htaccess-file on the website for the folder that contains the vCard:

RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} .*Mobile.*Safari
RewriteRule ^(.*)vcard.vcf$ http://maps.google.com/maps/place?hl=en&georestrict=input_srcid:0d6a82b1f62d0d2b

Your technical staff should, of course, change the third line with the “RewriteRule” to link to the proper map reference. If it is not already active, your staff also should enable the mod_rewrite module.

How this works is, when an Apple mobile user snaps a pic of the QR code in some scanner app, that app launches Mobile Safari to bring up that web page. The .htaccess tells the Apache server, when it sees that the “user agent” (browser ID) has contained within it the text strings “Mobile” and “Safari” to redirect the browser to the URL specified in the RewriteRule.

You can continue to use the same QR code pattern and URL but update the information on your website-based vCard and in Google Places without having to necessarily reprint your business cards.

Demonstration

Visually, what happens after the Apple mobile device user snaps the pic of the QR code, is, within seconds, he or she is looking at a Google Maps page for the business. Once there, the user can click on “more info” (the right-facing arrow in the blue circle) and then “Add to Contacts” at the bottom of the page. It is a bit unfortunate that the Add Contacts button, along with those for “Share Location” and “Add to Bookmarks” are off the bottom of the screen so the user would have to scroll down, but most experienced Apple device users would know this.

If you want to see a working demonstration of a working QR code-based vCard link, just scan the QR code below. It has the link to a vCard on the DataPlex website. If you are using an Apple device, you’ll end up in Google Maps as described above. Otherwise, you will be prompted to download the vCard directly into your Address Book or Contact List.

vCard for DataPlex

Barcodes, especially the new matrix codes such as QR, can be wonderful time-savers for businesses, but they have to be implemented smartly. If you would like to upgrade to the latest in barcode technology, let us help in your deployment of an easy-to-use yet robust system.

6 Responses to Business Card QR Codes and the Apple vCard Problem

  1. Pingback: A Quick Primer on Quick Response Barcodes

  2. This is very informative. Unfortunately, when I tried the test on my iPhone it did not work as described in the article. When I scanned the QR code using the Scan app, it just froze. Next I tried the Neoreader app. That got me to Google Maps but the “more info” button leads to a menu that does not have an “Add to Contacts”. I tried scrolling down as the article suggests, but there is nothing to scroll down to. I’ll send you a screen shot if you tell me what email address I should use.
    Thanks,
    Markk

    • Thank you, Mark. We checked out what you said, and you are indeed correct that there is no “Add to Contact” button. The reason for this is that DataPlex has a “Google Places” entry that now supersedes the regular map view on iOS devices. Google made this unilateral process change partly, we theorize, on the premise of promoting its own contact manager and other applications. The good folks at Google probably rationalize this change as superior in that you get all the benefits of Google Places: ratings, related photos, reviews, and other related information. Whether or not the Google map will come up on iOS devices (which will include the “Add to Contact” button) seems currently to be purely dependent on whether the scanned company has a Google Place or not.

      In addition, some of the scanner apps have not yet been updated to work with this change, so they appear to freeze. Often you can work around this issue by “opening in Safari,” if that feature is available in the app. It would be nice if Google provided us developers with an option whether to send people either to the Google Place or to a map. With user feedback it’s possible they’ll provide this backwards-compatible functionality.

  3. I had the same problem than markk, but now I understand why. I was suprised today when I found out this iPhone limitation. So far, I’ve read stuff about this problem written 3 or 4 years ago, so I think that if Apple had any interest on fixing this, they had already the opportunity to do it. Anyway, thank you for your experience and workarounds.

  4. Perfect post. I have a blog post that expands on how to incorporate QR codes in your web apps to deliver quick information directly to your users’ mobile device. http://blog.caspio.com/web_apps/4-ways-to-use-qr-codes-in-your-web-apps/

  5. This workaround may be obsolete. At http://vcardhosting.com, we think we have a good way to make iPhones handle .vcf vCards.

Leave a Reply