billylo1 / covidpass

Web app for adding Ontario vaccination records to Apple Wallet (forked from covidpass in EU)
https://grassroots.vaccine-ontario.ca
MIT License
79 stars 12 forks source link

Link to directly add to Apple Health in iOS 15 (with official Apple Wallet support in 15.1 beta) #41

Open LouisStAmour opened 2 years ago

LouisStAmour commented 2 years ago

Just a suggestion, but if browsing using iOS 15, you can click this link to load a QR code directly into Apple Health:

Link

As you can see in the link URL, the magic part of the link is just the numeric part of the SHC code, without the "shc:/" at the front. Typing it directly into a browser won't work, it has to be clicked on as a link to popup correctly.

Note that unlike pkpass files, this does not require Safari and can work in Firefox or other browsers as well. And the QR code generated by Apple Health and within the Apple Wallet app is much larger and easier to scan than the current pkpass approach.

LouisStAmour commented 2 years ago

Note that the QR code used in the link above is not valid in any jurisdiction, it's from https://spec.smarthealth.cards/examples/

Apple Health app does not validate QR codes, it just lets you put them on your phone by storing them in Apple Health. And in Apple Wallet in iOS 15.1.

Additionally, if folks don't want to upload QR codes as PDFs to this website, even if everything runs locally, you can simply open the Camera app in iOS 15 and above and it will prompt you to add the QR code to Apple Health (and in your Wallet in 15.1). If you're looking at a QR code on your iPhone in the PDF already, you can add it to your Health app by taking a screenshot of the QR code, saving the screenshot to Photos by tapping Done, then Save to Photos, and finally opening the screenshot in your Photos app where you can long-press on the QR code and it will say "Add to Apple Health". It's much easier right now to use a link or the camera.

ikifar2012 commented 2 years ago

If you're looking at a QR code on your iPhone in the PDF already, you can add it to your Health app by taking a screenshot of the QR code, saving the screenshot to Photos by tapping Done, then Save to Photos, and finally opening the screenshot in your Photos app where you can long-press on the QR code and it will say "Add to Apple Health". It's much easier right now to use a link or the camera.

Keep in mind that only works on iPhones which support Live Text (Xs and Later), my iPhone 8 still requires I scan the QR code thus I find the website easier

straxus commented 2 years ago

@LouisStAmour interesting, I wasn't aware of this URL trick for Apple Health - I'll see if I can implement this tomorrow, I think it shouldn't be too bad to generate this since we already have the SHC present and have validated iOS 15 for enabling of the Apple Wallet card button. This can be added alongside the Apple Wallet button.

Thanks!!