ukhsa-collaboration / COVID-19-app-iOS-BETA

Source code of the Beta of the NHS COVID-19 iOS app

Home Page:https://covid19.nhs.uk/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use of the iOS 12 Provisional Notification API

simbo64 opened this issue · comments

Describe the bug/improvement
In terms of paths to onboarding for the app, many user often download an app and possibly launch once but never even finish setup.
In this event, without the user having authorised bluetooth access and notifications, the app will not work and will have no way to tell the user it's not working.

New launch flow
Steps:

  1. User downloads the app on an iPhone with iOS 12 or later (vast majority of devices)
  2. On first launch of the app , it triggers something like:
if #available(iOS 12.0, *) {
            UNUserNotificationCenter.current().requestAuthorization(options: [.provisional, .alert, .badge, .sound]) { (granted, error) in
            }
        }
  1. This will not trigger any notification authorisation dialogs initially
  2. The app then schedules a notification (which it can cancel if onboarding completes) which reminds the user to finish setting up the app to be safe
  3. Then even if the user quits before authorising full notifications, quiet notifications can still be displayed in the user's Notification Center and on the lock screen with the finish setup message

Docs
https://developer.apple.com/documentation/usernotifications/unauthorizationoptions/2993019-provisional
Smartphone (please complete the following information):
All devices running iOS 12 and later, >95% of active iOS devices

@simbo64 That certainly sounds like an interesting use case - Naturally the app will only serve its purpose if it’s set-up correctly. I’ll pass this idea on to the design team who can can look into this and prioritise accordingly.

Great, if you need any further guidance or help setting this up, give us a shout

I'm pasting this message in every active GitHub issue, so you may receive duplicate notifications.

Today, I'm happy to announce that NHSX has released the full git commit history for the Isle of Wight Beta apps.

As discussed, we have redacted API keys, sensitive domain names, and some of the developers' personal details. I am still waiting on final approval to publish the server-side code.

I would like to personally thank the community for your comments, bug reports, and vulnerability disclosures. They all went into helping the development process.

The beta trial of this app has now ended and we've moved to the next phase of app development. It is our intention to publish the source code of future apps as the binaries are released to the public.

Once again, thank you for being part of this.

Terence Eden
Head of Open Technology - NHSX