Page 1 of 2
iPhone development
Posted: Fri Apr 10, 2009 3:58 pm
by xDDunce
hiya,
just wondering if anyone has any experience in developing for the iPhone or iPod touch?
Just this morning, i finally got the iPhone 3G and can't wait to start putting it through it's paces with my own handywork. the only thing is, everywhere i look all i find is objective-c examples and tutorials etc. but im a C/C++ developer. I branch into Java, but only for a bit of fun every now and then, and for my A-levels.
can anyone point me in the direction of some C++ examples of the iPhone OS 2.2 SDK in action? i've searched for a while now, and still can't find any C++ oriented examples.
Thanks in advance,
James.
Re: iPhone development
Posted: Fri Apr 10, 2009 4:15 pm
by Troy Martin
I'm registered with them but I can't use the SDK since I don't have a Mac. Boo hoo hoo...
Re: iPhone development
Posted: Sat Apr 11, 2009 1:11 am
by xyzzy
iPhone apps and the majority of OS X apps are written in Objective-C - in particular, the Cocoa API is written in it. I don't think it's possible to use C++ for iPhone apps. But it's not all that bad - it gives you an opportunity to learn another language
Re: iPhone development
Posted: Sat Apr 11, 2009 4:54 am
by xDDunce
But,i hear there is a way...
I don't have the url to hand right now,but it is (apparently) possible to use c++ to develop apps.
I'd rather not learn a new language, but if that is what it takes, i better get started then!
Re: iPhone development
Posted: Sat Apr 11, 2009 10:04 am
by Troy Martin
(this reminds me, I need to count my cash for the iPod Touch I want to buy...)
Re: iPhone development
Posted: Sat Apr 11, 2009 10:59 am
by xyzzy
Troy Martin wrote:(this reminds me, I need to count my cash for the iPod Touch I want to buy...)
/me waves new iPod touch around. Should probably poke at the SDK sometime. Oh wait, I need a Mac...
Re: iPhone development
Posted: Sat Apr 11, 2009 1:21 pm
by xDDunce
Lol,lucky for me i already have one :p
I have spent all day just playing with Xcode and the SDK, and came across some interesting things. It appears you can mix c/c++ with objective-c, so why not make it purely in c++? Also, interface builder (and nib files) support c/c++ intergration aswell as the iphone supporting nib file usage, i see no reason why c/c++ couldn't be used just to load the interface and handle any messaging required...
Re: iPhone development
Posted: Sun Apr 12, 2009 3:12 am
by Love4Boobies
There are a few Mac emulators out there; some pretty decent ones too. Just google around...
Re: iPhone development
Posted: Sun Apr 12, 2009 3:35 am
by xyzzy
Love4Boobies wrote:There are a few Mac emulators out there; some pretty decent ones too. Just google around...
Alternatively just grab an OSx86 DVD from somewhere...
Re: iPhone development
Posted: Sun Apr 12, 2009 4:34 am
by Love4Boobies
AlexExtreme wrote:Love4Boobies wrote:There are a few Mac emulators out there; some pretty decent ones too. Just google around...
Alternatively just grab an OSx86 DVD from somewhere...
Oh, right. They did start making those...
Re: iPhone development
Posted: Sun Apr 12, 2009 8:42 am
by xDDunce
This seems easy! Maybe,too easy...
With only minor changes from C and the addition of built-in functions, objective-c couldn't be any easier to learn.
A tip for anyone planning to develop iPhone/iPod touch apps: Find a tutorial, don't just assume apple has everything you need. A great site to start with is
http://www.icodeblog.com they have a tutorial on just about everything. And the learning curve is much smoother than the WWDC.
Happy programming!
Re: iPhone development
Posted: Sun Apr 12, 2009 9:47 am
by quok
xDDunce wrote:This seems easy! Maybe,too easy...
With only minor changes from C and the addition of built-in functions, objective-c couldn't be any easier to learn.
Objective C really isn't hard to learn at all. I've only done a little MacOS programming but I am rather fond of Obj-C. I've even considered using it to write my kernel, but I don't know it that well, so I axed that idea.
I've got a MacBook Pro and a 24" iMac (at work), and have an iPod Touch (well, my wife does anyway). I've considered diving in to programming on the thing, and I have the SDK. But then again, I work for a certain US cell phone company that's got an exclusive on the Palm Pre...
Re: iPhone development
Posted: Sun Apr 12, 2009 10:28 am
by xDDunce
Well if you're comfortable with it, give it a go. At the moment i'm only using the simulator because i don't want to fork out $99 for the developer program until i have something worth putting on the app store.
I'm currently working on a classic pong clone, and it looks quite good. Once this is done i'm gonna take a look at making a small RPG with some simple graphics.
Re: iPhone development
Posted: Mon Apr 13, 2009 3:07 am
by Steve the Pirate
I have the SDK, but I haven't really played around with it much. I am fairly sure that you can use C and C++ (at least I've seen stuff like Mono ported) but I doubt you can do user interfaces in anything but Objective-C.
Also remember that even if you sign up to the SDK, you have to be a registered iPod developer ($100 for individual) to be able to actually test apps on the actual hardware or submit apps to the App Store. If you only have the free SDK you can only use the emulator.
Re: iPhone development
Posted: Tue Jun 09, 2009 5:57 am
by fara7at
You can use a C++ iPhone toolkit such a LibNUI: libnui.net
It even permits you to develop and test your apps and games on a PC with Visual Studio until the last moment.