From 98bbc15435ef38d1a6a8308a32bff7bdf1b297c6 Mon Sep 17 00:00:00 2001 From: Kazuki Sakamoto Date: Fri, 16 Dec 2016 00:06:49 -0800 Subject: [PATCH] Support Xamarin.iOS Summary: - `__Internal` https://developer.xamarin.com/guides/ios/advanced_topics/native_interop/#Static_Libraries > Since you can only use static libraries on iOS, there is no external shared library to link with, so the path parameter in the DllImport attribute needs to use the special name __Internal (note the double underscore characters at the start of the name) as opposed to the path name. - `__IOS__` https://developer.xamarin.com/guides/cross-platform/application_fundamentals/building_cross_platform_applications/part_4_-_platform_divergence_abstraction_divergent_implementation/#iOS > Xamarin.iOS defines __IOS__ which you can use to detect iOS devices. Closes https://github.com/facebook/yoga/pull/277 Reviewed By: emilsjolander Differential Revision: D4338420 Pulled By: splhack fbshipit-source-id: 375efecbaf88fffbba544073c6d6b30fb1f4c8ba --- csharp/Facebook.Yoga/Native.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/csharp/Facebook.Yoga/Native.cs b/csharp/Facebook.Yoga/Native.cs index 7786b8cf..9b1eb03d 100644 --- a/csharp/Facebook.Yoga/Native.cs +++ b/csharp/Facebook.Yoga/Native.cs @@ -14,7 +14,7 @@ namespace Facebook.Yoga { internal static class Native { -#if UNITY_IOS && !UNITY_EDITOR +#if (UNITY_IOS && !UNITY_EDITOR) || __IOS__ private const string DllName = "__Internal"; #else private const string DllName = "yoga";