Live data from Hacker News

Your C# App on 66 Million Macs: Announcing Xamarin.Mac

blog.xamarin.com

81–90 of 149 posts

Re: Your C# App on 66 Million Macs: Announcing Xamarin.Mac

#81

C#'s okay and all... But what's wrong with Objective C?

Managed languages are designed with a different set of goals than unmanaged languages. C#'s design goals were in general to reduce the number of bugs, help developers write better code, and maintain the code over the long term. It has evolved over the years to also adopt new programming techniques that have proved to be useful (generics, iterators, functional constructs, delayed-execution frameworks, Async programmin…

Can't wait to use C# 5 async in MonoTouch. I heard it's coming soon.

Re: Your C# App on 66 Million Macs: Announcing Xamarin.Mac

#82
post #77
post #44

Earlier quoted context omitted.

I used MonoTouch at work (where price was not an issue) to convert an existing project to iOS. Aside from some minor complaints about the editor, the experience was amazing. I had previously written a couple of iOS apps using the "native" toolset, and I would not go back if I had the choice. While I understand your pain (I would gladly fork over $100 as a lone developer/hobbyist for personal development, but can't ha…

Can you go into some issues with the editor?

Not the original commenter, but as someone who's done a lot of work with it: it lacks a lot of the features that I've come to expect from basically any modern IDE, but yet manages to crash twice as much as any other IDE I've ever used (and that includes Xcode).

Re: Your C# App on 66 Million Macs: Announcing Xamarin.Mac

#83
Interesting that Apple allows this, not just on Macs but on iOS devices. When Adobe wanted to cross-compile Flash for iOS, here is what Steve Jobs wrote:

"We know from painful experience that letting a third party layer of software come between the platform and the developer ultimately results in sub-standard apps and hinders the enhancement and progress of the platform. If developers grow dependent on third party development libraries and tools, they can only take advantage of platform enhancements if and when the third party chooses to adopt the new features. We cannot be at the mercy of a third party deciding if and when they will make our enhancements available to our developers.

"This becomes even worse if the third party is supplying a cross platform development tool. The third party may not adopt enhancements from one platform unless they are available on all of their supported platforms. Hence developers only have access to the lowest common denominator set of features. Again, we cannot accept an outcome where developers are blocked from using our innovations and enhancements because they are not available on our competitor’s platforms."

http://www.apple.com/hotnews/thoughts-on-flash/

FWIW, I've always thought this was an overly broad generalization.

Re: Your C# App on 66 Million Macs: Announcing Xamarin.Mac

#84
post #43

Cool stuff. Now how about running C# apps on the web? :)

You can also do javascript with it. I can't speak to it personally but friends have used Script# ( http://scriptsharp.com/ ) for client-side javascript with good results. Never heard of anyone attempting node.js with it... yet.

There are some C# to JS compilers, script# and JSIL for example, yeah. But none are officially supported by Xamarin. I was just curious why they focus on all possible platforms but the web.

Re: Your C# App on 66 Million Macs: Announcing Xamarin.Mac

#85
post #83

Interesting that Apple allows this, not just on Macs but on iOS devices. When Adobe wanted to cross-compile Flash for iOS, here is what Steve Jobs wrote: "We know from painful experience that letting a third party layer of software come between the platform and the developer ultimately results in sub-standard apps and hinders the enhancement and progress of the platform. If developers grow dependent on third party de…

You must have missed the part where Apple relented on that:

http://news.cnet.com/8301-30685_3-20015954-264.html

http://www.apple.com/pr/library/2010/09/09Statement-by-Apple...

"In particular, we are relaxing all restrictions on the development tools used to create iOS apps, as long as the resulting apps do not download any code. This should give developers the flexibility they want, while preserving the security we need."

(which is why I see so many Unity games on the App Store these days)

Re: Your C# App on 66 Million Macs: Announcing Xamarin.Mac

#86
post #61

I'm huge fan of Xamarin but somehow missing how is this different from MonoMac? For anyone who is thinking to start development of cross-platform GUI app in .NET, I encourage to check Eto project - https://github.com/picoe/eto

A few diferences: 1. Xamarin.Mac comes with a commercial license, so you can ship to the Mac App Store (not allowed under MonoMac's LGPL license). 2. Xamarin.Mac comes with commercial support. 3. Xamarin.Mac includes bindings for several new APIs, including CoreBluetooth, GameKit, StoreKit, SceneKit, and the new Mountain Lion AppKit classes. You can see a full list of differences here: http://docs.xamarin.com/mac/gui…

MonoMac appears to be ASL/X11. MacCore too. https://github.com/mono/monomac

The code is licensed under the terms of the open source Apache License version 2 or the MIT X11 license, at your own choice.

Also, the Mono wiki indicates you can already deploy to the App Store (which I've been looking at doing for a project): http://www.mono-project.com/MonoMacPackager

With the new release of the MonoMac add-in for MonoDevelop, you can easily turn your Mono application into a full Mac bundle, and you can also get a Mac installer for your application with all of the Mono dependencies bundled with it as well as creating Mac applications for distribution on the Apple Mac AppStore.

Is there something I'm missing?

Re: Your C# App on 66 Million Macs: Announcing Xamarin.Mac

#88
post #83

Interesting that Apple allows this, not just on Macs but on iOS devices. When Adobe wanted to cross-compile Flash for iOS, here is what Steve Jobs wrote: "We know from painful experience that letting a third party layer of software come between the platform and the developer ultimately results in sub-standard apps and hinders the enhancement and progress of the platform. If developers grow dependent on third party de…

While that may have been a general policy, I always just assumed that was Apple preventing Flash from becoming a part of the App Store ecosystem.

Re: Your C# App on 66 Million Macs: Announcing Xamarin.Mac

#89
My experience with MonoTouch has generally been very positive. Why I love MonoTouch:

- C# goodness, especially event handlers instead of overly verbose ObjC delegates

- It's fun to port ObjC loops to oneliners using LINQ and lambdas

- I prefer somewhat ugly MonoDevelop to pretty-but-very-odd Xcode

- I can reuse both C# and ObjC code, and ObjC code is straightforward to port, if needed

- Xamarin support is friendly and helpful

There are some things that annoyed me:

- Some generic-heavy C# code will crash the device due to AOT limitations—learned it the hard way

- MonoDevelop hangs for a few seconds after you switch from Xcode, even if you didn't change anything

- You need to make sure you _understand_ how MonoTouch GC works together with ObjC reference counting, or you'll get memory leaks

- You'll need to learn to use Instruments to find those memory leaks

- Debugger often freezes (should've reported this)

- Binaries can get heavy, but not too heavy

- Compilation is impossibly slow on Air, barely tolerable on Pro

- Lack of tooling for binding ObjC code—I wish I could just drop ObjC files and headers into a MonoTouch binding project instead of compiling it to fat binary first

But still, I'm glad we went with MonoTouch.

Re: Your C# App on 66 Million Macs: Announcing Xamarin.Mac

#90

My experience with MonoTouch has generally been very positive. Why I love MonoTouch: - C# goodness, especially event handlers instead of overly verbose ObjC delegates - It's fun to port ObjC loops to oneliners using LINQ and lambdas - I prefer somewhat ugly MonoDevelop to pretty-but-very-odd Xcode - I can reuse both C# and ObjC code, and ObjC code is straightforward to port, if needed - Xamarin support is friendly an…

    - You need to make sure you _understand_ how MonoTouch GC works together with ObjC reference counting, or you'll get memory leaks
    - You'll need to learn to use Instruments to find those memory leaks
Interesting, reading that makes it sound like a C# developer that wants to work with MonoTouch will have to verge off to learning at least some Objective C if they want to have shippable code. The coder side of me is always up for learning a new language but if shipping was my utmost concern I'd want to get right to coding in C# and let MonoTouch take care of the rest. That doesn't appear possible.

How much time do you think a C# developer with several years of experience would need to put into learning the ins and outs of ObjC memory management before their code could be considered close to production level?

Post reply on HN