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

MacDonaldsd

macrumors 65816
Sep 8, 2005
1,005
0
London , UK
Thank you! Two more questions. May I use only C(without use the superset of C)? Will my app become unstable?

You need to write the skeleton of the application in Objective-C, as the OS communicates to the app using Objective-C only. Also all of the iPhone UI is done using Objective-C.

If you code what ever you do properly, it will have no effect on stability.
 

mccannmarc

macrumors 6502
Aug 15, 2008
270
0
Manchester, UK
The source code for Wolfenstein on the iPhone is all C they have just used the AppDelegate as an entry point to the app and to call their C functions to run the game. (Obviously they use Obj-C for iPhone specific stuff such as accelerometer etc but the core of the game is all C)

In fact the code is a very interesting read to anyone who is mainly a C developer as it demonstrates the use of heavy C code on the iPhone and would answer most of your questions
 

firewood

macrumors G3
Jul 29, 2003
8,141
1,384
Silicon Valley
May I use only C(without use the superset of C)? Will my app become unstable?

You can use straight ANSI C as long as your app doesn't use require any UI interaction (any user input or window output), and runs less than 20 seconds.

For instance, you can write an app that makes a posix network connection, downloads some data and plays a PCM sound waveform without writing any Objective C (or maybe 3 or 4 lines of it), other than in the templates.

Otherwise you will need to use some Objective-C to access the UIKit frameworks for any UI (touches, accelerometer, windows, views, etc.), and the main run loop.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.