views:

438

answers:

3

Sorry if this is mentioned somewhere, couldn't find any info about it. Post a comment if you find a duplicate.

This is not about whether it's possible at all to compile a C++ program for the iPhone (which I suppose is possible).

Basically the question is, can you bridge between Objective C and C++?, and if it is possible, would it be feasible to wrap the entire Cocoa Touch API for iPhone with a nice C++ library?

I know nothing about Objective C, and I would really like the idea of bringing my current skills in C++ to the iPhone.

EDIT: Very similar question here

+2  A: 

Well I think that this blog here: http://iphonedevelopertips.com/cpp/c-on-iphone-part-1.html

will help you :-)

vlad
A: 

This question is very close to duplicating your own.

However, I would suggest spending a little more time with Objective-C. I had done C++ development myself before learning Objective-C, and it was a pretty smooth transition. Many of the core concepts are the same, and all of your base C skills will translate across. I think that once you get a little ways into it, you'll find that direct Objective-C interaction with the Cocoa frameworks is really the way to go on the Mac and iPhone. There are many great resources for getting started, like the ones I list here.

Admittedly, there are some cases where it's preferred to have a cross-platform C++ engine behind the scenes, and an Objective-C / Cocoa UI.

Brad Larson
A: 

Apple provides some documentation, too.

http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/Articles/ocCPlusPlus.html#//apple_ref/doc/uid/TP30001163-CH10-SW1

Have fun with Objectice-C++ ;-)

Stefan