Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

PoppingCorn

macrumors newbie
Original poster
May 7, 2010
2
0
Hi, i was wondering if you guys could give me all the different options i have for writing apps for the iphone/ipad, using plain old :p C. Like at the moment i've only make programs for the mac os x, using both carbon, cocoa. And i find i prefer sticking with just C not having to delve into objective-C to set up my interface. That's why i prefer using carbon over cocoa, so this is why i was wondering what are my options for the iphone/ipad.
 
There is no Carbon on the iPhone and to all intents and purposes it's dead for GUI-level programming on Mac OS as well. Your only native GUI option for the iPhone is to learn Objective-C.
 
Damn, oh well guess i'll just have to put up with it :p.

What about OpenGL ES, i'll still need to create the user interface with objective-C right? But for implementing the OpenGL ES functions and features i can do that in C, or will that also have to be in objective-C?
 
Damn, oh well guess i'll just have to put up with it :p.

What about OpenGL ES, i'll still need to create the user interface with objective-C right? But for implementing the OpenGL ES functions and features i can do that in C, or will that also have to be in objective-C?

If you want absolutely everything in OpenGL ES then you'd need a very minimal amount of Objective-C to setup the window and view and potentially deal with touches and rotation events. If you want native buttons (instead of your own in OpenGL) then you'll need some more Objective-C.

I don't think Apple have wrapped OpenGL ES in any real CocoTouch wrapper. Sure it's a UIView but the interface to OpenGL looks (as far as I've looked which is not far) like the pure-C OpenGL I used back at Uni.
 
The UIKit user interface is all object oriented. There is no other legal option (e.g. supported/documented APIs).

So you have to learn OOP and event driven methodology.

While it is theoretically possible to write an OOP UIKit app all in C (by calling all the selectors through a bunch of the Objective C Runtime wrapper functions), it's 100X messier and longer than just writing all the calls and callbacks in Objective C.

So bite the bullet and learn enough Objective C to do a simple view app.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.