First of all, if Apple doesn't release an SDK for the iPhone version of OS X, it'll be the first major PDA/smart phone manufacturer not to do so. Every version of Palm OS and Windows CE/Handheld/whatever they call it now has supported third-party applications. I don't know why everyone is talking about the POSSIBILITY that the iPhone will too... I think it's a pretty damn obvious. Apple will make major profit certifying applications (in Microsoft fashion) and hardware to run on the OS, just as they did with the thousands of iPod accessories out there.
In fact, they will probably start seeding an early SDK and even actual devices to major developers (Belkin, yes Adobe/Macromedia, etc.) in the next few months so that there will be products available in conjunction with the June release. As far as trade secrets go, ever heard of a NDA? And yes, only trusted developers will get this information that far in advance... I don't think they intended to send PalmOne, Motorola, and Nokia all their trade secrets. They'll probably negotiate a deal with Microsoft, who may want to release Office reader apps or even an iPhone version of Office (as they did with Windows CE). The deal would of course contractually prevent Microsoft from copying the iPhone features... remember "Pirates of Silicon Valley"?
Lastly, the phone will obviously (unless it's REALLY revolutionary) not have a built-in compiler... someone may eventually get GCC to install, but that's doubtful. With the amount of RAM, the solid-state speed, and the processor speed the device will most likely have, I highly doubt it'll be able to handle compiling any high level languages. At best, you'll write the code on the iPhone and have it compiled on a remote server that does have the power. That could be done... and a basic SSH application could probably be written in a few hours, especially with Cocoa.