0

How to include dependencies in a sharpie binding command? I need to bind a framework made in swift 4 with sdk iphoneos11.4 that includes a reference to another framework to move to a C# app in Xamarin with a native reference(examples: https://learn.microsoft.com/en-us/xamarin/ios/platform/embedded-frameworks?tabs=vsmac |||| https://medium.com/@Flash3001/binding-swift-libraries-xamarin-ios-ff32adbc7c76). Now there is an error like cannot find a module(the another framework), so it creates wrong or incomplete ApiDefinition and Structs classes.

I'm trying to use this command: sharpie bind -sdk iphoneos11.4 NAME-Swift.h.

Also get this error: "Unsupported clang availability platform 'bridgeos'".

Thanks for the answers.

Arturo
  • 39
  • 10
  • First get an updated version of sharpie to fix the Unsupported error as the version that you have does not match the xcode version that is installed and retry: https://github.com/xamarin/xamarin-macios/issues/3941#issuecomment-387648827 Also you can pass all the additional clang options that you need for a clean build (i.e. the missing libraries/frameworks) by using the `-clang` option after the `bind` cmd – SushiHangover Jul 27 '18 at 10:59
  • Thank you so much for your answer, but can you show me an example SUshi?? I mean, i'm trying to do this command: sharpie bind -sdk /path/*.h -clang /dependencyframeworkpath/*.h and i get this error: unable to handle compilation, expected exactly one comiler job. Clang failed to parse input and exited with code 1. – Arturo Jul 27 '18 at 11:19
  • You can type `clang --help| grep framework` and `clang --help|grep library` to see the filtered list of options that you *might* need, but I do not know what you are trying to bind, its dependancies, what additional parameters are needed, etc... without all the details. – SushiHangover Jul 27 '18 at 11:25
  • I need to bind a framework made in swift 4.0 to C# in Xamarin with iphoneos11.4 sdk, that has a dependency of another framework made in iphoneos11.0 sdk. – Arturo Jul 27 '18 at 11:31

0 Answers0