Wenfengcheng / xamarin-notes

xamarin journal
MIT License
3 stars 0 forks source link

sharpie pod bind error: framework requires SDK #25

Open Wenfengcheng opened 5 years ago

Wenfengcheng commented 5 years ago
Done. Exiting with error code 1.
error: InsertFramework: framework requires SDK 'iphonesimulator9.3' which is not installed. You may need a newer Xcode.

I had the same problem, and solved it with direct binding as @JavierHolcman indicates above, however to handle includes correctly you need to add a search path with the options:

-c -F.

Note the dot after the F option without intervening space: this indicates the current directory where you run sharpie from. This must be the directory that contains the (framework name).framework subdirectory. See @AaronBockover 's explanation here for more details.

This worked for me:

sharpie bind -sdk iphoneos9.3 -output Bindings SkypeForBusiness.framework/Headers/SkypeForBusiness.h -c -F. -v

I could not get any variation using the -framework option to work, even though editing the info.plist file in Xcode and changing the value of DTSDKName from iphonesimulator9.3 to iphoneos9.3 did solve the error message about the missing

$ sharpie bind \
    -sdk iphoneos8.1 \
    AdobeCreativeSDKFoundation.framework/Headers/AdobeCreativeSDKFoundation.h \
    -scope AdobeCreativeSDKFoundation.framework/Headers \
    -c -F .

https://docs.microsoft.com/en-us/xamarin/cross-platform/macios/binding/objective-sharpie/platform/native-frameworks https://forums.xamarin.com/discussion/69991/sharpie-pod-bind-error-framework-requires-sdk