Test-Driven iOS Programming
Test-Driven iOS Programming
From Dinosaur to Modern iOS Developer, Swiftly
About the Book
Test-Driven iOS Programming has grown out of my own frustration trying to learn how to develop an iPad/iPhone app. There is no shortage of material covering every aspect of iOS programming, but I haven't found anything yet that seemed to allow me to learn efficiently. This guide aims to be the resource that would have helped me get into iOS development quickly. I would characterize that background as someone who
- has done quite a lot of programming, including some C
- has done some object-oriented programming (mostly in Python, but I don't think the lanuage matters too much)
- is a believer in (non-dogmatic) test-driven development
- prefers to write code in a text editor (specifically Emacs, but it could as easily have been vi, or anything else)
- has tended to avoid GUI programming to date (but realises this is a hurdle that needs to be overcome).
The closer you are to this sort of (dinosaur) profile, the more helpful I think this guide is likely to be, though the only specific that matters is that you have some experience of C, even if it's old. Over the last month or so, I have finally started making progress developing a real application under iOS after two or three previous unsuccessful attempts. The previous attempts were based on (1) working through Apple documents and online material and (2) working through Matt Neuberg's iOS 4 and iOS 5 books. The problem with both of those, for me, was that they were really slow and kept me out of my confort zone from the very beginning. My more successful approach has been as follows:
- Choose a real application to build.
- Start with the algorithmic parts of it (i.e., not the GUI)
- Write the core of the program first in a language you already know, including developing tests.
- Translate, pretty-much class-by-class, method-by-method, function-by-function and test-by-test, the same code into Objective-C in XCode.
- If the application will use graphics (drawing, as opposed to just a GUI) generate the core graphical content (not GUI elements, but actual drawing) in a familiar language (again, Python in my case).
- Translate that graphics code to Objective-C too (probably still just generating file-based output at this stage).
- Only once quite a lot is working, start actually building the GUI. By the time, you will have learnt enough about XCode, Objective C and the Foundation libraries that in order to do the GUI stuff you really need to learn onlythe GUI stuff---assembling user interfaces, drawing on canvases and intercepting touch events, and you have a solid body of working code to use to generate the content.
Of course, you will need lots of other reference material, but I'll try to explain how and where to get this as we go along. You might well still want to have one or more of the big iOS development books around for reference and digging into topics, but as long as you have an internet connection, you should be able to get a long way even without those.
The Leanpub 60 Day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.
You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!
So, there's no reason not to click the Add to Cart button, is there?
See full terms...
Earn $8 on a $10 Purchase, and $16 on a $20 Purchase
We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
In fact, authors have earnedover $13 millionwriting, publishing and selling on Leanpub.
Learn more about writing on Leanpub
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them