sharpie bind command gives error 'Foundation/Foundation.h' file not found

156 Views Asked by At

I'm trying to create a binding library for the GoogleMLKit/TextRecognition. For that first I created a Xcode project and installed the pods and tried to run sharpie bind command to generate ApiDefinitions.cs and Structs.cs. This is the command I used sharpie bind -sdk iphoneos -output ./ -namespace Xam.TextRecognition.iOS -scope ./MLKitTextRecognition.framework/Headers ./MLKitTextRecognition.framework/Headers/*.h. I get the following error on terminal

fatal error: 'Foundation/Foundation.h' file not found
#import <Foundation/Foundation.h>

How can I fix this?

1

There are 1 best solutions below

0
Eli On

I got the same issue with the sharpie bind command.

Provide the missing header files like this :

sharpie bind {pathToFramework}/Headers/Test.h -scope {pathToFramework}/Headers -c -F

The folder {pathToFramework}/Headers (in your case ./MLKitTextRecognition.framework/Headers) is the folder where you will put the header files missing, for example Foundation.h.

Find the file on your computer then paste it there.

Replace pathToFramework with your framework local path.