Xamarin.Forms : how to install NGraphic package in UWP Project - xamarin

I have a Xamarin cross-platform project which contains an Android and an iOS app. Now I want add new UWP project, but there certain packages which are not compatible with UWP but are compitible with Android and IOS.
Packages like: NControl.dll, NGraphics.dll

At the time of my writing this answer, UWP is not supported for those packages; but there are open Pull Requests to add UWP support to both NControl & NGraphics:
NControl: https://github.com/chrfalch/NControl/pull/71
NGraphics: https://github.com/praeclarum/NGraphics/pull/63
As such, you can likely track these pull requests to get an idea of if & when that support is added. I cannot speculate on a timeframe or any certainty of whether or not these pull requests will be approved eventually; for example it is possible support could be added from other pull requests instead.

Related

How to use the Plugin.Storereview for requesting reviews on Appstore in Xamarin forms Application?

I am a beginner in Xamarin forms. I have installed the plugin
https://github.com/jamesmontemagno/StoreReviewPlugin
I haven't found any usage documents on how to initialize/ how to do the setup for using the plugin when i looked on the web.
How can I display the prompt to the user using this plugin?
I just did a test and you do not need any additional steps to use this plugin.
Install this plugin through manage nuget packages and the in your project:
Use the namespace:
using Plugin.StoreReview;
Use the method:
CrossStoreReview.Current.OpenStoreListing("appid");
You need to test with a real device instead of a simulator.
The Store Review Nuget plugin has been updated to v3 recently thanks to the new (August 2020) Android native Play Core library so that it displays an In-App Review on both iOS & Android:
https://devblogs.microsoft.com/xamarin/android-in-app-reviews/
So now, initializing and setup is a lot easier and you don't need to pass the appid anywhere, it will be shown directly in the app

how to ensure backward-compatibilty in a xamarin forms application?

How do i make sure my app can run on android devices below Lollipop( version 4.03 to 4.42). I watched a xamarin university video that says xamarin forms supports android version 4.03(ice-cream sandwich) and upwards. I also read about runtime checks and feel like this might be the answer to my problem, but how can i write runtime checks for android when basically all my ui and logic is contained in the PCL project?
The first thing to do is ensure you are using the Android AppCompat library. I think new projects use this by default now. If you have an older project that doesn't follow these instructions to update. This will allow your app including any Material Design look and feel to run on older versions of Android.
If you do things differently based on Android version, put the code for this in the Android project and use dependency service to call it.
Like this:
if (Android.OS.Build.VERSION.SdkInt >= Android.OS.BuildVersionCodes.Lollipop)
{
// level specific code here
}

Crashlytics for xamarin.mac application

is there any experience using Crashlytics reporting system for xamarin.mac application? I tried to create binding library, I got an exception :
"Native linking failed with error code 1"
I'm not sure how binding library will work. any experience?
Here's some info that may be of use:
Fabric Kits available to use with Xamarin:
Answers Crashlytics Digits For Xamarin.Forms, Xamarin.Android and
Xamarin.iOS.
For iOS, you need to create a application with the same bundle id on
XCode as the one on your Xamarin app. Then, use the Fabric Mac app to
add your app and complete the Kits on-boarding process.
For Android, you need to create a application with the same package
name on android studio as the one on your Xamarin app. Then, use the
Fabric Mac app to add your app and complete the Kits on-boarding
process.
After that, you can follow the instructions on
https://www.fabric.io/kits to configure your projects.
For crashlytics on android, there is a hidden configuration, you need
to add/update the build id using a string resource
<string
name="com.crashlytics.android.build_id">e9e6beb9c4284289ac68b9ab76a9ee56</string>
Or else you'll get a crash on startup.
There is a Sample available on Samples folder.
On iOS, Crashlytics shouldn't be used with Answers. Crashlytics
includes Answers, so you should use either.
Code is available on https://github.com/drungrin/Fabric.Sdk.Xamarin
Nuget packages are also published:
https://www.nuget.org/packages/Fabric/
https://www.nuget.org/packages/Answers/
https://www.nuget.org/packages/Crashlytics/
https://www.nuget.org/packages/Digits/
Source: https://forums.xamarin.com/discussion/68256/fabric-crashlytics-answers-and-digits-for-xamarin-forms-xamarin-android-and-xamarin-ios
Mike from Fabric here.
At this time Fabric does not have support for Xamarin based projects. If that changes, I'll update my answer!
a more detailed instruction following the same answer as #CMash answer could be found here

Using the Nativescript platform-specific project

To my understanding, Nativescript takes the javascript (or typescript) + nativescript code and creates project files for both android and ios in order to be able to run them as native apps. I also know that these files all seem to be located in the Resources directory. However when I try to run a simulator from the xcode project that is created, it fails.
I don't want to know how to fix the simulator failure, I just want to know if it's possible for a swift developer to take the xcode project created by Nativescript and continue developing as a regular native app.
If so, is this possible with the android project as well?
Please check this out
https://www.nativescript.org/blog/using-nativescript-in-an-existing-native-ios-android-applications
The two articles explain in detail how you can embed the NativeScript runtimes in native Objective-C and Android applications.

Is it possible to perform Sqlite sync via Azure Mobile Services completely within Xamarin Forms iOS PCL project

After spending two straight days chasing the answer, I have to fall back and just ask:
Is it possible to perform Sqlite sync via Azure Mobile Services completely within Xamarin Forms iOS PCL project?
Any examples I have looked at (including those that claim that their emphasis is on PCL) all end up instantiating the MobileServicesClient within the Native iOS part of the solution, as well as performing the Sqlite sync via Azure Mobile Services within the native project as well.
My goal is to have a Xamarin.Forms solution, which relies on a Sqlite / Azure Mobile Services sync for all of its data and its offline needs. Such solution would not have to have any additional platform specific code, beside what is generated by the project template.
Furthermore, I intent on using Syncfusion Xamarin charts library, which only works within Xamarin.Forms project. The idea is to have Syncfusion chart source its data from the local Sqlite db, which, in turn, is periodically auto-refreshed using Azure Mobile Services Sqlite sync.
I think, that if I had to do all if the data sync business within my platform specific project, then I may not be able to use this Syncfusion Forms-only library.
Is it actually possible to do the Sqlite / Azure sync completely within the bounds of the PCL?
-Eugene
Yes, you can do so. Check out the book - http://aka.ms/zumobook - particularly Chapter 3. In addition, check out the underlying repo (link in the book) - there are several example setups of Xamarin Forms with Offline Sync in SQLite in there. The Chapter3 sample is a good place to start.
I'm able to use them with my project with removing Silverlight optins from my PCL project because of some System.Web methods are not available with it.
On PCL:
Microsoft.IdentityModel.Clients.ActiveDirectory
Newtonsoft.Json
SQLite.Net
SQLite.Net.Async
On iOS Project:
Microsoft.IdentityModel.Clients.ActiveDirectory, Version=3.1.0.0
Microsoft.IdentityModel.Clients.ActiveDirectory.Platform
Newtonsoft.Json
SQLite.Net
SQLite.Net.Platform.XamarinIOS.Unified

Resources