When Steve Jobs decided that Apple should go ahead and build its own branded smartphone, he entrusted his trusty lieutenant Scott Forstall to assemble a team of Apple’s best and most ambitious engineers to develop what would ultimately be known as iOS. That Jobs was quick to give Forstall so much responsibility wasn’t much of a surprise. Throughout the early-mid 2000s, Forstall played an increasingly important role in spearheading successive versions of OS X. What’s more, Forstall already had a strong working relationship with Jobs stemming from their time together at NeXT.

Jobs famously gave Forstall a lot of leeway to develop Apple’s iPhone team as he saw fit. Indeed, the only constraint Jobs gave Forstall was that he couldn’t hire anyone from outside the company. In typical Apple fashion, development on the iPhone was to be kept a closely guarded secret.

During Apple’s 2012 patent lawsuit with Samsung, a deposition of Forstall revealed all sorts of interesting details about how Apple developed the iPhone under lock and key. One of the more interesting aspects of how the iPhone came to be is that Forstall didn’t even tell prospective team members what they’d be working on. Instead, Forstall explained to engineers that Apple was working on an incredible new product and that if they were willing to join the team, they would have to “work hard, give up nights, and work weekends for years.”

Forstall also divulged that the secretive iPhone project was internally known as “Project Purple”, and work done on the project was conducted under heavy security.

As Forstall explained a few years back: “The [Project Purple] team took one of Apple’s Cupertino buildings and locked it down. It started with a single floor with badge readers and cameras. In some cases, even workers on the team would have to show their badges five or six times.”

Adding even more detail to an already intriguing story, former Apple engineer Terry Lambert recently took to Quora where he described his experience working on the original iPhone team. Lambert says that he came to the iPhone team late during the development process as a kernel debugger, but his experience on the uber-secretive iOS team is nonetheless fascinating.

So I got taken into areas where there were black cloths everywhere… I only got to see the machine doing the remote debugging, not the target — but it was obviously an ARM based system. … When you finally got read in, you signed an NDA that let you see the NDA that had the code name on it. You couldn’t see the code name, until you agreed not to discuss the code name. … After the read in, you got access to the “secret lab”. That’s a lab inside the main lab. You may have access to the regular lab, but not the “secret lab”. You didn’t really get to see the form factor, because when you are doing the initial work, it’s all prototypes on plexiglass.

Lambert also details how Apple will sometimes assign groups working on the same project different code names. In turn, two engineers might be working on the exact same mysterious project and assume that they’re actually working on two separate things.

His full answer can be read on Quora. For anyone with even a passing interest in Apple history, it’s a captivating peek behind Apple’s notoriously closed-off curtains.

Lastly, Apple’s 2012 lawsuit with Samsung revealed all sorts of previously unknown details about the iPhone’s early days, including the iOS feature Steve Jobs cared about the most and a fascinating look at original iPhone prototypes that were never released. We compiled some of the best unearthed secrets from that trial over here.