Minimal essential Cocoa objects for C++ ios app

Discussion of issues specific to mobile platforms such as iOS, Android, Symbian and Meego.
caseybasichis
Greenskin
Posts: 100
Joined: Wed Jan 25, 2012 7:50 pm
x 1

Minimal essential Cocoa objects for C++ ios app

Post by caseybasichis »

Hi,

I'm working on an iOS ogre app. I want to keep most of it in C++. Can someone shoot off a list of their most commonly used iOS cocoa touch objects that are pretty much essential even when working with Ogre, mostly in C++?

I plan on using Ogre for graphics, hopefully along with Gui3d and Gorilla for GUI. Data will be a non-CoreData c++ sql solution. I expect the touch and gesture aspects and web/networking will definitely be Apple. I am reading a book on iOS programming and most of what I'm reading is redundant functionality for things that are possible in C++ and could preferably be kept in a cross platform mode of being. Are there facets of your typical Ogre iOS game that really can't be handled by other C++ libraries?

Finally, are the kinds of Cocoa touch objects that would fall under this category similarly mirrored on Android? Ultimately I am looking to make the application cross platform.
caseybasichis
Greenskin
Posts: 100
Joined: Wed Jan 25, 2012 7:50 pm
x 1

Re: Minimal essential Cocoa objects for C++ ios app

Post by caseybasichis »

Just to simplify...

Would an iOS Ogre dev mind listing the Apple Cocoa objects that they do use, both rarely and commonly?

I take it NSString is not used in favor of C++ code. What is used?
User avatar
DanielSefton
Ogre Magi
Posts: 1235
Joined: Fri Oct 26, 2007 12:36 am
Location: Mountain View, CA
x 10

Re: Minimal essential Cocoa objects for C++ ios app

Post by DanielSefton »

Just use whatever you need I guess. I use NSString a lot, because you need to convert C-Strings to NSString before you can pass them to cocoa objects. But I personally use UIKit for a lot of my GUI, so I have quite a bit of Objective-C++ beyond input. In your case, yeah, you can just pass the touches (and perhaps accelerometer) to your C++ input system and just make sure it's abstract if you want it to be cross platform. I'm pretty sure that's all you need beyond the UIApplication class.