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
This commit is contained in:
Kazuki Sakamoto
2016-12-16 00:06:49 -08:00
committed by Facebook Github Bot
parent 25b206ac53
commit 98bbc15435

View File

@@ -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";