Closed gillima closed 8 years ago
Please, remove your changes to lib\Platform.cs
, to just have changes in lib\Platform.cs
, the new Win32Exception
...
Please try my current changes using git pull zeromq master
, building and compiling the project...
For example, I'm now redirecting libversion_delegate
to libversion__Internal
method and also Platform.LoadUnmanagedLibraryDelegate
to Platform.__Internal.LoadUnmanagedLibrary
.
This is now trying IsMonoTouch
to have Kind == __Internal
.
I wonder what Platform.Kind
you have on your iOS...?
Does MonoTouch also run on Android?
MonoTouch
is iOS only, MonoDroid
is for Android. Xamarin has changed the namespaces some time ago. The iOS stuff is now located in 'Xamarin.iOS, the Android classes are in
Xamarin.Android`. You can take a look at https://developer.xamarin.com/api/ to get a overview.
Will inform you about Platform.Kind tomorrow.
On iPhone 5 with iOS9 i get the follwing: Platform: Unix, PEKinds: ILOnly, Architecture: I386 This is the output of the following code:
ImageFileMachine architecture;
PortableExecutableKinds peKinds;
typeof(object).Module.GetPEKind(out peKinds, out architecture);
Console.WriteLine("Platform: {0}, PortableExecutableKinds: {1}, Architecture: {2}", Environment.OSVersion.Platform, peKinds, architecture);
YEAH, I only fixed the iOS detection and clrzmq4 just created a dealer socket using curve encryption on our iPhone 6!!! Already did a PR for the detection stuff... Hope it' get's in. Many thanks for the great improvements!
YEAH... So you say iPhones are and Androids may be running ZeroMQ? That sounds nice... :)
Tested with iPhone5 and iPhone6, iOS8 and iOS9 using a dealer socket with curve encryption that connects to a linux router socket... So yes, this works fine. Android may run, but I can't test.
:+1:
I need to know what Platform.Kind
and Platform.Name
you get in the static Platform()
constructor, just before SetupImplementation(typeof(Platform))
...
It should be PlatformKind.__Internal
but may also be PlatformKind.Posix
... Do you have the output of the above something likeConsole.WriteLine
and also
Console.WriteLine("Kind: {0}, Name: {1}", Platform.Kind, Platform.Name)
?
I want Platform.Kind
to be PlatformKind.__Internal
or PlatformKind.Posix
,
and Platform.Name
to be PlatformName.Android
or PlatformName.iOS
and the like...
The
Internal
implementation of classPlatform
is overwritten inSetupPlatformImplementation
withPosix
because platform name has higher priority. The platformPosix
is needed for theZPollItems
implementation. Therefore I changed the priority in case ofInternal
.