Xamarin or Xamarin.Forms for Android and classic Windows? - windows

Is there a way to create a Xamarin or Xamarin.Forms solution that targets Android and classic Windows to produce a Windows 7,8,8.1,10 executable (exe)?
I am not interested in UWP.

Xamarin.Forms will support WPF in the future so you will be able to deploy an EXE file to those platforms. Read more about it here on the blog.
Also, you can always share the business logic, data and other layers with any other .NET application so having an Android app, Windows app and a core project that doesn't depend on Xamarin is perfectly fine.
You can already take a look at the WPF branch of the Xamarin.Forms project on GitHub.

Related

Move from Xamarin to native(Swift/Kotlin)?

We currently have an app in Xamarin, which is Xamarin.Android and Xamarin.iOS with a shared PCL (no Xamarin.Forms). It currently is a very complicated app and we would like to remake screen by screen the app, and move away from Xamarin to a Swift and a Kotlin app in the meantime.
Is this possible? We don't have the time nor money to remake the app completely at once.
I have looked into making new screens as external libraries, and then bind that library, but I think that's making it a bit too complicated.
you can reuse the assets and resources only but not the code because you are using Xamarin.Forms not Xamarin.Android + Xamarin.iOS.
in your project you don't have any android XML design files and no iOS storyboard even the logic is different with the .cs files because you are not using the Android Java SDK or iOS SDK directly.
If you were use mono and mono touch directly without using the PCL (Xamarin.Forms) project then you can rewrite the code with minor changes with names of method, properties... etc.

Visual Studio App Center Android Build Project not finding Solution Files

I am trying out the new Visual Studio App Center for a mobile app I am writing.
I have three solutions checked into VSTS Git. The first solution named App.sln is a master solution that has 2 solution folders, Apps and Services. The Apps folder has 3 projects App.csproj which is a .NET Standard 2.0 library containing the Xamarin Forms shared code. App.iOS.csproj is the Xamarin Forms iOS project. Finally, App.Droid.csproj is the Xamarin Forms Android project. The Services folder contains project files written in ASP.NET Core 2. The second solution is a solution named App.iOS.sln containing just the iOS and App library projects. The last is a solution named App.Droid.sln containing just the Android and App library projects.
In App Center I have 2 Apps configured per the instructions for Xamarin Forms apps. The first is an App configured as iOS Xamarin app. The second App is configured as Android Xamarin app.
I configured the analytics and crash reporting which works. I then configured the builds and this is where I have run into an issue. Specifically the Android build configuration project drop down only sees the App.Droid project. The iOS App build configuration project drop down sees all three solutions but only the App.iOS project. I selected the App.Droid and App.iOS projects. It seems to work. However I'm concerned that in the future things might break. I rather select the App.iOS and App.Droid solutions. That way I know that the correct projects are compiled and nothing not need is compiled. This is especially true since I am trying to stay within the free compile time budget until the MVP is done. Any ideas how to accomplish ensuring only the right projects are compiled?
According to App Center team (on Jan 30, 2018):
Unfortunately we do not support the selection of sln's with Android
Xamarin, currently solution file is only supported for iOS.

Is it possible to develop a desktop application, which will be supported in both Mac and Windows, using Xamarin in Visual Studio?

Our team would like to develop an application in Visual studio and Xamarin. The app needs to be supported in both Mac and Windows. We prefer Xamarin because the back end code can be shared. If possible, how to build and publish it so that it can be only installed in the machines. We are not planning to submit this app to the corresponding app stores.
You can write and Windows Application with C# using WinForms, WPF, WinRT (Windows Store apps).
Also you can write Mac application with C# using Xamarin.Mac.
To share the code between Windows App and Mac App, you just need to split your code into shareable Business Logic (part) and specific UI part.
To share the code, just use PCL libraries.
Yes.
The core business logic can be written in shared code usable on both platforms.
You have a couple of choices of how to develop the UI. You can use native or Xamarin Forms.
If you use native then I would suggest using the MVVM pattern with a framework like MvvmCross. You can then write the bulk of your app in shared code and just write the UI in platform-specific code, with the windows UI written as a standard windows WPF or UWP app, and the Mac app written using Xamarin.Mac using the native Mac API.
If you want to use Forms then you may have to compile the binaries yourself to get Mac support as it won't be available till roughly May 2017, but you could get started building a Forms app for UWP/Windows now and add the Mac project once it is available.

