Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Nov 12, 2008, 12:58 PM   #1
PowerFullMac
macrumors 68040
 
PowerFullMac's Avatar
 
Join Date: Oct 2006
Can I do iPhone apps in C?

...Or is it only Objective-C?

Last edited by PowerFullMac; Nov 12, 2008 at 01:08 PM.
PowerFullMac is offline   0 Reply With Quote
Old Nov 12, 2008, 01:28 PM   #2
jnic
macrumors 6502a
 
Join Date: Oct 2008
Location: Cambridge
I suppose technically you could; Objective-C is a "strict superset" of C, meaning that any C you write will compile quite happily.

However, by doing so you're basically shooting yourself in the foot. For the most part it's a very simple addition, and if you know C already then you'll have no trouble. Also, in order to have access to the SDK libraries (i.e. to actually do anything) you're going to need to use Objective-C.

Here's a very nice (and short) primer on Objective-C: http://www.cocoadevcentral.com/d/learn_objectivec/
jnic is offline   0 Reply With Quote
Old Nov 12, 2008, 01:32 PM   #3
PowerFullMac
Thread Starter
macrumors 68040
 
PowerFullMac's Avatar
 
Join Date: Oct 2006
OK then, well I am learning C now simply because it will allow me to do a lot. After learning it I will read the Objective-C one, if its really that simple theres no problem.

Success and riches here I come
PowerFullMac is offline   0 Reply With Quote
Old Nov 12, 2008, 01:37 PM   #4
firewood
macrumors 603
 
Join Date: Jul 2003
Location: Silicon Valley
Quote:
Originally Posted by PowerFullMac View Post
...Or is it only Objective-C?
Objective-C is a wrapper (translator and object runtime) around C. You can write most of an app in plain C, but can only interface with the iPhone UI using Cocoa, which can only be called using Obj-C. In the general case, you can't get any user input except that which is sent to an Obj-C object, and can't do any display drawing except when an Obj-C object is called. The rest of the app can be written in C if you want.

I have some apps which are almost all C, except for a few files which do the Cocoa UI glue.

.
firewood is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
iPhone 5s Crashed. 75% apps missing including stock apps jck1634 iPhone 15 Feb 13, 2014 10:36 AM
HELP- Want to learn how to code ios apps /create iphone apps jaalle iPhone/iPad Programming 12 Jan 28, 2014 12:35 AM
iPhone Apps and iPad Mini Apps ryan101 iPhone 0 Jul 2, 2013 03:38 AM
iPad Mini: Does the mini use iPhone apps or iPad apps? skidbubble iPad 3 Nov 3, 2012 04:21 PM

Forum Jump

All times are GMT -5. The time now is 05:03 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC