MvvmCross using Xamarin newly supported Async - xamarin.ios

Now Xamarin officialy supports the new C# 5 Async keywords async and await, how could we use them in an MvvmCross project using PCL and what do we need to reference/install (Task<>, what PCL profile etc.)
regards,
Arthur

Async/await is available in PCL's targeting .NET 4.5 and Windows Phone 8 and Windows Store projects. This means something like Profile78 could be useful.
However, if you need to target Windows Phone 7 you will need to work your way around the licensing issues that come with using Microsoft.BCL, as it is only allowed to use that on Microsoft platforms. There is Async Bridge from this years Build conference, by Daniel Plaisted, which could help. I've had it working in my Xamarin projects.

Related

Can WPF applications be run in Linux or Mac with .Net Core 3?

Microsoft announced .NET Core 3 comes with WPF and Windows Forms. So can I create a desktop application for Linux or Mac using .NET Core 3?
No, they have clearly stated that these are windows only. In one of the .NET Core 3.0 discussions, they have also clarified that they do not intend to make these features cross-platform in the future since the whole concept is derived from windows specific features. They talked about thinking of a whole new idea for cross-platform applications, which is not easy.
Source: https://youtu.be/HNLZQeu05BY
Update
The newly announced .NET 5 now aims in avoiding all this confusion by no longer calling it ".NET Core".
Update 2
With blazor client-side (releases on may, 2020), there is a new experimental project for cross-platform apps using webview that is in the works.
Source:
https://blog.stevensanderson.com/2019/11/01/exploring-lighter-alternatives-to-electron-for-hosting-a-blazor-desktop-app/
No with WPF or Winforms. But you still can develop desktop apps on Linux, with .NET Core, using other libs like GtkSharp or Avalonia
Well, the name itself says Windows Presentation Foundation. So it's primarily windows based.
But it is worth to be noted that the new UI framework, .NET MAUI that will be shipped with .NET 6 is cross-platform, with a single-codebase, single-project structure.
Currently in Preview at the time of writing, to be shipped in November 2021. Here's the roadmap.
Although it is not native dotnet core on linux, but it may be helpful - using wine.
I find a very useful comment in the discussion here, more details here
In other words, it is possible to use windows version of dotnet core under wine.
I didn't try it yet, but from the article I mentioned I can say it looks nice and might be an option.

xamarin.forms integration of zendesk chat

I am new to Xamarin development. And, currently I want to integrate the zendesk chat.
As per my RnD and after contacting Zendesk support center they are not supporting the xamarin yet.
Currently they have sdk for native android and ios respectively.
I need you expertize people's guidelines for the development regarding what scenario i should follow to achieve the same using xamarin.forms :
Integrate the both platforms native sdk's for xamarin in each platform and later call it from Xamarin.Forms by adding platform dependency using Device.OnPlatforms . ( I am not sure about this scenario, please suggest)
Create a jar/aar of Zendesk SDK and use it using binding library concept.( I am not sure it will be accessible into ios platform)
Kindly, suggest me the best approach for this.
Any sample reference for suggestions will be grateful.
Thanks in advance.
I think it's a mix of number 1 and number 2 (and a little extra).
You will need to create the Binding libraries for both iOS and Android. Xamarin has a good documentation of how to do this: Android/Java and IOS/Objective-C
Then you can go either with Xamarin Native (Xamarin.iOS and Xamarin.Android projects) adding the binding to each project. Or you can go with Xamarin.Forms but this will require a little more work as you will need to create an interface of the methods you want to use from the SDKs (most likely all off them) and create the implementations for each platform.
Let's say your interface is called: ISendeskSdkService you will need at least two implementations: ISendeskSdkServiceiOS and ISendeskSdkServiceDroid. These implementations will be on the Platform project and they will be calling the binding libraries you just created and added to each of these projects.
You will be developing your app on top of your interface and which implementation to use will be set on the application load when you are configuring your IoC.
Hope this gives you an idea.

Visioglobe map and Metaio AR with Xamarin

I want to use these tools with Xamarin
Visioglobe 3d maps
Metaio SDK for Augmented reality
they are working well with native android and iOS apps.
And I would like to know if we can use these tools with Xamarin, Does xamarin support them?
And how to integrate a Xamarin app with them.
[DISCLAIMER] I'm an engineer at Visioglobe.
You've probably moved on already, but I'll reply anyway in case someone else is interested.
To this date, there is no indication, either way, that Visioglobe's VisioMove SDK will work with the Xamarin platform.
If you have already chosen Visioglobe for your application's map, then I would suggest strongly to use the traditional IDE's to reduce any risk of potential conflicts.

Async/Await in portable class library targeting Windows Store, iOS and Droid

Developping an MvvmCross application targeting Android and iOS (Xamarin/Mono) and Windows Store (because it's so easy/fast to debug compared to iOS/Android).
The Core of the app is PCL based.
Is it possible to use Async/Await in the Core library?
Xamarin mono supports Async/Await, and Windows Store supports it.
However, when selecting only Net4.5, Windows Store, Mono Android and MonoTouch as the PCL targets, SL4 and WP7.5 get automatically selected and Async/Await is not availlable anymore.
The latest I have is: TPL on PCL of mvvmcross
But PCL support from Xamarin has officially launched in the last week - so the latest I have is be out of date. Miguel has promised a blog post on the current status when he returns from Build.
Also, I have seen user comments like "I'm using asyncbridge and profile47 with heavily usage of async inside PCL. Works perfect on iOs and Android, with MvvmCross events it looks like a magic" from http://forums.xamarin.com/discussion/comment/18872/#Comment_18872 - would love to see this more fully blogged, explained, documented by those who have it working.

Monotouch 5.0 and iOS 4.3 compatibility

I have got an application developed with Monotouch 4.0.7. This app is running on iPads with iOS 4.3.
Now, I want to migrate to the latest Monotouch version is 5.0. Will I be able to deploy my app on iPads with iOS 4.3? Or Monotouch 5.0 only for iOS 5.0?
Yes, it is possible to develop for iOS 4.3 (or even earlier iOS versions) with MonoTouch 5.0.
To set the minimum iOS version your app needs, go to the project's options, and in the iPhone Application page set Deployment Target to the minimum version.
Have in mind that MonoTouch will not tell you if you use iOS 5.0 API in your app. You can add iOS 5.0 features to your app, but you must not try to use those features on a lower version (here you can see how to accomplish this).
You can upgrade to Monotouch 5.x without any problems. In Monodevelop, change your SDK to 5.x
Just make sure your deployment target remains 4.3, if you still want to target that platform.
You will have to pay attention to not calling any methods that don't exist in 4.3.
If you want to have different/extended behavior on iOS 5 devices, you can check the OS version and use a different code branch.
Another small thing to be prepared for: iOS5 behaves differently in some situations. For instance if you are having hierarchical UIViewControllers, iOS5 will automatically call all UI events like ViewWillAppear(), even if you don't use the new UIViewControllery hierachy API.
What I want to say: test your app thoroughly on both iOS versions.

Resources