Xamarin: Can I do in a cross platform project the "Android part" and do IOS when the rest is finish?

I have a project in Android Studio (on a pc), and as far as I know now Microsoft owns Xamarin and its free once you have a Visual Studio license, then you can develop apps using C#(Already know that I have to port the JAVA code) and then compile in a MAC the IOS app.
My 2 concerns are:
When you can't compile, will the IDE show the IOS related errors?
There is a clear implementation of "cross platform code" vs "specific code"?
How Xamarin manage it?
In addition, our plan is to finish the app for Android which is our primary target and then manage the IOS, besides the other questions, what I need to know is if that is possible.
Yes, the VS IDE will show you build errors from the iOS build server.
Yes, you can build an Android app using Xamarin and later extend it to build an iOS app also. This is easiest if you use Xamarin Forms, but it also possible with native Android/iOS UI, but will be much more dependent on how you architect your applications.

Xamarin IDE and visualstudio for windows +Mvvmcross

I have some confusions About the IDE to use for MvvmCross
a) VisualStudio (VS) uses Xamrarin.iOS and Xamarin.Android plugin for iOS and Android development. But can we also use PCL(Portable Class libraries) and MVVMCross/Monocross frameworks in VS? I see the PCL option on VS but, i don't see the support for Android & iOS. Do i need to install additional plugin for PCL to support these two platforms as well?
b) Xamarin IDE supports Android and iOS development on Mac but, is it true that Xamarin doesn't support Mono.iOS on windows? Isn't it strange that Visual studio can use the network mac for iOS development but why not Xamarin Studio?
Thank You for your time.
Regards,
Saurav
a) VisualStudio (VS) uses Xamrarin.iOS and Xamarin.Android plugin for iOS and Android development. But can we also use PCL(Portable Class libraries) and MVVMCross/Monocross frameworks in VS? I see the PCL option on VS but, i don't see the support for Android & iOS. Do i need to install additional plugin for PCL to support these two platforms as well?
MvvmCross currently uses Profile104 for Portable Class Library development. You can easily develop for this profile without installing Android and iOS. The mapping of PCL profile to platforms is, however, quite confusing (it's not exactly obvious) so the easiest way I find to create a Profile104 PCL is:
to create any PCL
then to manually edit the csproj file to say Profile104 - look for a line like: https://github.com/slodge/MvvmCross-Tutorials/blob/master/Babel/Babel.Core/Babel.Core.csproj#L14 in the csproj
I have customers who develop in medium size teams where only some people have the Xamarin tools installed - most people have just Windows tools and work on the PCLs using Unit Tests and using WindowsPhone/Store user interfaces.
b) Xamarin IDE supports Android and iOS development on Mac but, is it true that Xamarin doesn't support Mono.iOS on windows?
Yes, this is true.
Isn't it strange that Visual studio can use the network mac for iOS development but why not Xamarin Studio?
This may feel strange, but I believe this is actually this is Xamarin listening to their customers.
I believe, that the reason customers wanted Windows support for iOS was because they wanted to use Visual Studio and they wanted to use plugins like Resharper. Xamarin provided this in their 2.0 release.
It is true that they could also have added iOS functionality to XamarinStudio for Windows as well - but this (I believe) wasn't what any of their customers were asking for - so adding it would have created more work (both in creating and maintaining it) without adding any significant benefit (IMO)

Resources