Where is the difference between Xamarin.Mac and Mono:OSX - c#

Where is the difference between Xamarin.Mac and Mono:OSX. I know Xamarin bought Mono so I thought it should be the same. But Mono:OSX seems to be free, while Xamarin.Mac costs at least 399$. So where is the difference between them both?
Xamarin.Mac -> http://xamarin.com/mac
Mono:OSX -> http://www.mono-project.com/Mono:OSX

The following is an excerpt from an article at xamarin.com (http://docs.xamarin.com/mac/guides Jan 1, 2013) which answers your question.
What are the differences between MonoMac and Xamarin.Mac?
Xamarin.Mac is built on the open source MonoMac project. Xamarin.Mac is being developed by the maintainers of MonoMac, though contributions are continuing to flow to MonoMac as well.
Xamarin.Mac has these additional features:
A commercial license to the Mono Runtime
Bindings to new frameworks
Creates self-contained application bundles, without external dependencies on Mono.
These are described in detail in the following sections.
Bindings to New Frameworks
The following are new frameworks and APIs that are included in Xamarin.Mac:
CoreBluetooth
GameKit
New MountainLion AppKit APIs
SceneKit
StoreKit
Commercial License to the Mono Runtime
Xamarin.Mac also comes with commercial support from the Xamarin team, and the Xamarin.Mac product has a published roadmap of forthcoming features.
The Mono runtime license is a commercial license that allows developers to redistribute their Mono-based applications without being bound by the terms of the GNU LGPL v2. This allows you to publish both to the Apple App Store as well as distributing applications that embed the Mono runtime without having to provide source code or object files for end users to relink.
Creating Self-contained Application Bundles
Xamarin.Mac extends MonoMac by allowing developers to ship an application bundle that includes both their software as well as the required pieces of the Mono runtime, without requiring your users to fetch the Mono runtime on their own and install it separately on their systems.
This feature is used for AppStore deployments as well.

I am not from Xamarin, so below is only my own understanding,
Xamarin.Mac is based on Mono:OSX. It is not something that comes from middle of nowhere.
Xamarin.Mac provides streamlined experience of developing Mac applications, by integrating MonoDevelop, Mono core runtime, MonoMac, and probably some non-open-source addins/utilities. It is easier to use Xamarin.Mac than assembling the whole tool chain on your own.
Xamarin.Mac comes with support contracts. This can attract professional Mac developers, and enterprises, as they need support contracts to ensure their own products' supportability.
Anyway we can sign up the seminar and learn what it is,
http://resources.xamarin.com/intro-to-xamarin.mac.html
BTW, the statement "Xamarin bought Mono" is not that accurate. The proper terms can be found in this blog post by Miguel de Icaza,
http://tirania.org/blog/archive/2011/Jul-18.html

Xam.Mac fills many of the gaps missing from Mono on OSX.
There's bindings to the native OSX APIs for Notifications, for example.
The BIG win for us was a FileSysteWatcher that uses OSX FSEvents. It's awesome.
It also features an OSX compatible version of NetworkAvailability. Mono only has support for Linux/Windows

Related

Xamarin - Compile AOT in Community edition?

I wanted to obfuscate my application, but I couldn't find a free obfuscator for commercial use. I saw that mono supports AOT compilation, so is there a was to compile my app ahead of time using the community version of Xamarin?
If not: is there a free obfuscator for C#(xamarin) for commercial use?
NOTE:
I'm targeting Android
I want to clarify the licensing restrictions that come with Dotfuscator Community Edition (CE). UUioP writes "I know about Dotfuscator, but I was actually looking for a free obfuscator for commercial use." Dotfuscator CE most certainly comes with license restrictions that preclude most commercial use scenarios, but there is one exception (granted - it is a very narrow exception, but one that might work for some). Dotfuscator CE can be used to release commercial software if the code being obfuscated is written and owned by the Dotfuscator CE user. In other words, if you develop your own app (and it's your app - not your employer's), you can use Dotfuscator CE to obfuscate your app - even if it is for sale or other "commercial/production" use. See (Re) Introducing Dotfuscator CE - the licensing terms are explained towards the end of the post.
The AOT Compilation option requires an Enterprise license or higher. AOT compilation is available only when the project is configured for Release mode, and it is disabled by default.
Source: https://developer.xamarin.com/guides/android/deployment,_testing,_and_metrics/publishing_an_application/part_1_-_preparing_an_application_for_release/#AOT_Compilation
As for obfuscation, Xamarin.Android does not support obfuscation out of the box. You will need to use a third party obfuscation tool like Dotfuscator. They have a tutorial on this here.
Many people think Proguard will obfuscate their code in a Xamarin.Android project, but it only works on the Java end.
The Xamarin.Android ProGuard configuration does not obfuscate the APK, and it is not possible to enable obfuscation through ProGuard, even with custom configuration files. If you wish to use obfuscation, please see Application Protection with Dotfuscator.
Source:
https://developer.xamarin.com/guides/android/deployment,_testing,_and_metrics/publishing_an_application/part_1_-_preparing_an_application_for_release/#ProGuard
AOT in Xamarin:
It depends whether you are targeting Android or iOS.
As #Jon Douglas states in his answer, Android AOT in Xamarin is unfortunately currently limited to Enterprise licenses. (tip: You can test out this Enterprise feature using a limited-time Enterprise license trial.)
iOS AOT in Xamarin, on the other hand, is part of every iOS build, so you get it with the Community license for free. Note however, that the full .Net assemblies are still included in iOS release builds, so that defeats the purpose of AOT "obfuscation" in iOS. :/
Obfuscation:
ConfuserEx is a great .Net open-source obfuscator with an MIT License:
https://github.com/yck1509/ConfuserEx/
I still haven't tested ConfuserEx end-to-end in a Xamarin app, but it looks promising so far... (Beware, as many people point out, ConfuserEx is a little "confusing" to use...)

Can a C# program be cross-platform?

I'm a newbie to programming, and I'm considering using C# to write a VERY simple program that simply edits a text file.
Will it work on Macs and Linux? What will work?
I want to know what makes a program cross-platform?
C# can be compiled for and ran on multiple platforms (Windows, Linux, macOS) by using .NET Core.
Previously, cross-platform development using C# could only be done by using Mono which is a third-party implementation however it is now recommended to use .NET Core as it is developed by Microsoft.
Now C# is fully cross platform and has variety of frameworks and run times.
Java is a language + framework. But C# is just a modern language. C# language features are very powerful, easy to learn. No confusion between framework and language.
C# can be used in following frameworks
.Net core (Multi platform supports Linux, Windows and Mac), mostly used to develop restful services, web applications and enterprise systems
.Net Framework (Windows only), Same as .net core, but has more windows only features
Unity - One of most used game engine to develop games for PC, Sony, Xbox devices etc..
Xamarin - To develop native Mobile apps (Android, IOS, Mac)
.Net standard - Create a library in .net standard use in all above applications
Java - Code once, Ship same file to all platforms
C++, C, Rust - Code once, Compile for specific platform
C# - It is just a language, pick your framework according to requirement.
Most popular applications like Chrome, Firefox uses C++, Rust and they are compiled for each platform. But still they share the majority of code between these platforms. Some games use C++ to share the code between IOS and Android.
For new developers its good to start with NodeJS and C#. Both are easy and can do any type of applications.
It's hard to answer something like that to somebody, which states that he just starts programming, but I'll try to give you an (somewhat simplified) overview: C# is a language, which is compiled into an executable program. The language itself is portable between plattforms, as long as you have a compiler on each target plattform. On Windows you have the "default" .Net implementation and on Linux/Mac you have Mono. To do something useful - like editing files - you have to use some libraries. There is a standard library which is available on each plattform. As long as you use only that functionality, your program will be cross plattform. Obviously is will not be cross plattform, as soon as you use some library specific to a certain plattform. Editing files is part of the standard library, so you can implement such simple tools in a cross plattform way. When choosing a book, you should look for books which focus on the "raw" language and not on Visual Studio or other specific tools.
A new open source release from Microsoft called CoreCLR is cross-platform and can now be used for this
The CoreCLR repo contains the complete runtime implementation for .NET Core. It includes RyuJIT, the .NET GC, native interop and many other components. It is cross-platform, with multiple OS and CPU ports in progress.
-from the CoreCLR repo
I would not recommend c# as the top choice for multiplatform coding. I would recommend python instead it is very easy to run even as a script and works perfectly on all platforms. If you insist on c# be prepared to deal with the same problem explained by Justin Ethier. Python on the other hand, is the same for all platforms, it is super powerful fast and even has wrappers ready to connect to other languages.
C# is cross-platform thanks to .NET Core, but without a cross-platform User Interface library you can only make very basic console programs with it. In order to make cross-platform apps for Windows, Mac and Linux you need a cross-platform User Interface library like Nevron Open Vision
Yes, C# is fully cross-platform thanks to .NET Core.
.NET Core is a free and open-source, managed computer software framework for Windows, Linux, and macOS operating systems. It is the cross-platform successor to the .NET Framework which only run on Windows. The project is primarily developed and supported by Microsoft (through the .NET Foundation).
C# is cross platform and you can run your program in Windows/Linux and Mac. For Linux, though, you need to run it using mono

How to port a Mono GTK# app to other platforms?

I am working on a Mono GTK# desktop app written in C#. I have developed my app using the MonoDevelop IDE (v2.4.2) on a Mac (OS X v10.6.7). My app depends on the GTK# library (obviously) as well as the Mono.WebServer2 library for running a local ASP.NET server.
I have tested my app on my own Mac as well as other Macs. Everything is working out great. Now, I am interested in porting my app to other platforms (specifically, Windows 7 and Ubuntu v11.04). I have been playing around with the mkbundle command but I haven't had any luck in creating a working bundle for other platforms than Mac OS X.
Since I have tried a number of different solutions without success, I would like to hear from the Mono developers out there. What do you do to port your app to other platforms?
I have been developing C# using Visual Studio for a long time but I am new to the Mono development environment. Therefore, I would very much appreciate a detailed explanation.
Thank you very much!
It doesn't really sound like you're talking about porting, rather packaging. MonoDevelop's "Project/Create Package" function can create simple binary packages (zips etc) or source packages (source plus makefiles) but these are not the ideal form to distribute to most end-users. Some additional work is required to make a polished installer for each platform.
mkbundle bundles the Mono runtime into your app, therefore it creates binaries that are 100% platform-specific.
For Mac, the usual way to distribute an app is as an app bundle. MonoDevelop doesn't automate this for GTK# projects, but I explained how to do it on my blog.
For Ubuntu, you can distribute a zip of binaries and require that your users install Mono, GTK# and xsp. If you create a .deb package, you can embed these dependencies into the package manifest. MonoDevelop doesn't have any tools for creating deb/rpm linux packages, and I'm not familiar with the process myself.
For Windows, you can provide a zip of binaries and require that your users install .NET and GTK# for .NET. You could also create a msi installer and have it check for these prerequisites.
It sounds like you have already solved the problem of packaging for Mac.
On Ubuntu, you would want to create a .deb package that contains your app and requires other packages as dependencies (Mono, Mono.WebServer2, GTK#, GTK+, etc). The following link should get you started on building Ubuntu packages:
https://wiki.ubuntu.com/UbuntuDevelopment
For Windows, you probably already know how to build an installer if you have .NET experience. I would say that you would want to run your app on top of .NET instead of Mono. That is what the Mono team do themselves (for MonoDevelop as an example). Bring in the Mono specific bits like Mono.WebServer2 as part of your application.
Your biggest issue here will be that GTK# requires the GTK+ C libraries to be installed. Probably the easiest thing is to detect if GTK# is installed as part of the installer and ask your users to install GTK# if they need it. You are going to have to do the same detection for the .NET version you require anyway. You can get GTK# for Windows here.
I do not have great instructions for doing this but both the Banshee and MonoDevelop projects do it well. I would take a look at those projects as they will show you exactly what needs to be done.
https://github.com/mono/monodevelop
http://git.gnome.org/browse/banshee
EDIT:
I just recently realized that the code for the GTK# installer is on GitHub here.
There are is also packaging projects available in Monodevelop. you can use them.
I'm doubtful that mkbundle work well other than Linux.
Another option that open your project on other plateform (you can use Monodevelop) and build the project and use some other app to build package.
I just recently created deb package of my own .Net project written in MonoDevelop. From MonoDevelop I created a package with sources and makefiles (makefiles also generated by MonoDevelop) and then i used this guide>
http://www.webupd8.org/2010/01/how-to-create-deb-package-ubuntu-debian.html
to create deb package. Dependencies were mono-runtime and gtk-sharp2.

C# Compiler That Can Generate Linux ARM Executables

I've been looking for some C# compilers for Linux and after a long search I've encountered some projects that are very interesting:
Mono
DotGNU
But I haven't seen any approach on any of those to cross-compile applications to ARM Linux executables(arm-unknown-linux-gnu), so I want to know if there is any way to build ARM Linux executables using C# compilers like those or others.
Have you looked at the .NET Micro Framework?
The .NET Micro Framework is currently supported on ARM architecture processors (including ARM7 and ARM9) and on Analog Devices Blackfin. The Porting Kit is now available along with the source code as a free download under the Apache 2.0 license at the Microsoft Download Center..
And:
In February 2011, Novell posted a preview of the Mono 2.12 C# compiler, the first open source compiler for .NET Micro Framework.
Mono is capable of producing non JIT, native execution binaries for ARM. They integrated this into an SDK for the iPhone http://monotouch.net/ .

Is C# platform neutral?

Today I purchased C# 3.0 Pocket Reference (O'Reilly Publishers).
In that book in the first para of the first page it is given that "The C# language is
platform neutral, but it was written to work well with Microsoft .Net platform"
If I am not wrong, Platform Neutral mean that the softwares made from that language should run in all the OS(e.g.Mac, Windows,Linux etc.).
I know that this characteristic is being satisfied by Java but .Net has not yet been able to do that(Though MONO has made some progress in Linux).
Then what is the significance of that word "PLATFORM NEUTRAL" so far c# is concern?
Thanks in advance
The C#-language itself is platform neutral like C and C++ are - you can implement a compiler et al for it on any platform.
The .Net platform and its associated libraries however, which it was designed to work well with, are not platform neutral in design - they are designed to work on windows, although Mono does compensate somewhat for that.
If you would write a C# program without using any features of any .Net-library it is guaranteed to be platform-independent - you can be sure it will run on any platform that has tools for C#... you just won't have a particularly useful program though ;)
C#, the language, is platform neutral.
But the frameworks usually associated with C#, the dotNEt environment, are not. They run on Microsoft's OS-es.
Mono enables C# on many other (mostly unix-oid) platforms by providing the necessary runtime environment, but it doesn't come with (all) the frameworks needed to run typical C# programs.
Don't forget you can use C# in:
MS .NET (Windows)
.NET Compact Framework (PocketPC, XBox 360)
Silverlight (Windows, Mac)
Moonlight (Mono / Linux)
MonoTouch (iPhone)
MonoDevelop (various including android)
Micro Framework (some watches etc)
Not exactly bad coverage. The language has very few requirements on the runtime / OS.
C# is platform neutral in the sense of OS (i.e., OS neutral) if you count Mono as a reliable runtime on Linux.
But, C# and .Net can run as it is, without recompilation, on both 32 and 64 bit machine. I guess this is the meaning of the author.
In this case, platform neutral is defined as "being able to run on any machine that has a compatible virtual machine". Depending on what language features and compiler you use, C# could be considered able to run on machines running recent versions of Windows, Mac OS and Linux.
C# the language can be implemented on any platform which has a compatible compiler and virtual machine. The language itself has an ECMA standard for implementation, and thus does not itself contain any platform (i.e. Microsoft) specific language elements.
Before answering the question, one must consider that any language these days is useless without its libraries. That said many namespaces that make up part of are windows only. Many are just wrappers around microsoft technologies, like com, win forms, etc.
All things considered just take a look at the adjustments mono has made to provide alternatives to dot net. Miguel has mentioned many times that they hope Silverlight will win rather than other ui toolkits because it is truely platform independent rather than wpf and winforms etc.
If you want a true multi platform language and environment look at Java.
In my view, Microsoft's claim that C# is platform neutral (repeated by the text you are quoting from) is disingenuous.
It is technically correct, but in practice the limited portability of C# applications to non-MS operating systems has happened despite Microsoft rather than because of them. It is pretty clear that Microsoft has no intention of supporting C# / .Net on any non-MS operating system. Indeed, many people think that Microsoft (via its patent licensing deal with Novell) is using C# / Mono as a "wedge" to damage the GNU / Linux ecosystem.
IMO, anyone thinking of using Mono needs to consider: 1) the risks to their project if MS decides to play hardball about .NET patents, and 2) the damage they might be doing to the open-source ecosystem as a result.

Categories

Resources