Support Xamarin.iOS #277

Closed
splhack wants to merge 1 commits from Xamarin.iOS into master
splhack commented 2016-12-07 20:05:41 -08:00 (Migrated from github.com)
  • __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.

- `__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.
emilsjolander commented 2016-12-15 02:35:45 -08:00 (Migrated from github.com)

This looks much simpler than https://github.com/facebook/yoga/pull/280 which has nearly the same title. Could you explain why there are so big differences?

This looks much simpler than https://github.com/facebook/yoga/pull/280 which has nearly the same title. Could you explain why there are so big differences?
splhack commented 2016-12-15 10:02:11 -08:00 (Migrated from github.com)
- #280 includes Objective-C YogaKit wrapper for C#, test app, and workaround patch for missing #282 - I intended to build Yoga native library as static library for Xamarin.iOS as well as Unity in this PR. Because Unity Mono doesn't have the capability to load dylib in iOS and I thought Xamarin.iOS was the same. But I was wrong. It can. https://developer.xamarin.com/guides/ios/advanced_topics/native_interop/#Accessing_C_Dylibs
splhack commented 2016-12-15 19:37:25 -08:00 (Migrated from github.com)

Apparently, using dylib with Xamarin.iOS is not an option. Reopen it.

Apparently, using dylib with Xamarin.iOS is not an option. Reopen it.
facebook-github-bot commented 2016-12-15 19:38:30 -08:00 (Migrated from github.com)

@splhack has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@splhack has imported this pull request. If you are a Facebook employee, you can view this diff [on Phabricator](https://phabricator.intern.facebook.com/D4338420).

Pull request closed

Sign in to join this conversation.
No description provided.