Get Updates By E-mail 

3g

Answers For Aspiring iPhone Developers On Twitter

  •  
  •  
  •  
  •  
  •  

As some of you probably know I have a twitter account where I generally twitter about iPhone Development stuff.  I’ve also thrown out answers to aspiring iPhone asking questions about iPhone development, and I’ve been asked some myself.  Many of the same questions come up repeatedly, and some can’t really be answerd in 140 chars.  so I’ve decided to create this page. 

Just off the top of the head I’ve listed 10 questions along with my answers.  If there’s a question you feel should be on here, or you think something could be answered better feel free to comment about it or tweet me about it. 

Mini-FAQ for Aspiring iPhone Developers on Twitter

1. How much does it cost to be an iPhone developer?

Absolutely nothing, just go here, register an Apple ID if you don’t have one, sign in and click where it says to download the iPhone SDK.  You will have to pay at least $99 to put the app you create onto an iPhone/iPod  Touch.

2. Can I use the iPhone SDK/Develop in windows?

Simply answer no.  Long answer: There may be ways to develop on a jailbroken iPhone using a Windows PC, but you will need to have a computer running Mac OS X at some point.  Legally that will require a Mac.

3. Why doesn’t Apple let you use Windows to develop for the iPhone, wouldn’t that get them more apps?

Apple seems to be having even more App submissions than they can handle, and since the iPhone was released Mac OS X usage has more than tripled.  I doubt they’re even thinking about it at all.

4. Can I develop for the iPhone in a virtual machine?

Apparently it goes against the OS X Eula to run OS X in a Virtual Machine.  I’ve seen it tried, and honestly it ran like crap. 

5. Can I run my apps on a jailbroken iPhone without paying the $99?

I have really no idea.  How serious could you be about app development if you don’t want to pay the $99.

6. I really can’t pay the $99 or I don’t have an iPhone… how can I still develop?

The iPhone SDK comes with a simulator that you can (theoretically) use to test apps.  Be aware this is not exactly like running an app on the iPhone, and many features can not be tested.  You certainly would want to test an app on an actual iPhone before trying to distribute it anywhere.

7. What language do you need to use for iPhone programming?

Many components will require you to use the Obj-C messaging syntax.  You can use C, C++, and Objective-C with the SDK without having to use anything outside of what Apple provides, and there are commercial and free  products out there allowing you to use Ruby, C#, Lua, Javascript, and probably a dozen other languages.  For games (which is what most people are really asking about) you can design nearly the entire game in C/C++ using virtually no Objective-C at all.

8. What books should I read?

Check out this post here. If you’re an absolute newbie to Mac/iPhone programming C is the place to start, and Programming in Objective-C 2.0 seems to be the consensus choice for absolute newbies.  Beginning iPhone Development is the consensus "best book" at the present time for iPhone development.

9. How long will it take to learn iPhone development?

That’s a bad question, and honestly if you’re asking that question as a newbie iPhone development might not be your thing.  Coming from Windows/Non-Objective-C programming might take a week or two for the basics.   No one can really say how long it will take.

10. I have a great app idea, anyone want to develop it for me?

Sure, if you’re willing to pay or maybe if you’re an internet celebrity like iJustine or Chris Pirillo and will let me plaster my name all over the app.

That’s it, feel free to tweet this page if a buddy starts asking about iPhone development.
 


  •  
  •  
  •  
  •  
  •  

Building Your iPhone App’s Interface Quickly

  •  
  •  
  •  
  •  
  •  

Hi everybody, this is the fourth installment of my series Your First Apple iPhone App Store App Step-By-Step tutorial series.  This is a 2-part lesson on building your App’s interface in Xcode’s interface builder.

Here is the video:

In this installment I create a basic project, and explain a little bit about interface builder.  I also present a small exercise at the end where I ask you to place the interface elements onto the view, and as promised I have placed the project that I created where I laid out the elements here:
>>> Download Soundboard Project With Basic Interface <<<

Please do not download the Soundboard project unless you were having trouble laying out the elements yourself, or you already understand how to do this, and don’t want to spend the time.  

This will be fairly easy for many of you, we will be getting into code soon, I promise!

Here are the action steps that I took in the video.

1) Create a new project, select iPhone application, and choose a View-Based Application (I will assume you gave it the name Soundboard)
2) Open The SoundboardViewController
3) Set Identity Inspector To List Mode
3) Remove the fake status bar at the top of the soundboard

Exercises:
1. Take components from Library, place them in View (UINavigationBar, 2xUIButtons, UITextView, & UILabel)
Optional:
1. Run Apple’s UICatalog example and learn names of common UI elements.

