Create dll from ios library - xamarin.ios

I have several libraries created in Xamarin IOS on mac (don't use Visual Studio). I want to create the libraries is in a Dlls of this project. How can i do it.

When building a ios library too release it will creates a dll in the bin folder

Related

What project type can reference .NET assemblies and can be referenced by an iOS Xamarin app

I'm looking for some help to setup my Visual Studio for Mac project properly. I'm new to Visual Studio Mac and would appreciate a shove down the right road.
I have a large class library, originally developed in visual studio 2017 on Windows.I'd like to use much of that code to develop an iOS application. This class library requires references to:
System
System.Runtime.Serialization
System.ServiceModel
System.ServiceModel.Web
System.Web.
I have tried porting that code to a Portable Class Library in Visual Studio for Mac. However PCLs don't allow you to reference the above assemblies (unless I'm missing something).
So I then ported it to .NET Library project (Other -> .NET -> Library) project. However, my iOS app won't allow references to that project type because VS for Mac says it has an "Incompatible Target Framework: .NETFramework, Version-v4.6.1).
What project type should I be using for this class library so that it can reference the needed .NET assemblies and it can be referenced from my iOS application?
Possible options:
Use a different Portable Class Library (PCL) profile.
Use a .NET Standard project.
Use a shared project.
For everything apart from System.Web, there are PCL profiles that have the assemblies you are looking for. You can see which assemblies are available on the Mac by looking in the PCL directory:
/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/xbuild-frameworks/.NETPortable
If you open a terminal window there you can run a search, find . -name "System.ServiceModel.Web.dll", or browse the folders using Finder to find a PCL profile that has the assemblies you need.
Another possibility would be to use a .NET Standard 2.0 project which has a lot of assemblies that can be used and supports being referenced by a Xamarin.iOS project. You may need to install some other System.* NuGet packages to provide the required assemblies.
The namespaces available in .NET Standard 2.0 are documented:
https://learn.microsoft.com/en-us/dotnet/api/?view=netstandard-2.0
Another option is using a shared project. This does not have assembly references itself but is basically shared code that is compiled into all projects that reference it. Here you can use #ifdefs for any code that is iOS or Android specific.

Add reference to CMake project in Android Studio

In my particular case, I implemented a cross platform project in C++11 that uses CMake. I initially designed this project to work on PC (Windows, Unix), but now I realized that I can use it on mobile platforms too, without re-implementing the business logic on every platform. The project uses standard libraries: Boost, Poco, OpenSSL, Protobuf.
After a few searches I came to conclusion that this is not even an usual mode to put together native and managed code in Android.
Is it possible to add reference in a Gradle project in Android Studio to a native project that uses CMake?
Can NDK adopt the project in a simple manner if I compile everything in command line (assuming I don't use Android Studio)?
If it is possible, is it recommended at all?
Is it possible to add reference in a Gradle project in Android Studio to a native project that uses CMake?
Since Google announced Android Studio 2.2 that comes with cmake plugin, so it's possible to reference CMake project to android project.
Can NDK adopt the project in a simple manner if I compile everything in command line (assuming I don't use Android Studio)?
In my experience, i compile NDK in separate way and then link the static/shared library (.so file) to be used in android project. I used NDK while developing PDF Reader using mupdf here
Hope this helps.
it would be possible with android studio 2.2, mainly the android plugin for gradle makes it possible. you could look at some examples in:
https://github.com/googlesamples/android-ndk/tree/master-cmake
android studio directly reads-in your cmake scripts -- there is nothing like desktop systems that generate project files for their native IDEs ( Visual Studio or XCode ); so you might have to modify your existing cmake files to eventually make it to work for android studio.
as long as you build to the correct APK, command line or IDE does not matter too much. If you intend to ship source code, having your project ready with an IDE would be attractive.
Please see CMaker_Boost, build the Boost with the CMake at a configure time. Now it is tested on the Linux and Android, gcc and clang. This can be included to the gradle project in the Android Studio. I hope this helps.

mfc110ud.dll required for Release version of MFC app

I have a very simple MFC application built in VS12. When I’m trying to install it on a Surface tablet (Win 8.1) I’m getting an error about mfc110ud.dll being missing. I looked up this dll and it says “MFCDLL Shared Library - Debug Version”. The problem is I’m building my app in Release mode. Why do I still depend on VS?
Use the linker /verbose Option to find the module or library that requires the DLL Version of the MFC.
See this particular post:
mfc110ud.dll is missing for vc++ project on visual Studio 2012
Potentially a duplicate (recompile with "Use of MFC" as "Use MFC in a static Library" when you compile)

How to link to a .so library in Visual Studio?

What I am trying to do is to link my project to a .so library that I have. Is it enough to add it in the Project Properties -> Linker, as I am doing with every static library (.lib), or is it another way to do it??
My project is an Win32 Console C++ Application.
You can't use Visual Studio to link to a .so file, because that's a Unix kind of shared library (and it will also be compiled for some Unix operating system). Visual Studio can only link for the Windows operating system. In this case, recompile your library to a windows .dll file.
http://en.wikipedia.org/wiki/Library_(computing)#File_naming

MvvmCross binaries for alpha/beta channel Xamarin?

I'd like to use MvvmCross with XS on a Mac, and running the beta channel (Xamarin.iOS 6.3 and Xamarin.Android 4.7). Is this currently possible at all? If so are there binaries available somewhere?
I am using the latest Xamarin.Android alpha, which among other things provide PCL support. However the Visual Studio plug-in does not allow for referencing PCL projects into Android project yet. In order to do this you need to manually edit the .csproj file or do it through Xamarin Studio.
You will need to recompile Mvx from source if you want it to work with the new PCL support. There are however some problems with Profile78 PCL's which result in Mvx Core projects not working, more about this in this thread and in this bugzilla report.
I didn't succeed to compile any PCL library, not only MvvmCross
(on Mono 3.0)

Resources