7 ms·
How to become an iPhone developer in eight easy steps
- gaius 18y agoI love that step 3 learn objective-c is supposedly no more difficult than step 2 download the SDK.
- tlrobinson 18y agoWell, the SDK is 1.75GB... so if you're on dialup or something it is pretty difficult. Why it's so big, I have no idea. A few months ago it was only 1.25GB. Maybe they're including complete copies of the iPhone OS.
- wallflower 18y ago"4. Start writing something! Forget theory; forget mastering Objective C with your first attempt. Just set yourself a project and start working." A couple days ago I stopped slogging through Kochan's Objective C book (made it to Chapter 7) and started coding. I think I was kidding myself that I could learn by reading - I think it was an indirect form of procrastination. For example, how will you ever learn that you need to use NSMutableString instead of NSString if you want to modify Strings?
- gcheong 18y agoI tend to go back and forth with this. I read the entire book but stopped doing the exercises at some point and focused on the project I wanted to do. I think it's good to have an overview so when you do run into some problem it may trigger your memory about something you read so you can easily find the documentation you need, but nothing really replaces coding.
- jemmons 18y agoUmmm... Look "mutable" up in a dictionary?
- zack 18y agoYou got downmoded because in many languages, Strings are mutable by default.
- nonrecursive 18y agoI downmodded you because your response is snarky in addition to not being applicable. If you're new to Objective C and are used to a language like Ruby, where all strings are mutable, you wouldn't even realize it was necessary to use a class other than NSString to modify your strings.
- jemmons 18y agoIf you're expecting a different language, framework, and platform to behave like a ruby, I would argue no amount of eschewing documentation and getting down to coding will help you. In fact, I suggest documentation to be even more vital to you in this instance. As to my snark, I'm only faithfully transcribing how I figured out I was supposed to use an NSMutableString instead of an NSString. I was reading the documentation for NSString (and this was back in the NeXTStep days, so it was crap. Thanks Scott for making it a joy!) but I came across a line very similar to what's there now: "The mutable subclass of NSString is NSMutableString." "What on earth to they mean by mutable?" I thought. So I looked it up. And that's when it all made sense. Note that it is highly unlikely I would have figured this out by coding alone. Sifting object dumps of NSString or whatever would not have helped (unless I noticed -mutableCopy and was able to suss out what the NSMutableCopying protocol was all about) -- esp. coming from C where the expectation is there are no string conveniences and you have to roll it all yourself. Point being, its idiotic to say "Forget theory; ... Just set yourself a project and start working." Cocoa and, perhaps to an even greater extent, Cocoa Touch are hyper-complex frameworks that are made simple and understandable through the theory behind them. If you never learn the method to the madness -- all the patterns and best-practices behind Cocoa and why they're there -- all you will see is madness. You have very little hope of grokking iPhone development by "just doing it".
- wallflower 18y ago> If you're expecting a different language, framework, and platform to behave like a ruby, I would argue no amount of eschewing documentation and getting down to coding will help you. I actually learned this lesson the hard way in the past week and basically consult the iPhone SDK and Objective-C documentation constantly. Thanks. For example, looking at NSViewController's documentation for loadView, pointed out the fact that you should override this method if you want to do any intialization (like initialize instances of custom classes you need to handle controller interaction). And yes - I did spend some time looking without results at NSString object dumps before stumbling on the NSMutableString tip via google (and it would have been much faster to have read the NSString documentation)
- Zev 18y agoIt helps if you're familiar with the terminology Apple uses in ObjC. But that's the sort of thing that you pick up as you go along, not know from the very beginning.
- nonrecursive 18y agoI first tried to learn mac development a year ago by going through http://www.amazon.com/Cocoa-Programming-Mac-OS-3rd/dp/0321503619 http://www.amazon.com/Cocoa-Programming-Mac-OS-3rd/dp/032150... . I did the examples in the book, so I was getting my hands dirty somewhat, but as I went through the book I got more and more confused. There were too many questions I had that the book didn't answer, nor did Apple's online documentation. Part of the problem was that I didn't know C at all. Recently I decided to have another go at it, so I read the first chapter of K&R and did all the exercises, then read a few of the other chapters (2, 5, and 6 I believe). After that, I read this book: http://www.apress.com/book/view/1430218150 http://www.apress.com/book/view/1430218150 . "Learn Objective-C on the Mac" has been great - it's readable, good-humored, succinct, and comprehensive. It's answered all the remaining questions I still had about ObjC and I finally feel like I get the language.
- jemmons 18y agoI can top that! How to write an iPhone app in ONE easy step: 1. Write an iPhone app.
- albertcardona 18y agoReminds me of Matt Maroon's programming language: "clone eBay".
- patio11 18y agoBah, I knew that guy on RentACoder was overcharging. $100 for one line of code! Outrageous.
- chengmi 18y agoHa! Generating a provisioning profile is more than eight steps(!) in itself.
- pxlpshr 18y agoHere's another side of the story from someone who jumped on board the AppStore this summer. http://appcubby.com/blog/files/the_experiment.html http://appcubby.com/blog/files/the_experiment.html Less kool-aid, more reality.
- hboon 18y agoSeveral typos in the article and with a CTO quoted as saying things like "Smalltalk is very similar to C", My alarm rings. The 8 steps are not wrong, although simplistic. Most importantly, I would reorder the list and move point 5 "Sign-up as an official developer" to the very top. Sign up, pay the money and finish the procedure for tax-withholding, if applicable. Do that from Day ONE. It looks like it takes Apple to finish the contract paperwork in days for some developers, but up to months for others. It took me 3 months, with no ETA, with 2 applications approved and me sitting there like a lame, frustrated duck.
- tlrobinson 18y agoI'm guessing he meant "Smalltalk is very similar to Objective-C" and he either mispoke or was misquoted. He certainly knows that Objective-C was influenced by Smalltalk.
- tocomment 18y agoRegarding the learn Objective C part, can anyone reccomend some good tutorials on memory management? I still need some rules to follow regarding what to release, what not to, how to release it, and when. Is there a simple model I could keep in my head while programming so it all makes sense to me?
- yan 18y agoThis document helped me out a bit: http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/MemoryMgmt.html http://developer.apple.com/documentation/Cocoa/Conceptual/Me... Also, this has a few rules you can follow: http://www.stepwise.com/Articles/Technical/2001-03-11.01.html http://www.stepwise.com/Articles/Technical/2001-03-11.01.htm... Just remember that adding elements to containers bumps their retain counts. So the following is a common pattern for me: MyClass *c = [[MyClass alloc] init]; [arr addObject:c]; [c release]; If you're returning an object from a method, you probably want to autorelease it.
- hboon 18y agoA. It uses reference counting. -retain (+1 now), -release (-1 now), -autorelease (-1 later). B. Creation/allocation is +1, thus: +alloc (+1), -copy (+1). C. Your goal is to keep the count balanced at 0. If you do a +1, make sure you do a -1 either now (-release) or later (-autorelease). (C) is the guiding principle, thus in this order: 1. If you +alloc/-copy something in a function and is done with it, make sure you have a corresponding -release. 2. If you +alloc/-copy something in a function and return it, -autorelease before you return, so that counts are 0 (in the end anyway). 3. If you didn't +alloc/-copy an object, (1) and (2) don't apply. E.g. NSMutableString's +string. 4. If you -retain, make sure you -release or -autorelease to pair it up. (remember balanced to 0). 5. If you get an object from calling another function, you shouldn't -release/-autorelease it because someone else or you should have done (2). But don't forget (4). The rest is about memory management in accessors and IB outlets. PS: I give up on formatting this. Hope it's readable.
- wallflower 18y agoFellow aspiring dev sent me this link on Monday: http://www.mobileorchard.com/iphone-memory-management/ http://www.mobileorchard.com/iphone-memory-management/
- jgfoot 18y agoI'd like to see a breakdown of how many apps never make the $100 back for the developer (or $100+ if you bought a Mac just to write iPhone apps).
- wallflower 18y agoI'm really not sure why we should always focus on the monetary value of taking on a hobby. Por ejemplo, I have spent thousands over the past two years on Salsa classes/lessons/DVDs/cover charges/one-beer-for-courage-drinks. Is it worth it? Perhaps. I'll never be the best - but being above average is sometimes achievable. A few pretty good dancers ask me to dance now. Just being able to bang my head on Objective-C after a day with Flex or something worse (requirements meetings) is worth it. It is something different. Yes, there is the undeniable Gold Rush mentality, and my expectations for selling an app will be realistic (e.g. sell it to someone you don't know/are related to). It's about entertaining yourself intellectually.
- jgfoot 18y agoI completely agree, but I will be more entertained intellectually by more noble programming pursuits, such as continuing to study Haskell or assisting on an open source project. The only reason for me to turn my back on my Linux desktop, buy a Mac, and devote my energy to writing for a ridiculously closed platform would be to make money. If am going to sell my soul, I want to know what the price is upfront.
- sqs 18y agoiPhone app development is not, as many people make it out to be, the Gold Rush. It's very easy to make a small amount of money ($10 a day), but making $150 a day on the App Store is not any easier than making $150 a day doing anything else (for somebody with the same skill level). And yes, there are people making $21,000 a day, but those people exist in every business. We only hear about the people striking it rich on the App Store because everything Apple-related gets tons of attention. I'm a bit torn, actually. I'm making good money on the App Store with 4-5 apps, but I don't learn much making iPhone apps compared to doing other kinds of programming. So, I'm making a significant trade-off. (That said, I'm open to doing iPhone contract development, so contact me if you're interested.)
- deleted 18y ago[deleted]
- breck 18y agoiShoot made $22k a day! Wow, I remember that game when it came out 10+ years ago (it was called Scorched Earth back then). Time to go make a PacMan iPhone app.
- jackowayed 18y agoSpecialist development hardware? None of it is necessary 1. Buy a Mac It may not be specialized to development, but it still is something special you have to buy. And it pushes your lower bound for computer price up by a lot.