views:

2820

answers:

6

I've developed on Windows and .NET for my whole career so forgive my ignorance on this one.

What would be the steps to setup an iPhone development environment from scratch?

Assume that I have nothing but electricity and an internet connection.

What hardware and software would I need?

I'm talking about the ideal environment here. If it can't be done on Windows that's fine.

Thanks.

+1  A: 

step 1. buy a mac

im sorry, this is wrong how?
It;s not wrong (BTW I'm not the down-voter). But it's unhelpful. It's extremely incomplete, and it also doesn't note that it needs to be an Intel Mac.
Airsource Ltd
no its cool, i thought it was funny
+36  A: 
  1. You have to have an Intel mac1 and an iPhone (or iPod Touch)
  2. You need to apply to the iPhone developer program to run your program on your iPhone. You just need to register on the site to download the SDK and run things in the simulator.
  3. Once accepted to the developer program or registered, download the iPhone SDK which includes XCode (the mac development environment). XCode comes on your OS install disks but it will be an old version and won't have the iPhone libraries.
  4. Learn objective C.
  5. Follow some iPhone specific tutorials or Stanford's online iPhone class.

<sarcasm> Read more in this Guardian article about how you can quit your job and make $20k a day from your iPhone app </sarcasm>

Footnotes: 1. http://stackoverflow.com/questions/37822/is-it-just-the-iphone-simulator-that-is-restricted-to-intel-only-macs

Michael Pryor
You don't need to 'apply' to get the SDK, just register on developer.apple.com. You only need to apply to the program when you want the keys to load code onto actual devices. If you can make do with the emulator you're good to go as soon as you have your Mac.
U62
Keep in mind that testing in the simulator isn't the same as testing code on the actual device. Things like how well your application does with registering touches and drags cannot be emulated very well. So make sure you test on the actual device before you go all out and deploy.
Redbeard 0x0A
Just be aware that the SDK *only* works on Macs with Intel processors. Anyone hoping to repurpose an older G[345] Mac for iPhone development is out of luck.
Ben Blank
I actually developed an iPhone app with only a G4, got it approved in the store and everything. But it wasn't easy and I invested in a Core 2 Duo since then. There are some references here:http://stackoverflow.com/questions/37822/is-it-just-the-iphone-simulator-that-is-restricted-to-intel-only-macs
Chris Lundie
The copy of XCode on the Install CDs is rather out of date - you can get a much more recent version from Apples developer website (connect.apple.com)
revs
You don't need to install Xcode and the iPhone SDK separately. The iPhone SDK includes Xcode.
Chris Hanson
+6  A: 

What michaelpryor said, plus get a good book. I found it impossible to approach iphone programming without one. The one I used was from the Pragmatic Programmers.

By the way, if you want to cut costs, a mac mini or entry level macbook is fine for development. Get it with the minimum amount of memory and upgrade it to at least 2G memory yourself, as this is significantly cheaper than apple memory prices. With either one you should be able to reuse your existing screen, keyboard, mouse, usb disks, etc.

If you're going the mac mini route, you may want to hold off until the new models are in store, as rumours are they are going to announce a significant upgrade this week.

Oh and you don't need to download XCode, it comes on the install disks. Just download the SDK.

Last but not least, it may be stating the obvious, but you need an iphone device to test on. You can use the simulator in the SDK, but you still need to try it on a device. You can also use 'ad hoc distribution' to have friends with devices try your app out.

Good luck.

frankodwyer
+2  A: 

I've been playing around for the last couple of months, so from recent experience...

You need a Mac, an iPhone or iPod touch, and an enrolment on Apple's development program.

The Mac is going to cost - cheapest approach would be a Mac Mini - and has to be an Intel one if you're thinking of second hand. Ditto the iPhone or iPod touch are investment - and the device has to be tethered to the Mac and designated a development device so there may be some risk with using an iPhone with a subscription (I chickened and brought a touch for development)

XCode - the development environment and the iPhone SDK are a free download. The documentation is excellent and there's lot of examples. Even the video tutorials are pretty good for a high level overview.

I'm really starting to like Objective C. Having a substantial C background in the past, but never having really made it past basic journeyman with C++, its thin wrapper approach over C looks weird at first, but appreciation really grows with use. If you know C then it's little more than the usual 'pick up a new language/SDK' challenge. If you don't know C or at not comfortable with the use of pointers, memory allocation and so forth then it could be a substantial learning curve and overshadow any hardware investment.

Cruachan
+1  A: 

Just a sidenote regarding the "need a Mac" point. I've just bought one for unrelated development work and tried to fetch the iPhone SDK out of curiosity. No luck: all I've got is Tiger (OS X 10.4) on a PPC Mac while Apple says I need 10.5.5 on Intel for the version currently dowloadable.

djn
Yes, you do need OS X 10.5 AND an Intel-based mac. If you search around however, you can hack the iPhone SDK to work on a PPC-based mac. But Intel is the only one that will work out of the box.
Chris Smith
+4  A: 

One thing people keep leaving out: If you buy a used Mac, make sure it's an Intel Mac, not PPC. The iPhone SDK doesn't officially run on PPC hardware.

Shawn Craver