MvvmCross.Forms 5.4: How to setup UWP project? - xamarin

I started a new Xamarin project and installed the MvvmCross.Forms.StarterPack 5.4 NuGet. All of the projects were changed to support the MvvmCross framework except for the UWP project. What do I need to add to the UWP project so that it will build and run?

MvvmCross has a playground project setup for UWP, https://github.com/MvvmCross/MvvmCross/tree/develop/TestProjects/Playground/Playground.Forms.Uwp. Maybe you can follow it to set it up manually.

Related

How to use Xamarin in existing iOS or Android Project?

I have an iOS project written in Swift.
I want to launch Xamarin.Forms Views inside iOS Native Project.
How to do two way communication from iOS Native Project to Xamarin.Forms view?
is there any way to achieve this task?
Ex. I can achieve this task using Flutter Module.
https://github.com/flutter/flutter/wiki/Add-Flutter-to-existing-apps
https://medium.com/flutter-community/add-flutter-to-existing-android-ios-app-ae8c4fb1582e
How to achieve above using Xamarin?
You maybe can di that with the Embeddinator-4000 that creates native libraries of .NET libraries. https://github.com/mono/Embeddinator-4000
This can be done with Xamarin Forms Native Views

How to create xamarin android project targeting specific android version?

How to create android project targeting specific android version e.g. v5.0?
it seems when creating new project it is auto picking latest installed target sdk version
it seems they forgot to add those options
This is a part of Android manifest that is available as part of the project properties.

How to integrate Native ios and android sdk in Xamarin

I have to integrate one third party sdk in xamarin project.
They are providing the native sdk's for android and ios. I need to use them in Xamarin project to develop app for ios and android.
Xamarin offers in depth documentation for linking native libraries.
Linking native library iOS here and Binding a java Library here.
If you want to go further and use these sdk's in Xamarin.Forms you can make a wrapper in each platform dependent project and link them to your Forms project using Xamarin.Forms.DependencyService.
To use Firebase Crashlytics in your application follow the steps:
Install packages: Xamarin.firebase.iOS.Crashlytics and Xamarin.firebase.iOS.Core
Download GoogleService-Info.Plist file and add it to your project.
Set the build action as "Bundle Resource".
Build the project and run.

MvvmCross - 4.0 Beta 3 doesn't work with new UWP project?

I started a new Windows 10 UWP project today and used Nuget to add references for the beta version of MvvmCross. After adding references to MvvmCross and some HotTuna plugins (like StarterPack), all I get is the following:
I seem to be missing some stuff because I'm unable to inherit from MvxStorePage. Also, when I added HotTune to my Android project, a ToDo.txt file was added with instructions, but in the UWA project, I didn't get any of those extra files.
Am I doing something wrong?
I don't think you can inherit from MvxStorePage, because it doesn't exist in the namespace available to UWP project.
In UWP project, the Cirrious.MvvmCross.WindowsUWP namespace is used. You can check it in Visual Studio in "Class View (Ctrl + Shift + C)". And the only available view is MvxWindowsPage as below.
Based on the Universal Windows App tutorial on GitHub, the MvxWindowsPage is recommended to be used in universal app. Note that, the tutorial is for Universal Windows app for 8.1, but it's same to make it work in a win10 UWP app. Just change the namespace from Cirrious.MvvmCross.WindowsCommon.Views to Cirrious.MvvmCross.WindowsUWP.Views. By doing that, I didn't get any problem to inherit from MvxWindowsPage.

Can not compile after migrating unified api in xamarin forms

We have migrated the xamarin forms project to unified api.
But we have the strange compile error like this:
Could not AOT the assembly '.../iOS/obj/iPhone/Debug/mtouch-cache/Build/Xamarin.Forms.Labs.dll
So I changed the settings in iOS project's options.
In ios Build Tab of Project options(iOS) I changed the "don't link" to "Link all assemblies".
But the app is crashed when it is started.
xamarin version is 5.7.1(build 17).
xamarin forms's version is 1.3.5.6337.
xamarin forms labs's version is 1.0.1.5.
Please help me if you have the experience with this error.
Replace Xamarin.Forms.Labs with XLabs.Forms.
There has been a major refactoring on how the XLabs project is structured so your existing project based on the 1.x.x will break. The reason for the refactoring was simple; separate functionality that does not depend on Xamarin.Forms into different assemblies. This allows the use of functionality like IoC, Serialization and even platform specific services without referencing XF.
To upgrade:
Uninstall any existing Xamarin.Forms.Labs packages from your
project.
Install XLabs.Forms package to your projects (PCL, iOS, Droid & WP). This will update Xamarin.Forms to the latest stable release (1.4.x)
Refactor code to reference the correct namespaces.

Resources