Closed gillima closed 8 years ago
Well that's okay, I just need to move the AppDomain.CurrentDomain.GetCurrentAssemblies()
into the static constructor, to not enumerate all the assemblies every time I need IsXamarinIOS...
Does this allow me to ask also for Xamarin.Android
? Also, what's the assembly name of the Xamarin.iOS
type?
The assembly name where the namespace
Xamarin.iOS
is located is Xamarin.iOS
(see my PR). There is no type Xamarin.iOS
...
You can also check the same way for Xamarin.Android
but I don't have a Xamarin licence to build for Android :-O. Also I don't know if it's really needed to link statically for Android, so I would not include this in the code until someone can test it...
AHA... Now try again!
YEAH :-) Works like a charm!
Notes for usage:
Native libraries
to the Xamarin projectZSocket.Bind
is not supported by iPhone (SecurityException from underlayer):+1:
Please beware that on Posix systems like iOS and ubuntu GNU/Linux, you must run sudo YourApp.exe
, because your application needs root access for the ports 1 - 1024...
So if you are using a port higher than 1024, does ZSocket.Bind
really not work on iOS?
Our port is >1024 - will check this later.
:+1:
Type.GetType()
is only working with full qualified type names including assembly etc. For types located in mscorlib the assembly name is not needed. See MSDN.The code will no check for the existens of the monotouch or Xamarin.iOS assemblies. Monotouch is the legacy API. Xamarin.iOS is for the new unified API that has been released with Xamarin.iOS 8.6. For more infos about the different API's see Xamarin