I'm wondering if I could develop a app using XCode, in a language other than Objective-C such as C, C# or C++. If so, how would I go about doing that? Is there anything special I have to use?
-
http://stackoverflow.com/questions/14803774/how-can-i-make-a-c-project-in-xcode – mwerschy May 05 '13 at 20:20
-
You can develop application with C or C++ using XCode, but not C# – Thang Do May 05 '13 at 20:20
4 Answers
You can definitely use C or C++, and there also exist a "glue" language for mixing C++ with Obj-C code, called Objective-C++.
Objective-C, Objective-C++, C and C++ are also all supported by the XCode IDE.
If you instead want to develop an iOS/OSX app in C#, you may consider Xamarin, but you cannot use XCode. You either have to use Xamarin Studio or Visual Studio.

- 106,943
- 21
- 217
- 235
-
Would I need to combine Objective-C and C++, or is there a way to use straight C++? – user2350763 May 05 '13 at 20:25
-
For iOS, there's going to need to be at least a little ObjC, though it can be wrapped in something else. For OSX it's not *technically* necessary, but is a very good idea, since the C GUI libraries are on their way out and unsupported in 64 bit. – Catfish_Man May 05 '13 at 20:27
-
My reason for asking it because I'm working on learning to develop apps and I'd like to do it in C or C++ because it will benefit me more in the future if I was to look for a programming job. Should I go straight Obj-C or actually work on figuring it out in C++? – user2350763 May 05 '13 at 20:34
-
1Objective-C is the language that is meant to be used. While developing apps in C or C++ may be an interesting exercise, it's very likely to be become rather cumbersome very quickly for anything more than basic stuff. – Gabriele Petronella May 05 '13 at 20:52
-
Note that all C code is also valid ObjC code; you're not giving up any aspect of C by using ObjC :) – Catfish_Man May 05 '13 at 20:56
-
Absolutely true, even though Obj-C exists to make your life easier. The awesome accepted answer to this question (http://stackoverflow.com/questions/10289890/how-to-write-ios-app-purely-in-c) shows pretty well why you don't wanna use pure C for app development. – Gabriele Petronella May 05 '13 at 20:59
-
@GabrielePetronella You have it all backwards! C is the future of iOS and Mac development! It *must* be used! – Richard J. Ross III May 12 '13 at 13:49
-
You can write code using the cross-platform Qt C++ frameworks in Xcode under OS X. See this question for more.
While it used not to be the case, currently you can practically use any language you want.
Objective-C is a superset of C, so you can employ plain C if you like. Also, Xcode can handle C++ and Objective-C++.
Apart from Xcode, there are many other tools that allow creating apps for iPhone. If you like C#, you can use Xamarin iOS. You can also use LUA with tools such as the Corona SDK. If you are into games, you can even use Unity 3D.

- 2,530
- 1
- 19
- 28
-
Okay, but if I wanted to develop a iOS game in XCode with C++, I'd need to use a game engine that supports C++ correct? Is there anything I'd have to change? – user2350763 May 05 '13 at 20:40
-
2@user2350763 - You can intermix C++ and Objective-C in the same application, and the standard development environment understands C++ just fine (at least to the extent that anyone/anything understands it). – Hot Licks May 05 '13 at 21:25
Keep in mind that the standard UI libraries for Mac and iOS are all in Objective-C. You can use another language but it's going to be significantly more difficult. If you insist on not using Objective-C as much as possible, then your best bet is to use Obj-C to interact with the standard libraries and another language for all of your program logic.

- 192
- 1