The government’s contact tracing app was clearly in peril when health minister Lord Bethell addressed the Commons science and technology select committee on Wednesday. “We’re seeking to get something going for the winter, but it isn’t a priority for us,” he told MPs.

Today, three months into development, the government has abandoned the app altogether. Quite a change considering that until recently the government had been heralding the app as vital for lifting lockdown.

The app’s fatal flaw, which prompted this embarrassing about turn, was that it could not function in the background of iPhones. If another app was being utilised, or the iPhone was idle in a person’s pocket or bag, it would stop providing Bluetooth data to the app, and the app would stop tracking the person’s encounters.

Apple could have fixed the problem by upgrading the app’s Bluetooth permissions. However, the company refused to budge on Silicon Valley’s data protection principles, objecting specifically to the government’s centralised data collection system.

The problem with the government’s app, as far as Apple was concerned, is that it would send information to a centralised NHS database. If someone were to come into contact with a newly-infected individual this database would then send out a warning to the person exposed to the virus. In contrast, the decentralised system, designed and advocated by Apple, allows phones to speak to each other – and warn each other – without interaction with a central database.

Government developers had argued that their approach would allow epidemiologists to track new virus outbreaks. Matthew Gould, the chief executive of NHSX, told MPs in late April that a centralised app would also provide the “ability to detect malicious use” by analysing “anomalous patterns” in a way that the decentralised system could not.

In practice, however, the government’s case for data centralisation was never going to pass Apple’s smell test, whatever the merits or circumstances. The company had unceasingly defended its principled stance on privacy and data protection in the past, and was willing to do so again, even in the midst of a pandemic.

Notably, in the wake of San Bernadino terrorist attack Apple steadfastly refused the Obama administration’s request to provide a backdoor into the phone of one of the terrorists. The case was compelling – access to the terrorist’s phone could provide evidence of future attacks. And with fourteen dead, corporate popularity would not be found in defending a terrorist’s data privacy. Still, even this, court orders, and direct pressure from the White House was not enough to force Apple to reconsider. Ultimately, the FBI had to seek alternative methods.

Today, former Obama administration officials would sympathise with the senior ministerial source who told The Times: “They’ve chosen not to co-operate with us. We’ve been trying to engage at relatively senior levels. We’ve pushed at all the doors we can get.”

With the government accepting the inevitable and folding to Apple’s demands, it can now seek the full cooperation of both Apple and Google in building a new contact tracing app. But while one major glitch has been solved, there remain other serious issues.

In recent trials of the NHSX app, government developers flagged an issue with the Bluetooth signal itself. Even when the app was active, erroneous signals would sometimes be sent to the database, leading it to contact the wrong people.

As The Telegraph reported last week, “Bluetooth strength can vary in real world situations such as in a supermarket or on a train, where signals could reflect off of metal surfaces and make it difficult to determine if two people should be registered as being in close contact.”

It is not clear how to fix such a problem without changing the hardware of mobile phones – an impossible task.

The government faces an almighty technological challenge to produce a viable app in time for a potential second wave, and all its effort may yet be in vain.