MonoTouch - has anyone used this?

2019-05-24 11:08发布

问题:

I'm a .NET developer trying to make the leap into objective-c iPhone programming. I created my first app - just a simple portfolio with multiple xibs.

I've just come across MonoTouch which lets you develop iPhone apps in C# or .NET. Has anyone tried this out? I'd be interested to know people opinions on it.

回答1:

I have been using it for 5 months now, and I have an app developed using it in the App Store ( http://escoz.com/quicklytics ), as well as a few internal projects deployed at a client.

Here's my point of view:

If you're a .NET developer, and want to develop for the iPhone, you'll need to learn two new things: Obj-C and the iPhone SDK. Both things are quite different from .NET, and it can be quite difficult to get going, specially if you have a deadline. In general, you'll end up getting stuff done, but mostly by copying-pasting a lot of random code from the web for months and months. Yeah, you may actually spend the time and learn it properly and not do that, but that will take a lot of time.

Using MonoTouch allows you to totally skip the first problem (obj-c) and helps tremendously with the second (sdk). After a couple of days reading and watching videos online you can already be fairly productive, using things you're familiar.

Yeah, it does cost at least $400.00, and if you're thinking about developing stuff for fun over the weekend, that may be a little expensive, but if you're thinking about writing code for work, this is a no brainer.. The amount of time that it'll save costs a lot more than the $400.00.

  • Size of apps: the apps will be larger (6-7Mb larger in average): nobody cares about it, honestly.
  • Speed: while technically it is possible to make obj-c apps that run a little faster than C#, in practice that simply doesn't happen: monotouch is as fast as obj-c for all purposes. Bugs: not having to deal with memory leaks all the time and having a higher language to develop in is a huge deal.

Even if in the end you want to pick up Obj-C, I would highly recommend you start with MonoTouch and get familiar with the APIs. The demo is available for free and allows you to do everything other than deploying to an iPhone. Only when you know how the API works move to Obj-C (if you still want to do it at the end).

One last point: if you're thinking about porting your apps to other mobile platforms, MonoTouch seems to be the platform to use right now: most of your code can be ported to the Windows Phone SDK, and Apple will release MonoDroid (MonoTouch for Android) in the next 5-6 months.. This really matters to me, maybe it also matters to you.



回答2:

Tried it, loved it.

Being able to re-use .NET knowledge is a definite plus (even though learning Obj-C is most definitely still encouraged.

The only downside is that the executables are larger than their respective Obj-C counterparts. That...and the cost associated with the license (if you're going to distribute your apps).



回答3:

I tried it.

If you think you're going to program many programs for iPhone, I think is better to learn Objective-C. But, if you have some big source code or existing programs written in C#, that MonoTouch may be the best solution for you!



回答4:

Rory Blyth addresses this very point in a very similar question:

Monotouch or Titanium for rapid application development on IPhone?



回答5:

Our whole dev shop moved from XCode and Objective-C to MonoTouch. Most of the team also have .NET C# skills.

We're about 2/3 more productive in our XMl/database-centric apps + web services . Monotouch has a lot of built in tools for those things.



回答6:

It's quite expensive, and you still need a Mac.. so if your idea was to stay in Windows and write iPhone apps using Visual Studio, you're out of luck sorry... At $399 as the lowest price, on top of the $99 for a developer license from Apple, I don't think it's worth it unless someone else is paying (eg, a corporation etc). You'd be better off sticking with Objective-C and Xcode, since you've already played with it.