Is it possible to program iPhone in C++


I'm all for language diversity, but Objective C is insane. So I'm curious: is it possible to code iPhone apps with C++ while using the Cocoa API, etc?

11/9/2008 5:27:27 PM

Accepted Answer

Short answer, yes, sort of. You can use Objective-C++, which you can read about at Apple Developer Connection.

If you know C++ already, learning Objective-C would be pretty simple, if you decided to give that a try. More info on that topic is at the ADC as well.

6/12/2017 10:28:49 AM

Although Objective-C does indeed appear to be "insane" initially, I encourage you to stick with it. Once you have an "a-ha" moment, suddenly it all starts to make sense. For me it took about 2 weeks of focused Objective-C concentration to really understand the Cocoa frameworks, the language, and how it all fits together. But once I really "got" it, it was very very exciting.

It sounds cliché, but it's true. Stick it out.

Of course, if you're bringing in C++ libraries or existing C++ code, you can use those modules with Objective-C/Objective-C++.

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow