I'd like to get into iPhone development (mainly OpenGL & games stuff, no GUI apps). Got 10+ years experience of thorough Windows development, mostly C++ / win32 api, some OpenGL. However I have absolutely NO experience with Mac or Apple whatsoever.
I'm confident I'll pick up the concepts without any trouble, but I got no clue where to begin, or even how to setup an iPhone development environment. Should I use GCC? or Xcode (is that an IDE and/or compiler?) and is there a step-by-step introduction somewhere to create an initial project?
There's an overkill of info and tutorials out there, but they all seem to assume some initial Mac development knowledge which I don't have. An absolute newbie tutorial on creating an OpenGL "hello world" for iPhone step by step from scratch would be awesome.
Does anyone what would be a good place to start for me?
1 -- The example projects in XCode on the Mac make excellent starting points. XCode is an IDE... and if you set the target to "simulator" it just pops up the iPhone simulator. Fire it up, you can't miss it. Download from developer.apple.com.
2 -- I really liked the book "The iPhone Developer's Cookbook: Building Applications with the iPhone SDK"
3 -- Objective C is kinda quirky but you get used to it quickly enough, plenty of web resources and books are easy to find.
I would also take a look at Stanford University's free iTunes U course in iPhone development. It's a great, thorough explanation of the iPhone platform and Objective-C. There's a "Hello World" tutorial in there, but the videos go much farther and will give you a good deep dive into the ecosystem. There is an OpenGL ES section as well.
If you haven't done so yet, you will need to either buy a Mac or build a Hackintosh, since you have to have OSX for development.
I did a test OpenGL app last fall, and found the best book for 3D on the iPhone was:
iPhone 3D Programming
By: Philip Rideout
It covers both versions of OpenGL ES that you need to be aware of if you want your apps to run on older iphone hardware, although if you only want to target the 3GS and up (and 3gen ipod touch, and ipads) then you can skip to OpenGL ES 2.
It has complete examples, a good explanation, and best of all it recognizes that a lot of people coming to the iPhone for games development already know C++, and it focuses on getting you right into the C++ OpenGL rendering loop. You have to deal with very little objective C, and most of that is well explained with examples that are easy to use.
It doesn't cover game design - it's just to get you going in 3D on iOS, so if you aren't familiar with OpenGL and game design fundamentals you should also invest in one of the many game design and opengl bibles that are available.
As far as programming the iPhone on windows, it's possible, and I have a friend doing it using a hackintosh VM. I decided to just get a cheap mac mini I found on sale when the new ones came out a few years ago. My friend found that his setup worked well enough to get to the stage where he was willing to commit to his app, then he invested money and bought a mac mini. He indicated that development just flies now, compared to his VM, and he wishes he switched sooner.
Whether you have the $500+ to invest in it is up to you, but be aware that there really aren't any other good options for iOS development yet, and you cannot easily submit apps to the apple store without a mac and xcode, so if you plan on going that route, you need to budget for a mac.
For the simplest development environment for someone starting out with iPhone development, you'll want to go with a Mac running Snow Leopard and use Xcode with the iPhone SDK. Xcode is an IDE that contains within it a modified version of the GCC (or LLVM) compiler targeted at producing Mac or iOS binaries. It also includes a full iOS simulator for quickly testing out your applications.
There are ways of doing iPhone development on Windows, but they are extremely difficult to get set up and ultimately more of a curiosity than a practical means of development
There are a good number of getting started resources listed in this question. I recommend the Stanford videos, as well as Apple's getting started videos that you can access through the iOS Dev Center. Apple also has an iOS Getting Started document that acts as a jumping-off point for their other introductory documentation.
Be aware that OpenGL ES is not a simple subject to just jump into. You can easily create an OpenGL ES "Hello World" application by opening Xcode and creating a new project from the OpenGL ES Application template, but you'll have a hard time figuring out what to do after that. However, OpenGL ES is something you can learn independently of Cocoa and Objective-C, so if you want to jump into that topic, I taught a class on the subject which can be found on iTunes U as part of my advanced iOS development course. I walk through the fundamentals of OpenGL ES 1.1 there (2.0 can be found in the fall semester of the course). I also highly recommend Philip Rideout's iPhone 3D Programming book and Jeff LaMarche's series on the topic.
Don't let the initial complexity of OpenGL ES scare you away. You should be able to pick up the basics reasonably quickly if you apply yourself.
Hi
I would like to learn and develop applications for iPhone. Can some one guide me on where to start? I'm new to mobile application development. I have good exp in developing web applications and desktop client applications.
Do you have any experience with C? If not, you should probably start there, then work into learning objective-C, and finally dive into the Apple frameworks (i.e. Cocoa touch).
apple has good documentation at http://developer.apple.com
If you prefer books, I would highly recommend iPhone Programming by Aaron Hilligrass:
Also note that you are free to write iPhone apps and test them on a simulator, but to actually push code to a real device you need to purchase a developer profile for $99
Get a mac. An intel based mac is
required. Basically you need Mac OS
X.
Learn C, Objective-C.
Get the iPhone SDK.
Get a good book on it. Do the examples.
Check out the Stanford Learning Series on iTunes, where you can virtually take the course at Stanford. Do the homework assignments, etc...
As darren has said you'll want a good knowledge of C. You can go along the C#/ objective C route but theres also the Airplay SDK. If you have a good knowledge of C apprently you can make games for iPhone quite easily, not had the chance to try it out yet but looks promising. According to the site COD: Nazi Zombies was made using it, might be worth a look.
http://www.airplaysdk.com/
I was wondering what would be the steps I need to follow if I am just an individual looking to write my own apps and get it approved by apple to feature on their store. Also, is it just objective-c I need to learn or what other skills would I require ?
What would be a good tutorial or a place to start ? What are the tools I require? I found this but still for those of you developing there...I would appreciate any help sorry if this was too generic..all I want is good direction..
Personally I think that books are a good way to learn. For example, here are a few:
http://www.markj.net/iphone-development-programming-books/
You will need:
An Intel Mac
XCode
A $99 developer fee if you want to actually build for a device/put it on the actual device
I recently started with iPhone app development in school. I read the Head First iPhone book which was a decent start just to get into it. I highly recommend the iPhone lecture series from Stanford University available for free on iTunes U.
I agree with Andrew M - but would add that Apple's sample code is a good way to learn by example. You can look at code and reference material without becoming an iOS Developer.
iOS Reference Library
You can do a lot in the iPhone Simulator but at some point you will need to pony up $99 (per year) to start testing on devices.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
A recent post by John Gruber notes that the following legalese:
3.3.1 — Applications may only use Documented APIs in the manner prescribed by Apple and must not use or call any private APIs.
Has been revised as follows:
3.3.1 — Applications may only use Documented APIs in the manner prescribed by Apple and must not use or call any private APIs. Applications must be originally written in Objective-C, C, C++, or JavaScript as executed by the iPhone OS WebKit engine, and only code written in C, C++, and Objective-C may compile and directly link against the Documented APIs (e.g., Applications that link to Documented APIs through an intermediary translation or compatibility layer or tool are prohibited).
And makes the following observation:
My reading of this new language is that cross-compilers, such as the Flash-to-iPhone compiler in Adobe’s upcoming Flash Professional CS5 release, are prohibited. This also bans apps compiled using MonoTouch — a tool that compiles C# and .NET apps to the iPhone.
Does this in fact ban the use of Monotouch for the IPhone?
Update -
This changed recently. MonoTouch should no longer conflict with
the agreement. Any statements below are purely historical!
Yes, it seems pretty clear from their license agreement now that if the original application is written in C# then it would be violating the license:
...Applications must be originally written in Objective-C, C, C++, or JavaScript as executed by the iPhone OS WebKit engine...
They even hammer it in a little further:
Applications that link to Documented APIs through an intermediary translation or compatibility layer or tool are prohibited
Kind of a bummer, MonoTouch and the Flash CS5 -> iPhone converter are very cool.
Update:
Apple has dropped (almost) all technical requirements for languages and libraries for iOS, so MonoTouch is without a doubt a viable solution. See Apple's announcement.
Most people here simply want to take Apple's document by the word and say "yes, its banned". Well, here's my point of view: at this point, nobody really has any idea if MonoTouch is going to be banned or not, and I'll explain why:
The Apple agreement version 3 (not the latest, the one before) clearly states that its illegal to use any other frameworks to develop applications other than the ones provided by Apple:
3.3.2 An Application may not itself install or launch other executable code by any means, including
without limitation through the use of a plug-in architecture, calling other frameworks, other APIs or otherwise.
No interpreted code may be downloaded or used in an Application except for code that is interpreted and run
by Apple's Documented APIs and built-in interpreter(s). http://adcdownload.apple.com/iphone/iphone_sdk_3.2__final/iphone_sdk_agreement.pdf
Even though that's the case (and was actually the case since 2.x, apple doesn't have any problem accepting applications that do exactly that. For example, ALL EA games use Lua scripts, and lots and lots of people use external libraries that are not native to the iPhone. Even when the iPhone has those native APIs, Apple never had a problem accepting applications with different versions of it, like SQLite.
My point is that saying "YES, they'll be banned" right now is simply WAAY too early. The only clear thing at this point is that Apple could in fact use that to ban apps. Just like they accept Apps today that are against some of their rules, they'll probably continuing doing so.
There's also the fact that are hundreds (or probably a few thousands?) of apps in the store currently running Mono, and Apple will need to accept updates for those apps. Major apps with millions of sales were created using Mono (and Lua), and I doubt they would refund every single user.
Lastly, Enterprise applications are deployed to iPhones without Apple's approval, and that's a big market that MonoTouch is on (I myself develop enterprise apps). There's no way at this point that Apple could ban MonoTouch for those applications, and that will probably be enough to keep MonoTouch alive for a long time.
Update:
New changes to sections 3.3.1, 3.3.2 and 3.3.9 have made MonoTouch (and all other cross compilers/languages/etc) perfectly acceptable on the iPhone. See Apple's announcement
Miguel doesn't seem to think so. See the tweet and Miguel's response. Lets not overreact here and say that Monotouch is dead, or stop developing with Monotouch until some clarifications have been made by all parties involved.
That said I would definitely start putting the heat on Apple for such draconian development policies. Things like this, and the nebulous process that is the approval policy of iphone/ipad/touch apps should strike fear into the hearts of developers. What's next, their license stating that the only Ad platform you are allowed to use is iAd? Not allowing the distribution of free apps without iAd? Slowly raising Apple's share of the revenue of app sales? As developers in a locked down eco-system, we are kind of frogs in a pot of hot water, and Apple is slowly turning up the heat. Now is the time to explore other mobile platforms, because as they get better, the main thing holding people to the Apple platform is lack of applications on other platforms.
I spent months of evenings working on ideas for a killer iPhone app in Objective C. My day job is C#. I downloaded MonoTouch C# when it became a viable alternative and have just spent 3 months converting my code to iPhone specific MonoTouch C#. Which stopped me going mad through switching from C#/Objective C.
What do I do now throw it all away and start again or give up!?!
I feel really sorry for the Mono guys. This is plain wrong. It is one thing to stop Adobe who haven't launched their product and have no customers and to stop MonoTouch who do and also have approved product in the AppStore.
Why would anyone want to build a business and invest in Apple when they will take it all away at a moments notice without being answerable or questionable?
Clearly developers and customers of Apple caring for them and their products is a one way street.
I hope Apple gets trounced for this ridiculous policy. Arrogance is not attractive and generally bad for business. This is one of the reasons I haven't started iPhone development.
Most hardware and OS providers are happy to have additional tools and audience to write to their platform. Apple is taking the stance that its (braindead) tools are the only game in town.
The "Big Brother" ad from 1984 is more and more relevant...
EDIT
The way it is written also seems to imply that if I wrote a .net to objective C/apple translator that the code isn't acceptable because the original code was not objective c. That is ludicrous (and unenforceable.)
Unity is also based on Mono and with that being a sizable commercial product I imagine that this is an issue which we've not heard the end of yet.
Banning all apps that are not written in Obj-C/C++ would, in theory ban all Unity games also, of which there are a large number already in the app store.
This question has also been asked over on the Unity Answers site, and their official answer is:
"We just heard about the iPhone OS4.0
and the new Terms-Of-Service. While we
believe we are fully compliant with
these we are right now doing all we
can to get this verified by Apple. As
soon as we know precisely, we will of
course share that info with everybody.
Please hang tight while we get this
sussed out."
Be interesting to see what they get told by Apple.
The thing is, surely saying that an app has to be written in a certain language is a bit of a misnomer, as once the app is compiled down, it's always a native binary regardless how it's been built. My guess is that all they can look for is some kind of signature in the binary to detect what tool it was built with. A flawed approach.
EDIT: There is an interesting overview of the situation on this blog: monotouch now dead in the water what does apples new iphone developer agreement mean
The new license agreement is explicitly clear about that. So YES, it will be banned.
Advice, if you want to really develop for iPhone, try XCode. If you are already familiar with Java or C# or yet better C++, then learning Objective-C wont be that hard.
iPhone/iPad is Apples new successful business, and they will do anything to keep this business growing, maybe they will not ban Monotouch apps now, but who knows there next move? So if you are really really interested in iPhone dev, instead of having nightmares that your work might be just rejected. Just switch to XCode, at least that will lower your app reject percentage. Hence, my advice.
I think something to strongly consider is Apple's motivation.
I agree with other sentiments posted online that Apple is trying to prevent commoditization of applications - that is to say, having more and more applications written using frameworks that generate applications that can run across multiple devices.
But that's not what Monotouch is. Monotouch is all about using the Apple frameworks to write applications - but through Mono, not Objective-C. So from that standpoint what Monotouch is doing is not something that should really bother Apple.
I still hold that developers are better off writing in the native language of the platform they are using, as things are just generally smoother when you don't introduce system that can have abstraction impedance mismatch - the Cocoa frameworks were all built to be used from Objective-C, and they make the most sense when you are used to the philosophy of Objective-C. But I do hope that Apple comes down on the side of allowing MonoTouch to be used.
All Apple is saying is that you must all now use 1980's languages to develop your competition beating state of the art Mobile Applications....
Makes perfect sense. Sounds like a winning strategy to me.
It also stops you from using any 3rd party libraries that you can't guarantee that have been developed in straight C, C++ or Objective C.
So basically it means that you can't buy in Games API's such as Unity.
Just adding my 2 cents. It seems that after reading this part: (e.g., Applications that link to Documented APIs through an intermediary translation or compatibility layer or tool are prohibited) there is nothing to discuss. They have expressed them unambiguously. Not only they are banning MonoTouch and Unity3d, it seems they are also banning Titanium Framework. However, after reading this article, i found myself really confused.
I am not familiar with US laws, but is it legal? I mean, aren't they breaking some anti-monopoly laws?
Besides all of this, i can't understand their motivation. Not only will they partly lose a developers interest, they will also lose a developers respect, i think.
As of today, Section 3.3.1 of the Apple iOS Developer Program License has now been reverted to the old text:
3.3.1 Applications may only use Documented APIs in the manner
prescribed by Apple and must not use
or call any private APIs.
Apple has released an official statement on the license changes.
This would indicate that it is now permissible to use MonoTouch.
One goal of the Mono team is porting Silverlight to the iPhone by mean of MonoTouch/Moonlight for cross platform development. That's a bit like porting Flash to the iPhone. There is also Monodroid on the way to help us porting applications and, you know, Apple runs amonk every time someone says "Android" :-) IMHO, if Apple is targeting Adobe with the new agreement, they are targeting Novel too. We are probably speculating and there's a NDA but many of us invested a lot of time on this platform so we need to make the situation clear. We cannot wait next summer to discuss this matter. For example, I've been asked by a friend to help his company to prototype a MonoTouch application for a customer. Does the new agreement only affect the App Store distribution? What about in-house distribution?
This google docs spreadsheet has a long list of apps that will be affected by the new agreement. Some noteable ones that have been #1 in the appstore for their category:
Monopoly
Lemonade Tycoon
Skee ball
The settlers
Zombieville
One of the funny inclusions is Toy Story.
oMany apps have been accepted within the last few days written with the help of monotouch and unity, whereas I also am using it as well as obj-c, since the announcement and change in the agreement, so GO FIGURE,...the good ol'WTF comes to mind. It is a bipolar piggybank it seems.
ALSO, the last Unity Game GiantMOTO, which is under HOT NEW GAMES - YESTERDAY, has on its splash screen onLoad in big letters, POWERED BY UNITY. So, all the conjecture, assumptions, etc. is really out the door. It might say all that in the new version, it is certainly NOT enforced. And montouch is the only development platf that FULLY exposes iPhone API and builds COMPLETELY into obj-c using XCode.
From what the license agreement says MonoTouch apps will clearly not be allowed in the AppStore.
The more interesting question is though, against which framework / apps will they enforce it? They will also have to write automated tests to check if the apps were written natively or not, because the people who approve the apps won't have the time / skills to do it for every single app. These apps won't put a sticker there 'Using MonoTouch / Flash'.
Short answer to all that blob in the agreement is YES.
Apple is basically shooting itself in the foot by limiting programs to a few languages:
C - which is not really suited for application development these days, due to it's low-level nature. It's mostly a systems programming language today.
C++ - which makes it harder to shoot your phone, but when it happens, it's with a bazooka. Apart from Qt, there aren't any complete application frameworks to use in C++ (and Qt doesn't support iPhone - yet).
Objective-C - which was invented by Apple and of course will be supported.
JavaScript running in WebKit - basically a web application.
They are deliberately limiting what tools you can use to develop for iPhone, which will almost certainly get them in serious trouble. I'm sure a good sized chunk of the community will just quit iPhone development and migrate to a different platform like Windows Mobile, Symbian, Android or Maemo, which are totally open - you are free to write your application in LOLCODE.
Apart from possibly making iPhone junk for developers, it also gives Adobe a nice kiss:
Apple deliberately blocks Flash from iPad, and now they are also blocking it from iPhone. The nummer is Adobe Flash's CS5 biggest feature is deploying Flash applications to iPhone.
tl;dr: Apple is basically shooting itself in the foot with this move.
It's now months after the flash debacle and it's pretty obvious Monotouch and Unity are doing just fine.
As per "Applications that link to Documented APIs through an intermediary translation or compatibility layer or tool are prohibited"
Monotouch compiles code down to a native binary, there is no "layer". They're referring to somethign like a .NET runtime, Java JVM or Flash runtime.
Mono applications would normally compile to bytecode which is and would require JIT (just in time) compilation to run them thus a .Net framework or Mono framework is required. However, in the case of iOS and Android, Mono application compile to native code. Therefore, in the eyes of Apple, there is no third layer, Apple will never ban Mono. So you can feel free to develop with MonoTouch and distribute your apps. To ensure you further, there are various of Mono applications (including games and applications) on the AppStore that have been around for a long time.