From Wired: (Talking about development of the iPhone)
Jobs wouldn't wait for the finer points of the deal to be worked out. Around Thanksgiving of 2005, eight months before a final agreement was signed, he instructed his engineers to work full-speed on the project. And if the negotiations with Cingular were hairy, they were simple compared with the engineering and design challenges Apple faced. For starters, there was the question of what operating system to use. Since 2002, when the idea for an Apple phone was first hatched, mobile chips had grown more capable and could theoretically now support some version of the famous Macintosh OS. But it would need to be radically stripped down and rewritten; an iPhone OS should be only a few hundred megabytes, roughly a 10th the size of OS X.
Before they could start designing the iPhone, Jobs and his top executives had to decide how to solve this problem. Engineers looked carefully at Linux, which had already been rewritten for use on mobile phones, but Jobs refused to use someone else's software. They built a prototype of a phone, embedded on an iPod, that used the clickwheel as a dialer, but it could only select and dial numbers — not surf the Net. So, in early 2006, just as Apple engineers were finishing their yearlong effort to revise OS X to work with Intel chips, Apple began the process of rewriting OS X again for the iPhone.
He could have just used Linux and saved himself a lot of effort and expense. There are a number of Linux-based wireless devices VERY similar in functionality and "look and feel" available around the world, all for much less $$$ than the iPhone.