In the next video in this series you will look over my shoulder, design the interface, the class skeleton for our view app complete with attributes and methods, and do it in less than 5 minutes.

The first lesson in this series can be found here Your First Apple iPhone App Store App Step-By-Step Part 1


  •  
  •  
  •  
  •  
  •  

Source Code: Particle Based Explosions In iPhone OpenGL ES

  •  
  •  
  •  
  •  
  •  

Hi everybody, if you’ve been following me on twitter you may have seen my tweet about an open sourced iPhone version of Space Invaders

If you haven’t seen it yet, it’s a very concise implementation of the classic game, and also a very basic implementation, but I noticed something pretty cool while playing with it, and that was the particle based explosions. So what I did was spend about 3 minutes playing with the code, and I came up with the demo shown here in this video.

To create these explosions a Particle Emitter created by the guys at 71 Squared (makers of some great iPhone game development tutorials) along with a custom texture class. 

To create the explosions a Particle Emitter is first created and initialized using the initParticleWithEmitter class, where you can specify parameters for the color, duration, size, number of particles, and gravity of the resulting display of particles (an example of this is in the EaglView.m file).

To display the particles a time index is created, and the update: method is executed along with the renderparticles method.  I won’t go into the details here as the ParticleEmitter classes are extremely well documented.

Download the source code for the explosion generator here:
>>> Explosion Generator Source <<<

Have fun with the code.

 


  •  
  •  
  •  
  •  
  •  

16 Killer iPhone OpenGL ES Resources

  •  
  •  
  •  
  •  
  •  

Here’s my updated list of OpenGL ES resources, this list includes tutorials, engines, blogs, and books.  I have updated it to include a couple of OpenGL ES 2.0 resources, and many other OpenGL ES 1.x resources that others have shared with me.

I have created a new version of this list at: 18 OpenGL ES Resources That You Must Know!

Math Resources

If you don’t have a basic understanding of 2D and 3D math for computer graphics your head will probably explode once you try learning OpenGL.  To prevent that from happening you should at least understand the terminology, and the reasons why this math is needed.  No need to grind through math problems like in college.. that’s what computers are for.

1. The Black Art of 3D Game Programming Chapter 10 This is a great introduction to graphics math, and pretty much crams 3 college courses I took into this chapter.  The whole book can be found here for free.  It is an old book, but the math still holds true.

2. Vector & Matrix Math Tutorial If you feel that everything in the resource above is flying above your head then you probably will want to take a look at this.  I normally wouldn’t reccomend a resource that brags about being "book sized", but it is very good.

iPhone Specific Resources

3. iPhone OpenGL ES Tutorial Series I don’t know if Maurice SImon is the smartest person alive, but this is the smartest set of OpenGL ES tutorials I’ve seen.  A terrific resource.

4.  Jeff LaMarche’s iPhone Blog Blog from one of the authors of the excellent Beginning iPhone Development book with many articles on OpenGL ES, and an ongoing OpenGL ES from The Ground Up series.

5. SIO2 Engine this is an excellent Open Source 3D OpenGL ES engine, look at the code, understand, and maybe even use the engine rather than write your own from the ground up (nothing wrong with that).

6. Oolong Engine An Open source 3D OpenGL ES Game Engine for Iphone, MIT licensed. Written by Wolfgang Engel former Rockstar Games programmer, and author of some intense DirectX books.  Great to see the libraries in here for handling memory, loading 3d models, and performing math.

7. Cocos2D Iphone This is an excellent Open Source 2D OpenGL ES Game Framework for iPhone you can learn alot from going in and looking around the code.  As far as Open Source frameworks go this extremely easy to use, well documented, and has an active community.

8. SDL for iPhone (SDL Version 1.3) The SDL library has been a popular open source library for probably over a decade, and has been used in many games. This is the iPhone port, and a great resource.

Non iPhone Resources

If you use these resources you’ll need to put in some time to get things running on the iPhone, but they are still excellent.

10. Nehe Tutorials Converted To OpenGL ES Michael Gorchak creator of the GluES library has put together this collection of tutorials converted from their original Nehe form.  In case you haven’t heard of them the Nehe tutorials were the definitive free tutorials for learning OpenGL.  Michael has done an excellent job of writing comments for these tutorials.

11. Khronos OpenGL ES Page This is the OpenGL ES "homepage" on which you will find the reference manual, and lots of examples.  Not specifically IPhone, but there are some great examples here and even a complete racing game BSD licensed.

12. Khronos OpenGL ES 1.x Step-By-Step Tutorials This page is from Imagination Technologies makers of the Iphone GPU, and it contains the Khronos tutorials converted to OpenGL ES and created for the PowerVR technology.  Good to lean from especially as to how they load Pod files.

