Sharpie errors when binding native library

Hello,
I've been following the Binding Objective-C libraries tutorial in the docs (using the InfColorPicker project) and am receiving the following error when using sharpie to generate the ApiDefinition file:

System.Exception: Unsupported clang availability platform: 'bridgeos'

What steps can I take to resolve this error?

Xcode version: 9.3
iOS target: 11.3

Answers

  • philipcphilipc Member ✭✭

    Did you get an answer to this? Im having the same problem trying to bind a .framework ive created in xcode.

    sharpie bind -sdk iphoneos11.3 -output Bindings SuperFramework.framework/Headers/SuperFrameworkFramework-Swift.h -c -F. -v

  • jooleeanhjooleeanh Member

    Seems like Sharpie doesn't work on XCode 9.3.

    Solution:
    Downgrade to XCode 9.2 (can't post links but you can google "how-to-downgrade-xcode-to-previous-version")

    What I did:

    • downloaded XCode 9.2
    • created a copy of XCode 9.3 to my Documents folder (cmd-c cmd-v works, other ways might create an alias instead, takes a long time)
    • moved XCode 9.3 to the trash
    • moved XCode 9.2 to my Applications folder
    • restarted my computer
    • ran sharpie xcode -sdks
    • updated my sharpie bind ... command with the correct iphoneos.

    You might be able to simply rename XCode 9.3 to xcode(9.3).app to have the two applications side by side (9.2 being named xcode.app) but I don't want to restart my computer just to test that :neutral:

Sign In or Register to comment.