How do I get Objective Sharpie to recognize framework dependency header paths?

584 views Asked by At

I have created a framework with Xcode that will be used as a Swift native binding for a Xamarin iOS app. This framework has another framework dependency (GoogleMobileAds).

My xcodebuild steps for both arm64 and x86_64 are successful, but the Objective Sharpie step is failing with this error: /Projects/XamarinGadmBinding/XamarinGadmBinding.framework/Headers/XamarinGadmBinding-Swift.h:192:9: fatal error: module 'GoogleMobileAds' not found @import GoogleMobileAds;

The GoogleMobileAds header files are located in the path /Projects/XamarinGadmBinding/GoogleMobileAds.framework/Headers

How do I get Objective Sharpie to recognize the GoogleMobileAds.framework header path? As far as I can tell, you cannot pass multiple header paths in the sharpie bind --scope parameter.

If it helps, this is my sharpie bind call from the build script I created.

sharpie bind --sdk=iphoneos$IOS_SDK_VERSION --output="$XAM_OUTPUT_PATH/ApiDefinitions" --namespace="$NAMESPACE" --scope="./$PROJECT_NAME.framework/Headers/" "./$PROJECT_NAME.framework/Headers/$PROJECT_NAME-Swift.h" -v

1

There are 1 answers

0
Selvarathinam Vinoch On

You can use the * to indicate/include multiple headers. Sample code is below,

sharpie bind \
-sdk iphoneos15.5 \
./AppLovinSDK.framework/Headers/*.h \
-scope AppLovinSDK.framework/Headers \
-c -F .