Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the easiest way for a c# programmer to develop for i-Phone?

Tags:

c#

iphone

Should I use Mono + c#? Or I'm better off learning and using objective c? Thanks

like image 690
Nestor Avatar asked Oct 01 '09 19:10

Nestor


People also ask

What is the fastest way to cool a room with AC?

Keep the doors and windows closed when the AC is on. Avoid opening and closing the doors frequently to prevent the cool air from escaping the room. Prevent direct sunlight from entering the room. Use curtains, blinds and shades to keep the room cool.

What is the cheapest way to run your AC?

You can go cooler when you need to, but keeping your thermostat at 78 degrees will save energy while maintaining comfort. Every degree above 78 saves about 2 percent on your bill, while every degree below costs an extra 6 percent.


5 Answers

This will probably offend some but to be honest, if you are going to do any serious development, you should learn Objective-C. Not knowing Objective-C in iPhone development will just be a hindrance. You won't be able to understand many examples; you have to deal with the quirks of Mono whereas if you had a working knowledge of Objective-C you could get a lot more out of the platform documentation.

Personally, I don't understand the position that says increasing the amount of information you need in favor of using Mono over the platform's native language. It seems somewhat counterproductive to me. I think if this is a very expensive proposition (learning a new language) then it may be worthwhile spending some time on fundamental programming concepts so that learning new languages is a fairly cheap proposition.

like image 55
BobbyShaftoe Avatar answered Sep 29 '22 22:09

BobbyShaftoe


Have a look at MonoTouch.

like image 25
nitzmahone Avatar answered Sep 29 '22 22:09

nitzmahone


Monotouch is easier for you now. But harder later.

For example, what happens when new seeds come out you need to test against but break MonoTouch for some reason?

By sticking with Mono, any time you are looking up resources for frameworks you have to translate mentally into how you are going to use them with Mono. Your app binaries will be larger, your development time not that much faster after a few months into Objective-C, and other app developers will have that much more of an advantage over you because they are using the native platform.

Another consideration is that you are looking to use C# because you are more familiar with the language than Objective-C. But the vast majority of the learning curve for the iPhone is not Objective-C, it is the frameworks - which you will have to call into with C# as well.

For any platform, you should use the platform that directly expresses the design philosophy of that platform - on the iPhone, that is Objective-C. Think about this from the reverse angle, if a Linux developer used to programming in GTK wanted to write Windows apps would you seriously recommend that they not use C# and stick to GTK because it was "easier" for them to do so?

like image 20
Kendall Helmstetter Gelner Avatar answered Sep 30 '22 22:09

Kendall Helmstetter Gelner


If you want to be able to use all of the APIs of the iPhone and have access to native code debugging, you probably are going to want to learn Objective C.

There is, however, Mono-Touch which for a small price lets you develop iPhone apps using C# but lacks debugging support currently. There are also limitations on certain uses of generics and other high-end features. Here's a link to the limitations.

Also, to use Mono-Touch you still need Xcode and a Mac environment set up to develop for iPhone. And it goes without saying you need to join the Apple iPhone developer program if you're actually going to want to deploy anything to an actual device.

like image 39
LBushkin Avatar answered Sep 30 '22 22:09

LBushkin


This is going to be a bit of an opinion question but my take is that you're better off sticking with C#. Switching to objective-C is increasing the amount of new information you must learn before you can be productive in your environment.

Even keeping with C# you'll still have to ...

  • Learn the iPhone API
  • Learn the quirks of developing with the iPhone itself

There are some downsides to using C# though

  • Most iPhone samples will be in Objective-C. Because you don't know the language it will be harder to apply them to your problem set
  • There are bound to be little quirks in using static compilation in Mono that you'll need to get used to.

My intuition though is these will be minor compared to the cost of learning a new language.

EDIT

I wanted to clarify my thoughts on learning a new language. I think learning languages is fun and a necessary part of a programmers life. You should be at least experimenting with a new language once every year. This year I'm toying with F#.

The only reason I recomended against it for this question was the OP said "the easiest way ...". Learning a new language does require extra time and will take a bit more effort so I qualified it as easier to stick with C#.

like image 45
JaredPar Avatar answered Sep 29 '22 22:09

JaredPar