Running ObjectSharpie agains a framework and getting errors about NSString

I have a framework that has dependencies on 3 other internal frameworks. I built the framework and then navigated to the output folder to run ObjectiveSharpie agains it. When I run ObjectiveSharpie against it, I get errors right away like this:

Parsing 1 header files...
In file included from /Users/jbernoudy/Library/Developer/Xcode/DerivedData/SampleApp-frvsrrwijfrubggslvronkravscv/Build/Products/Debug-iphoneos/MyLibrary.framework/Headers/MyLibrary.h:9:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:11:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccelerometer.h:8:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:8:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:492:1: error:
expected identifier or '('
@class NSString, Protocol;
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:494:9: error:
unknown type name 'NSString'
typedef NSString * NSExceptionName NS_EXTENSIBLE_STRING_ENUM;
^

I am targeting my top level .h file only in my ObjectiveSharpie command
sharpie bind -sdk iphoneos10.0 MyLibrary.framework/Headers/MyLibrary.h -scope MyLibrary.framework/Headers -c -F

Tagged:

Answers

  • Turns out I was missing part of my command, but even with it fixed to sharpie bind -sdk iphoneos10.0 MyLibrary.framework/Headers/MyLibrary.h -scope MyLibrary.framework/Headers -c -F . It only parses some of my headers, but returns no errors.

  • FranckyTangFranckyTang CNMember

    Hi,I have the same problem,do you work it out?

  • FranckyTangFranckyTang CNMember

    I find the way out.
    It must follow the path of framework after -F parameter.
    sharpie bind -sdk iphoneos10.0 MyLibrary.framework/Headers/MyLibrary.h -scope MyLibrary.framework/Headers -c -F MyLibrary.framework

Sign In or Register to comment.