Free tutorial, The iOS Apprentice: Getting Started
It’s been a while since I wrote for this blog but I had a good excuse: I’ve been working hard on my first ebook, The iOS Apprentice: iPhone and iPad Programming for Beginners.
I get a fair amount of email from beginning programmers and they usually ask the same questions. They’ve read a book or tutorial about the basics but now they’re stuck. It’s easy enough to create a simple screen with a few buttons, to show a list of items in a table view, to use the photo picker, to download something from the internet… but how do you fit all of that together? These are also the questions I keep seeing on forums and message boards. So I decided to write an ebook with the answers.
This ebook contains five epic-length tutorials, each of which takes you from scratch to a complete, fully-functional iPhone or iPad app, with step-by-step instructions and a ton of illustrations. There’s a big difference between building a simple sample project that focuses just on a single topic, and creating a real app that has many different features — the kind of app that you actually see in the App Store. The iOS Apprentice shows you how to do the latter.
This is what Bull’s Eye looks like, the game from the first chapter:
You can see this game in action for yourself because as of today the first chapter of the ebook is available for free!
If you’re thinking of getting started with iOS development but you have no idea where to start, then get this ebook! No knowledge of programming is assumed, so if you’ve never written a line of code before in your life, you’re in good hands.
It is my aim that by the end of these 5 tutorials you’ll be ready to turn your own ideas into real apps. This isn’t some 20-page fluff ebook, but over 500 pages and more than 500 illustrations of hands-on practical advice.
I’m currently writing the final chapters. I expect the ebook to be done by the time iOS 5.0 comes out (early fall). Of course, the tutorials make good use of the new features from iOS 5 such as Automatic Reference Counting and Storyboards.
If this sounds like something you’d be interested in, then here’s how you can get the entire first chapter for free right now:
Go to www.raywenderlich.com and sign up for Ray’s Monthly Newsletter. Ray has an excellent site with many free iOS development tutorials, and he has agreed to sell The iOS Apprentice from his website, which makes me very happy.
After signing up for his newsletter — which is a very useful resource in its own right! — you’ll receive the download link for the first chapter (23 MB).
Enjoy the free chapter and let me know how you’re getting on! In the mean time, I have a few more pages to write…

