Can I use an Uno Cross-Platform Library within a UWP app? - uno-platform

I've created an Uno cross-platform library that includes a few different Uno controls.
Is it possible to use this library within a UWP project?

Assuming you've used cross-platform APIs (eg from Windows.UI.Xaml.* namespaces) and haven't used platform-specific APIs, then yes you can reference this library from a UWP project, as you would any other library.

Related

Can a console app make use of UWP assemblies?

Can a .NET Core console app make use of classes in UWP assemblies?
I am only interested in those that do not involve visual elements.
No, a .NET Core app cannot directly reference an assembly that targets the Universal Windows Platform (UWP, uap10.0) if that's what you are asking.
So if you for example have a class library that was created using the Class Library (Universal Windows) template in Visual Studio, this project is not compatible with any other platform than UWP and cannot be referenced from a .NET Core app/project.
If you need to share code between UWP and other platforms, such as .NET Core, your class library should target .NET Standard instead of UWP.

Managing nuget packages for .net standard xamarin forms project

I am converting xamarin forms pcl to .net standard. In the project I use skia sharp and azure mobileservices.
My understanding was that if I reference these libraries in the .net standard class library and then add a reference to this .net standard class library in my android/ios/uwp projects all would be fine.
However it seems that I need to add the nuget packages for skiasharp and azure mobileservices to each project (android/ios/uwp). Is this indeed the case? if so, how is this better than using PCL?
I got the android project working, but I needed to add all the nuget packages to the android project.
I got the uwp project working without any nuget packages, which confuses me even further.
Using PCL and .NET Standard are basically the same - both are just API contracts or a subset of the full .NET Framework. But there is a MAJOR advantage to .NET Standard: .NET Standard has far more APIs - especially if you are using 1.3+ (netstandard1.3 has the System.IO APIs which aren't available in PCL).
With regards to NuGets, you typically still need to reference the NuGet package in all the app projects because some platforms have different implementations to take advantage of platform features. Think of .NET Standard as a subset of all the platform APIs - this is why SkiaSharp works just fine for some platforms. However, Android and iOS have a different implementation to take advantage of platform features.
Although you aren't doing Android development directly (since you are using Xamarin.Forms) you wouldn't have noticed something. If you JUST include the .NET Standard package, you get the basic SkiaSharp that can, for example, convert between a Xamarin.Forms color and a SkiaSharp color. However as a result of including the package in the android app, you can additionally convert from an Android color to a SkiaSharp color.
Personally, I always include all the NuGets into the app projects just to be safe.
Here are some docs that may help you:
https://learn.microsoft.com/en-us/dotnet/standard/net-standard

Xamarin Cross platform AES Encryption

Is there any library available that can be used in the PCL that target iOS, Android, and Windows Phone 8 application using Xamarin, for implementing AES 256 encryption.
In .NET Standard 1.3 you can now do aes encryption/decryption and hashing https://xamarinhelp.com/cryptography-in-xamarin-forms/
Have a look at this link.
The author has the same problem and came up with these alternatives:
PCL Contrib
Bouncy Castle PCL
PCL Crypto
He also gives another workaround;
The other work-around is to use some dependency injection with
platform-specific code in each platform library and using it in common
projects. Xamarin forms provide a minimum depedency feature using
DependencyService. The only issue here is writing platform-specific
code and it is time consuming.
For more information on the DependencyService check out the Xamarin documentation.

Is porting QML based app easy to Windows Phone?

On the qt-project web-site there're available sources as for porting QML to iOS, Android.
http://qt-project.org/doc/qt-5/portingtoandroid.html
http://qt-project.org/doc/qt-5/porting-to-ios.html
It appears to be easy.
Is it so for Windows Phone as well?
Is it so for any other platform?
Qt Project has a Qt for WinRT tutorial providing a step-by-step process to build applications for Windows 8 based devices. Basically to resume the tutorial :
You need the appropriate windows runtime
You may have to build Qt from source for that runtime library
You develop and compile Qt as you would do for a desktop app
You have an additional step for packaging the application.

Is it possible to use C library in Flex?

I am trying to make an SIP based application running on Adobe AIR using Flex. Can I use the PJSIP library written in C for my Flex project?
Yes, you can by using AIR native extensions. Quoting the introduction:
Native Extensions for Adobe AIR are code libraries that contain native code wrapped with an ActionScript API. You can use native extensions in an AIR application to access platform features not supported by AIR, to benefit from native-code-level performance for critical algorithms, and to reuse existing native code libraries.

Resources