13. Zeus CMD OpenGL ES Tutorials This site contains 25 Great OpenGL ES Tutorials and they are extremely well paced, this was a site I learned alot from.

14. Typhoon Labs OpenGL ES Tutorials Another excellent set of OpenGL ES tutorials if you’re addicted to tutorials you might want to check these out too.

OpenGL ES 2.0 Resources

These are the OpenGL ES 2.0 resources you know so far, the Khronos OpenGL ES page above also includes information on OpenGL ES 2.0.  You can see there aren’t many that i know of so if you know of some killer OpenGL ES 2.0 resources please link to them

15.  The OpenGL ES Programming Book The code from this book has been updated to run on the iPhone and can be found here.  Make sure you have a solid understanding of OpenGL (or OpenGL ES 1.x) before starting this book.   

16. The OpenGL ES Shading Language This is a free pdf book from Khronos, and actually a really good read, and will teach you what you need to know, again don’t try this until you at least have some OpenGL understanding or your head may explode. Thanks to Bill Dudney one of the authors of iPhone SDK Development for pointing this out.

This is a quick video on getting started with iPhone OpenGL ES:

That’s it, if you know of some other great resources please share them.
 
 


  •  
  •  
  •  
  •  
  •  

The 3 Books Beginning iPhone Developers Must Read

  •  
  •  
  •  
  •  
  •  

A question that I see commonly asked, and am asked at least once a week is “what book should an iPhone development beginner read?”.  So here are the 3 books that I believe beginning iPhone developers must read if they want to understand the SDK as fast as possible.  Please note that if you get these books understanding them will not be easy, it will take considerable effort, but I imagine that if you were to take college courses the content would be spread over several courses.

Update – Sept. 25, 2009

Since writing this article, I have found out about another book (in e-book format)which I now intend to use to train some local programmers to work with.  It covers what you need to know from raw beginner (C basics, Objective-C, and iPhone development basics) and includes several templates so that you can get an app out there very quickly.  This is my new #1 recommendation and you can check out the book here.

I recommend checking out this book first, and then if you have problems and need more in-depth study use the books below. This should save you alot of money, and time.  Please note that this is an e-book, and you can obtain a copy through instant download here.

Here’s the 3 other Books, and the order I suggest reading them.  My rating for all three of these books is 5/5 stars.

1. Programming Objective-C 2.0 – Beginner book goes through Objective-C basics, OO principles, and C language syntax.  Does not assume that you know C/C++ or Java.   This book may be a bit difficult for absolute beginners, but if you stick with it this book will teach you the basics you need to know.  This book takes you from the beginning to the point where you are learning the iPhone SDK.  By the way, there is now another book with the same name, do not fall for that and make sure if you get this book it is by Stephen Kochan.

2. Cocoa Programming for Mac OS X – While not specifically an iPhone book this book teaches many of the principles that you need to understand in great detail, beyond that of iPhone development books that I’ve seen.  The book also goes into libraries that may be included on the iPhone in the future.  This book can be a difficult read especially if you actually do the exercises, but it is well worth it.

3. Beginning iPhone 3 Development – This is probably my favorite programming book of all time, it’s a very easy read, but still manages to explain the key concepts used.  This is certainly not the most thorough programming book of all time, but combined with the knowledge contained in the two books above you should gain the knowledge required to understand Apple’s documentation and examples.  This book is currently being updated to include iPhone SDK 3.0 material.  UPDATE: The new edition of the book can be found here: Beginning iPhone 3 Development, all material from the old book is included.

Here are some other books that I’ve checked out that I found to be of solid value:

The iPhone Developers Cookbook – This book contains many “recipes” that you can use when developing your book, it does not go into concepts at the level of depth of Beginning iPhone Development, but I have found several times that I end up going back to this book and adapting a recipe for use within my own code.   This book is currently being updated to version 3.0, and from looking at the rough cut the added formulas look extremely useful. My rating 4/5.

Learning C on the Mac and Learning Objective-C on the Mac – These books basically go together so I’m mentioning them in the same phrase.  Combined they will basically teach you almost as much as Programming Objective-C 2.0, but you’ll end up buying two books instead of one and spend almost double. My rating 4.5/5 on C on the Mac, and 3.5 for the Objective-C on the mac book.

iPhone SDK Development – This is an ok book, it does not really go into anything in any depth, but it does point you in the right direction, and the sample code is very good.  It covers some concepts related to web programming that are not covered within the other book. My rating is 3.5/5.

I’ve created a small video where I talk a bit about the 3 books:

Please post about any other books that you feel are worth checking out.


  •  
  •  
  •  
  •  
  •