We’ve been successfully using the ACRCloud iOS SDK in our iOS app. You simply download it, add their XCFramework to your project, and add the following to your bridging header:
#import "ACRCloudConfig.h"
#import “ACRCloudRecognition.h"
We now need to move our code that uses ACRCloud into a framework. I am getting an error though. This is what I did:
class TestClass {
var acrClient: ACRCloudRecognition?
}
Result: I get the following errors:
/Users/Admin/Downloads/MyFramework/MyFramework/MyFramework.h:19:9: Include of non-modular header inside framework module 'MyFramework': '/Users/Admin/Library/Developer/Xcode/DerivedData/MyFramework-gcmepfcyafmmyugjhujjgyybneuo/Build/Products/Debug-iphonesimulator/include/ACRCloudRecognition.h’
Could not build Objective-C module ‘MyFramework'
I confirmed that the MyFramework.h file is in Build Phases > Headers > Public (nothing is in Project). I also tried changing Allow Non-modular Includes In Framework Modules to Yes. What is needed to make this work? Thanks!
The folks at ACRCloud got this working. Here's what I had to do:
#import "ACRCloudConfig.h"
#import "ACRCloudRecognition.h"
You should now be able to build the framework without error and use ACRCloudRecognition without issue.