Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MonoTouch & C# VS Objective C for iphone app

Greeting, I'm a C# programmer guy. I'm planning to start developing app for iphone but I'm not sure if I should use C# under MonoTouch or just use the native language for iphone OS Objective C.

Is there a different to program for iphone app using C# or Objective C?

Is there limitation using C# to program app for iphone or it can do as much as Objective C can do to develop iphone app?

like image 541
Eyla Avatar asked Apr 23 '10 05:04

Eyla


2 Answers

MonoTouch wraps most but not all of the iPhone SDK. So, yes there are things you can't do (yet), but they're relatively few and far between.

Many .Net folks find that they are more productive (at least initially) using MonoTouch, since they can leverage their existing skills. On the other hand, there's nothing like working in the native language of the land, it just takes a little longer. You will have to learn some Objective-C since most documentation out there in the world uses it (and/or C-level CoreFoundation APIs). Objective-C's dynamic nature will feel foreign at first, but you may find it quite liberating once you grok it fully. Having used many languages in my career, I find Objective-C (and the Cocoa APIs) one of the most pleasant development experiences out there.

like image 99
Barry Wark Avatar answered Nov 23 '22 00:11

Barry Wark


Here's a Monotouch developer's answer rather than some guess work from people skim reading blogs.

Have you bought the Monotouch license? If not then clearly objective-C would be preferred. If you have bought a license then it makes sense to develop the app in Monotouch because:

  • The domain and business logic can easily be ported for a Windows Mobile 7 app later this year
  • The same is also the case for Monodroid which is coming soon, and the API could easily be ported to Java too.
  • Controllers, Views and the whole Monotouch system bar static void main can be very easily converted to objective-C. The names are all identical but in Pascal case.

As far as apps being accepted - so far Apple have let Monotouch apps through. I'm not saying they won't suddenly say "NO! THOU SHALL USE OBJECTIVE-C" but for them to ban an SO iPhone client on a high profile site like Stackoverflow would be bad PR.

Apple use apps in their demos which break their own SDK (Tap Tap Revolution being one), and 1 in 10 of the appstore best selling games use a health portion of none-objective-C.

Monotouch is a direct mapping to Cocoa and UIKit. You need to have a mac to use the compiler and IDE. As far as I'm aware Flash had no such restrictions and its UI was a lot less strict in terms of forcing the common "widget" set like UINavigationController, UITabViewController, UIAlertView and so on.

like image 37
Chris S Avatar answered Nov 23 '22 01:11

Chris S