Sounds like an awesome book, I look forward to seeing the first chapter! Thanks!
Keep up the good work.
ive been working through the first chapter and it’s amazingly awesome. It’s explained the basics very very well. I’ve read several other books and I’ve never quite grasped the info.
I’m looking forward to the book, if the rest of it is as well done as this chapter my skills will jump leaps and bounds more.
Thanks!
Great so far. Just a minor typo I thought I’d bring to your attention. Under “Alternative ways to calculate the difference” you have:
“If you took math in school,….
int difference = abs(target – currentValue);”
instead of:
int difference = abs(targetValue – currentValue);
Also is there a reason you don’t just call
[self updateLabels];
within the startNewRound method? Seems whenever you call it, it is following [self startNewRound]
Thanks for the feedback, Kyle. I’ll fix the typo.
You’re right that I could have called updateLabels from within startNewRound. The reason I didn’t is that I like to keep “model” code separate from “view” code. There’s more about the distinction between models and views in the second chapter, but the idea is that startNewRound just sets up the variables correctly and updateLabels just updates the screen. I find it cleaner to keep those concerns separated, but ultimately it doesn’t really matter and what you propose works just as well.
Heyy, how long till the rest of the book is released???
@chori: Because the ebook talks a lot about iOS 5, it’ll have to wait until iOS 5 is released. But I’m glad you can’t wait.
I have just finished chapter one and I love it. It was so clear and easy to follow where you were going. I liked the fact that after you have taught it the first time you push us to try it on our own for the subsequent times.
I do have one question/issue. After I added background images to the slider, and then launch the app, both the left slider and right slider images display immediately, but the target image for the slider button does not display in my simulator until I click on it to drag it.
Do you have any ideas as to what I should change or look into? Thanks for any advice/direction you can give.
@Jonathan Thanks! I’m not sure why the slider button wouldn’t work right away. Maybe you can compare your version of the source with the code from the Source-Pretty folder and see if there are any differences. Also, what happens if you try to run that project?
Thank you for your quick response. Great idea to see if the Source-Pretty version is working properly. I did a build and run on the Source-Pretty version and it worked perfectly. Then I started comparing source.
Since it had to do with displaying the slider graphics and we did that all in code, I knew the the problem had to be in the area of the [self.slider] code in BullsEyeViewController.m in the viewDidLoad method.
What I found was that I had left out the call to stretchableImageWithLeftCapWidth: topCapHeight.
So I had:
UIImage *trackLeftImage = [UIImage imageNamed:@"SliderTrackLeft"];
I should have had:
UIImage *trackLeftImage = [[UIImage imageNamed:@"SliderTrackLeft"] stretchableImageWithLeftCapWidth:14 topCapHeight:0];
Completely my fault, you have it right in the source and in the tutorial. Thanks for reminding me that you gave the source.
Thanks for the reply, but iPhone V5 is aages away!
I went through tutorial last week and it was amazing. But i’m already staring to forget it
Any tips you can give to keep it fresh in my mind?
Like any more tutorials? or just keep doing it again and again?
Thanks for the great tutorial. This is going to change my (coding) life!
A couple things:
1) The tutorial did not mention this, but were we supposed to declare the following in the .h file?
- (void)startNewRound;
- (void)updateLabels;
- (void)startNewGame;
Without these in the .h file, I get the following error:
Automatic Reference Counting Issue: Receiver type ‘BullsEyeViewController’ for instance message does not declare a method with selector ‘startNewRound’
2) I think this line:
@interface BullsEyeViewController : UIViewController {
should read:
@interface BullsEyeViewController : UIViewController
3) Please keep making these awesome tutorials! I’m a bit stuck with a “SIGBART” error but I can’t wait to get through the rest of the tutorial.
Hi jed,
Cool, I’m glad you like it.
1) You could declare those methods in the .h file, but if you put them in the .m file where the tutorial told you to put them then there should be no compiler warnings. My guess is that you placed those methods *below* the point in the file where they are called.
2) You’ll have to give me a little more context than that. Where in the tutorial does it say that?
3) A SIGABRT error means that the system frameworks caught you doing something you weren’t supposed to. Often that means you forgot to hook something up in Interface Builder. You should see a message in the Debug pane that tells you what went wrong. If you don’t, then type “po $eax” after the (gdb) prompt when the app crashes (without the double quotes).
Let me know how it goes!
Hi Matthijs, Awesome tutorial. I’ve been playing with Xcode and objc for years but never got past the first hurdles. i.e. of actually understanding the processes. I always come back for more like a sucker for punishment. This time, after finding your tutorial it has opened up a new world for me, and I finally feel like I’m now standing on my own two feet. (Or coding with my own two hands!). Now I’m hungry for more. Can you tell me, does your book contain tutorial 2 and 3 that are for sale on the raywenderlich site? If so would I be best off just buying the book?
Many Thanks.
Hi Hoppo, it’s good to see my tutorial is helping you get a grip on Objective-C. I’m sorry if it wasn’t clear, but I decided to split up the book into separate parts. So it is no longer “the book” but “the series”. What you see at raywenderlich.com is what you get.
Hey, is there still going to be five tutorials, or is it now just the three that are already complete and on raywenderlich.com?
There will be one more tutorial and I’m working on it as we speak.
So 4 parts total. My original planning was 5 parts but as it turned out I could fit all the material into 4 (longer) parts instead.
Cool! If i purchase the series now will the 4th tutorial come included as a later download or will it be a standalone product purchased seperately?
The current bundle does not include part 4 but the new bundle will, but it will also be more expensive.
Anyone who has bought the 1-3 bundle can get part 4 for a few bucks less, so it is an upgrade but you don’t end up paying anything more than anyone buying the 1-4 bundle. The final price still has to be determined, though.
I finished the first tutorial (great!) and am in the second. When I created the CheckListItem.h file Xcode didn’t include the initialization code that you show in the tutorial:
– (id)init
{
self = [super init];
if (self) {
// Initialization code here.
}
return self;
}
The program seems to run fine without it. I also manually put it in, and the program still runs okay.
Was there some change that now means it is no longer required? Should it be manually added if Xcode doesn’t put it in?
Hi Ken,
Apparently the Xcode templates have changed slightly since I wrote the tutorial. Previously Xcode would insert that init method for you but now it no longer does.
If you decipher that method you’ll notice that it doesn’t actually do anything. It calls [super init] and then returns self. If you leave this whole method out, then the compiler automatically does the exact same thing. So it’s no big deal if this method is present or not because in that form it doesn’t actually do anything.
Matthijs,
Thanks — I was wondering if not calling [super init] mattered, but you have made it clear that it doesn’t in this circumstance. That’s one more thing I’ve learned from this process. Now to keep on learning…
Matthijs,
I bought the series the tutorials are excellent and highly recommended, can you do a tutorial on how to edit a UItableView using the insertion controller rather than a separate add button?
Thanks
Thanks, Anmar. If you understand the basics of how a UITableView works, then the Apple documentation should be all you need.
See here: http://bit.ly/wMhwQI
Thanks for this awesome tutorial.