1

I want to use a C++ library (static/dynamic) on my Xamarin.Android and Xamarin.iOS project. Should the C++ library be static or dynamic in order to be used on both Xamarin.Android and Xamarin.iOS projects, as i'm thinking of using C# DLLimport/SWIG tool to use the C++ library as C#.

(I heard that iOS forbids the usage of dynamic libraries in the apps.) What can be the best approach for me?

Thanks!

2 Answers2

1

You are correct, iOS does not allow you to use dynamic libraries, so at least for iOS you must build the C++ library as a static library.

I believe both a static and a dynamic library work fine on Android, so there it doesn't matter which you choose.

Rolf Bjarne Kvinge
  • 19,253
  • 2
  • 42
  • 86
0

As soon as iOS8 has been released in September, you will be able to add support for iOS Embedded frameworks to all devices with a minimum deployment target of iOS8. In fact you can now add dynamic libraries when you target is not less than iOS8. Anyways there are some pitfalls, depicted here.

Community
  • 1
  • 1
loretoparisi
  • 15,724
  • 11
  • 102
  • 146