I have an app developed using Xamarin.iOS that i would like to port to Windows 10. I have read that is possible to use Windows Bridge to port app developed using Objective-C (WinObjC provides support for iOS API) to Windows 10 using WinObj project.
It's possible to do the same with a project written in C# using Xamarin.iOS?
If you're working with Xamarin.iOS you need to forget WinObjC. WinObjC is a bridge to write native windows apps using Objective-C. Since you're using C# you can write the interface using XAML and share your business logic between the apps easily.
The WinObjC project is a bridge of Cocoa Touch, not a port, and it's real Objective-C. You would have to convert your C# code to Objective-C by hand, yes. Eventually you'll be able to use (mostly) the same source code on iOS and Windows!
Using the Windows Bridge for iOS to bring your Xamarin.iOS App to Windows is not working. This only works with Full Objective-C Projects. Anyways you will be able to build your Windows App on top of Xamarin.iOS very fast when you have encapsulated it correctly. Then you just need to rebuild the UI and maybe implement some interfaces :)
WinObjC is the Windows Bridge for iOS (previously known as ‘Project Islandwood’).
Windows Bridge for iOS (also referred to as WinObjC) is a Microsoft open source project that provides an Objective-C development environment for Visual Studio/Windows.
In addition, WinObjC provides support for iOS API compatibility.
The bridge is available to the open-source community now in its current state.
The iOS bridge as an open-source project under the MIT license. Given the ambition of the project, making it easy for iOS developers to build and run apps on Windows. Salmaan Ahmed has an in-depth post on the Windows Bridge for iOS http://blogs.windows.com/buildingapps/2015/08/06/windows-bridge-for-ios-lets-open-this-up/ discussing the compiler, runtime, IDE integration, and what the bridge is and isn’t. Best of all, the source code for the iOS bridge is live on GitHub right now.
The iOS bridge supports both Windows 8.1 and Windows 10 apps built for x86 and x64 processor architectures, and soon we will add compiler optimizations and support for ARM, which adds mobile support.
Related
I've developed a WinForms application with C# in Visual Studio on Windows and I need a version for macOS but I don't know which way is the best.
I also have a Mac machine so don't have problems about the compiler: I already used VS2017 with integrated Xamarin to develop an iOS app using my mac as the required build server but didn't find any such method for developing a Mac desktop application. NET core only works with console application and even Visual Studio for Mac is different from Visual Studio for Windows and doesn't provide any visual designer. Am I forced to redo the whole application using an Apple product?
There are multiple solutions to building desktop apps targeting a Mac using .NET.
Mono is an alternative implementation of the .NET Framework that reimplements the underlying Windows API calls that Win Forms makes. It's probably the most straightfoward way to port an existing Win Forms app to Mac.
ElectronNET is a combination of Electron and .NET. Electron provides a desktop development framework combining a Chromium rendering engine with NodeJS. It's best if you have a lot of familiarity with web development. It's notable that major companies that want to build cross platform apps are using Electron (Visual Studio Code, Slack, Atom etc) so those with the time to invest in researching how to do a cross platform app seem to choose this option.
Avalonia is a .NET desktop framework that is inspired by WPF, but it's cross platform.
So no, you aren't forced to redo your application. Hopefully you've done a good job of separating UI logic from business logic, which will make using one of these other technologies easier.
Note that even though .NET Core 3 (which is cross platform) has support for Win Forms and WPF, that functionality will only be working on Windows. Win Forms still depends on the underlying Windows APIs, and WPF still depends on DirectX.
I have a complex Android app which now needs to run on UWP.
I figured that I'll have to re-write and re-design most of it but I'm wondering if there's any way whatsoever that I can at least port some of it into .NET so that I have a starting point?
Microsoft has been working on converting Android and iOS to UWP directly just like Desktop Bridge. And currently Windows Bridge for iOS has been used. It is a Microsoft open-source project that provides an Objective-C development environment for Visual Studio and support for iOS APIs. You could refer Move from iOS to UWP for more detail. And Microsoft also provide Windows Bridge for Android. However, it has not finished.
Is it possible to develop and build Linux applications with Xamarin with the same code base?
After a few years with Ubuntu, my main OS right now is Windows again. But it's not impossible that I could switch to Mac.
Right now I have a bit of experience with Qt and no experience with Xamarin.
With Qt you can develop on Windows, Linux, and Mac and for Windows, Linux, Mac, iOS, Android, Windows Mobile, ... They are pretty clear about that.
Since Xamarin is free and open source now and I still don't have much experience in Qt, I'm considering trying out Xamarin for cross platform development instead of Qt.
Not being able to release my software for Linux would be a deal breaker for me. Being able to develop on Linux would be nice, but is optional.
But after all my Google research, I could only find information and people asking for support to develop on Linux and not for Linux.
As far as I know, this shouldn't be a problem with Mono alone. But as far as I know Xamarin > Mono and I don't get everything in Mono I could get in Xamarin.
I'm also not sure how well-supported Mono will be in the future. For me it looks like Xamarin is much more important for Microsoft than Mono itself.
I'm not sure if it's even possible, since Xamarin is based on Mono, but is it possible that Microsoft will at some point decide not to support Mono with .NET compatibility in the same way as Xamarin, or even cancel Mono as standalone completely?
So I'm looking for one single framework for all desktop and mobile platforms I can rely on, and I want to know if Xamarin and/or Mono and and/or Xamarin + Mono could be an alternative to Qt before I go deeper into any of those solutions.
Just in case someone else comes accross this q/a: the situation has changed. With Xamarin.Forms 3.0, Gtk# is supported (as preview, at this moment). Therefore, full Linux GUI support is enabled.
So, Xamarin now covers:
Android
iOS
UWP apps
WPF apps
Linux Gtk desktop applications
Mac OS
Watch OS
tv OS
Tizen
The only thing left to wish for: JS/HTML5 Web App target platform, as part of Xamarin :)
No, Xamarin is not available for Linux. This was a conscious decision made by the Xamarin team several years ago:
Miguel de Icaza 2011-08-04 11:52:37 UTC
We face a QA problem here.
The problem with supporting Linux is that we would need to create a
self-contained Mono packaging for all of the bits we ship since most
Linux distributions are slightly off when it comes to Mono.
It also means that if we advertise "Linux" we would need to QA a dozen
different combination due to different Linux distributions and
different editions of each distribution.
Perhaps we would support just a single distribution and a single
version, which is closer to what we have to do on Windows/Mac today.
To clarify, the Xamarin product range is not available on Linux (Xamarin Studio, Xamarin.iOS and Xamarin.Android) but MonoDevelop, the foundation of Xamarin Studio, and Mono, the cross-platform .NET runtime, definitely is.
You can build desktop software using MonoDevelop. The MonoDevelop site has plenty of instructions on getting started:
Install MonoDevelop on Linux
Seems that there is a chance of Xamarin Forms work on linux distros. In this reddit thread Miguel de Icaza says:
Some of our team members actually develop in Linux. The reason why we
never released the Linux tools is because we were charging a lot of
money and people would rightfully expect the software to be fully
supported. We had enough keeping our Mac and Windows users happy, and
adding an unknown number of Linux distributions sounded like a hard
task. Now that we are open sourcing the SDKs and I no longer will feel
bad if something does not work under a particular Linux configuration,
I will be happy to release the Linux builds.
That is: the fact that Forms is an open source tool currently opens this possibility.
Yes, as of mid-2018, it is possible to develop cross platform GUI applications that target windows/mac/linux/android/ios using the "Xamarin.Forms" library. Basically, you have one shared library project from cross platform code (UI and other cross platform stuff), and one project per platform for platform-specific code (Xamarin.Forms have one backend implementation for each platform. On Linux, this is using GTK).
However, with MonoDevelop you can only develop/build the cross-platform project and the linux-specific project of the application. You will still need to use Visual Studio or Rider to develop/build for the other platforms.
See the following answer:
https://stackoverflow.com/a/53317021/298005
https://github.com/0xFireball/xamarin-android-linux
As matthewrdev said, Xamarin.Studio, Xamarin.iOS, and Xamarin.Android aren't "officially" supported; however, Xamarin.iOS uses virtual emulator anyway (and I don't think there will be a workaround for Xamarin.iOS to run on Linux), but for Xamarin Studio (MonoDevelop on Linux, or Jetbrain's Riders (how to run it on linux with no official support is also provided in the link) Can run on Linux as an alt for Xamarin.Studio, and that link I shared explains how to install Xamarin.Android on linux, so just for Xamarin.iOS you will need to migrate or dual boot or sth, I hope that helps! (I stopped using Xamarin my-self, however, this environment helps developing for Xamarin on linux!)
GTK is listed as one of supported platforms/backends for Xamarin.Forms which allows building apps for Linux (as well as macOS and Windows via same GTK project). Though it doesn't look like there was much of development since 2018/2019 and Xamarin.Forms 3.0. Tried running 2 apps with basic UI and compared GTK backedn on Windows/macOS (comparing to WPF and Xamarin.mac back-ends ) and found GTK not worth pursuing (basic scenarios failing).
You can track GTK progress at https://github.com/jsuarezruiz/forms-gtk-progress/blob/master/Status.md
On Ubuntu 20.04, you can run your ASP.Net MVC 5 application using XSP4. Open a console to where you installed your MVC applications, where all folders, Global.asax, Web.config, ... are and run "xsp4 --port 80" or any other port you like and available. XSP4 is an independent web server and does not need Apache to be run.
Also, for C# developers, even the MonoDevelop is not in Ubuntu 20.04, which I don't know why, you can still install it and debug your ASP.Net MVC application. You can also debug any WinForm and console application using the MonoDevelop. YOu can run all your application using mono too.
I'm writing a universal app by using windows 10, visual studio 2015 and C#. I would like to run this app on windows, Linux and mac. I know mono doesn't implements windows presentation framework, so, if I write a WPF app it runs onluy on windows. Now, if I write a universal app, can mono run that? If yes, how?
The holy grail .Net UI question :-)
TL;DR Answer = No.
Universal Windows Platform (UWP) core APIs (also known as Windows Runtime / WinRT) and the resulting APPX based applications only target Windows 10 platforms (Phone, PC, Tablet...) as those APIs and runtime do not exist on the other desktops.
Using Xamarin/Mono you could reuse a portion of the C# app's 'business' level logic but the presentation layer and GUI logic would have to be re-written using a different GUI (Native Widgets, GTK#, QTSharp, HTML/CSS/NodeJs, etc...). Same model that people have been using Xamarin for C# based mobile development applies, share your C# app logic across platforms and use Xamarin.Mac to build a native OS-X UI, and/or build a UI using GTK#, embed your app's runtime logic into a Electron/Blink shell, etc..
Currently the Windows 10 for Apache Cordova project which is HTML, JavaScript, and CSS, only targets Mobile (WinPhone, iOS, Android) and Windows 10 PC/Tablet platforms. That is not to say someone could not develop a new Cordova target to include OS-X and Linux desktop manager support (but I do not know of any that have not already stalled) :-/
Even Microsoft's xplat-based Visual Studio Code for Linux and OS-X uses Electron (Chromium based) to deploy the io.js based application along with the Blink layout engine to render the UI, all done in HTML/CSS/JS.
Is there a way to write iphone and android apps using visual studio and c#? Also if I make a phone app can I easily write it for android, iphone, and windows without havong to write it in 3 different languages?
xamarine is another approach. You can create both Android and iPhone/iPad apps.
MonoTouch
MonoTouch allows developers to create
C# and .NET based applications that
run on Apple's iPhone, iPad, and iPod
Touch devices
MonoDroid
MonoDroid is a development stack for
using C# and core .NET APIs to develop
Android-based applications.
XNATouch
MonoGame is a free implementation of
the XNA Framework for MonoTouch,
MonoDroid and Mac OS X.
Although Visual Studio is really good for Windows and Windows Phone development, it won't help you with Android or iPhone development by itself. And C# being from Microsoft, it's got good support for Windows, and then lesser support through avenues such as Mono. That being said, C# and .NET are open specifications so it is possible to see them on non-Microsoft products such as an Android phone.
That means there are opportunities for using an engine that has been designed as multiplatform. If you're making games, then you can use a platform such as Unity 3D. Unity can be programmed using Visual Studio and scripted using C#. It's also free for personal programming, but the iPhone version does cost money.
Along those same lines, Adobe makes Adobe® Device Central CS5 software. It's programmed with Actionscript, not C#, but I think they are very similar methods of programming. CS5 can be used for both iPhone and Android.
Nokia's QT supports a lot of platforms, including Mac and Windows, Symbian and Linux. There's a port for Android called Necessitas. However, I don't think there's support for iPhone just now.
The main question consideration then is whether you will be happy with your final product. The programming language or engine that you use has a certain influence on how well you achieve your goals.
If you're making a game and know C# already, you might consider Unity although there is a bit of learning involved. I do know that some game studios are using Unity for their games. Check out AirAttack, Startrooper and Batching, as well as the games on this thread: http://forum.unity3d.com/threads/14591-Unity-iPhone-Apps-in-the-Store-List-Yours-Here/page39.
PS: even if you're programming Unity on a Windows computer, at the end of the day to publish on the iPhone you would need to have a Mac and an iPhone SDK installed on it. So technically the answer is yes, you can write iphone apps using visual studio and c#. But to get them into the store and onto an iPhone, you need to perform some steps outside the Visual Studio development environment.
Just to add to the list:
UmbrellaSDK
http://www.umbrellasdk.com
Web development tool for creating portable apps for iPhone as well as Android. You can publish apps to the App Store or Google Play since the apps can be packaged as native on each platform.
DragonFireSDK
http://www.dragonfiresdk.com
Allows iPhone development on Windows (using Visual C++, even Express editions) using C/C++. Apps are fully native and compiled on a Mac server and delivered to your device over the air.
Cheers!
Unfortunately, the short answer is no. But here are some resources that will help you out:
MonoTouch
MonoTouch allows you to build iPhone applications using C#. Unfortunately it is not free, and you need to run it on a Mac.
PhoneGap
PhoneGap lets you build cross-mobile-platform apps using HTML, CSS, and JavaScript. And it's free! No VisualStudio support.
Adobe Flash CS5
With some recent plugins Adobe Flash can now build and publish/package applications for Android and iPhone, as well as desktop applications.