iPhone development

Programming, for all ages and all languages.
User avatar
xDDunce
Member
Member
Posts: 173
Joined: Tue Aug 12, 2008 4:04 pm
Contact:

iPhone development

Post 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.
User avatar
Troy Martin
Member
Member
Posts: 1686
Joined: Fri Apr 18, 2008 4:40 pm
Location: Langley, Vancouver, BC, Canada
Contact:

Re: iPhone development

Post 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...
Image
Image
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.
I wish I could add more tex
xyzzy
Member
Member
Posts: 391
Joined: Wed Jul 25, 2007 8:45 am
Libera.chat IRC: aejsmith
Location: London, UK
Contact:

Re: iPhone development

Post 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 ;)
User avatar
xDDunce
Member
Member
Posts: 173
Joined: Tue Aug 12, 2008 4:04 pm
Contact:

Re: iPhone development

Post 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!
User avatar
Troy Martin
Member
Member
Posts: 1686
Joined: Fri Apr 18, 2008 4:40 pm
Location: Langley, Vancouver, BC, Canada
Contact:

Re: iPhone development

Post by Troy Martin »

(this reminds me, I need to count my cash for the iPod Touch I want to buy...)
Image
Image
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.
I wish I could add more tex
xyzzy
Member
Member
Posts: 391
Joined: Wed Jul 25, 2007 8:45 am
Libera.chat IRC: aejsmith
Location: London, UK
Contact:

Re: iPhone development

Post 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...
User avatar
xDDunce
Member
Member
Posts: 173
Joined: Tue Aug 12, 2008 4:04 pm
Contact:

Re: iPhone development

Post 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...
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

Re: iPhone development

Post by Love4Boobies »

There are a few Mac emulators out there; some pretty decent ones too. Just google around...
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
xyzzy
Member
Member
Posts: 391
Joined: Wed Jul 25, 2007 8:45 am
Libera.chat IRC: aejsmith
Location: London, UK
Contact:

Re: iPhone development

Post 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... ;)
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

Re: iPhone development

Post 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... :)
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
User avatar
xDDunce
Member
Member
Posts: 173
Joined: Tue Aug 12, 2008 4:04 pm
Contact:

Re: iPhone development

Post 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!
quok
Member
Member
Posts: 490
Joined: Wed Oct 18, 2006 10:43 pm
Location: Kansas City, KS, USA

Re: iPhone development

Post 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...
User avatar
xDDunce
Member
Member
Posts: 173
Joined: Tue Aug 12, 2008 4:04 pm
Contact:

Re: iPhone development

Post 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.
User avatar
Steve the Pirate
Member
Member
Posts: 152
Joined: Fri Dec 15, 2006 7:01 am
Location: Brisbane, Australia
Contact:

Re: iPhone development

Post 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.
My Site | My Blog
Symmetry - My operating system.
fara7at
Posts: 6
Joined: Tue Jun 09, 2009 5:48 am

Re: iPhone development

Post 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.
Post Reply