A detailed behind-the-scenes look by Bloomberg at the showdown between Apple and the FBI details how it had been on the cards for years before the San Bernardino shootings. Among the details revealed are that Apple provided the FBI with early access to iOS 8 so that the agency could understand the impacts ahead of its introduction.

The government’s concern about Apple’s increasing use of strong encryption dates back to 2010, said one source.

Long before iOS 8 was launched, U.S. law enforcement and intelligence agencies had fretted about Apple’s encryption, according to a person familiar with the matter. In 2010, the company introduced the video-calling app FaceTime. It encrypted conversations between users. The following year, the iMessage texting application arrived; it, too, featured encryption. While neither of these developments caused a public stir, the U.S. government was now aware how much of a premium Apple put on privacy.

It was around this time, says the piece, that the FBI started pushing the White House to introduce new legislation which would guarantee law enforcement access to data on smartphones and other devices. These attempts were reportedly abandoned when the Snowden revelations changed the public mood …

Officials were close to an agreement on legislation to update communications and privacy laws in 2013, but the Snowden revelations blew up the deal, according to a former U.S. official. After that, there was never again a serious effort to pass the legislation, the official said.

The government had in any case had mixed views on the issue, with even the Defense Department said to be concerned that creating backdoors into encrypted devices would create vulnerabilities for its own secret operations.

When Apple moved to encrypting iPhones by default in iOS 8, it gave the FBI a heads-up, so that the agency would understand the implications.

Apple gave the Federal Bureau of Investigation early access to iOS 8 so it could study how the new system would change evidence-gathering techniques, according to people familiar with the software’s development. The agency quickly realized Apple had closed an important access point used for years by agents to collect information about criminal suspects. Many in the FBI were stunned. Suddenly, photos, text messages, notes and dozens of other sources of information stored on phones were off-limits. 

But while the FBI was extremely unhappy about the change, Apple believed the government was on board. The reason? China had been demanding backdoor access to iPhones, and the White House strongly supported Apple in resisting these demands.

The lobbying worked and China backed off.  But Apple took away the wrong impression. The White House hadn’t reached any conclusion when it came to what encryption meant for the needs of U.S. law enforcement agencies, one former official said. 

The rest we know. In the wake of the San Bernardino shootings, Apple had been cooperating with the FBI in providing access to iCloud backups of the phone, and was left shocked when the agency secretly obtained a court order for access to the iPhone itself, and informed the press before it told Apple.

Timothy Edgar, the former director of privacy and civil liberties for the White House National Security Staff, said that the standoff comes down to one simple difference of opinion between lawyers and tech companies.

Lawyers think privacy is you can’t listen to my conversation without a warrant; technologists think privacy is you can’t listen to my conversation, period.

The next court hearing takes place tomorrow. This had originally been expected to be a purely legal argument, each side putting forward the reasons it believes the law is on its side, but the DOJ last week made a last-minute request for it to be changed to an evidentiary hearing. This means that each side will be able to put up witnesses to argue the broader case, rather than just arguing the legal case.

This rather brings to mind the old legal adage.

If the facts are against you, argue the law. If the law is against you, argue the facts.

The government seemingly believes the law is against it in this case.

The case won’t be decided tomorrow: whoever wins, the opposing side will appeal – likely all the way to the Supreme Court. Even if Apple loses there, it’s still no guarantee the FBI will get its way: it has been reported that Apple engineers may refuse to create the vulnerable version of iOS, perhaps even quitting their jobs.

Photo of Tim Cook: Time