I've got a static library, compiled for multiple architectures, included in a XCFramework.
It looks like this :
| framework_1.xcframework
|---- _CodeSignature
|---- Info.plist
|---- ios-arm64_arm64e
|---- Headers
|---- libframework.a
|---- ios-arm64_x86_64-simulator
|---- Headers
|---- libframework.a
|---- macos-arm64_arm64e_x86_64
|---- Headers
|---- libframework.a
I'm developing beside it an iOS framework, with a Podspec, looking like this :
Spec do |spec|
spec.information
spec.subspec 'XCFrameworkPod' do |xcframework|
xcframework.vendored_frameworks = 'path/to/framework_1.xcframework'
end
I've managed to include my headers, by specifying this :
xcframework.source_files = 'path/to/framework_1.xcframework/ios-arm64_x86_64-simulator/Headers/**/*.h'
This way, my headers are available in my project. But when I try to use one of them, it doesn't compile. I've the following error :
Include of non-modular header inside framework module: '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/clang/include/inttypes.h' Include of non-modular header inside framework module: '/Users/myuser/Library/Developer/Xcode/DerivedData/MyProject/Build/Products/Debug-iphonesimulator/XCFrameworkIntermediates/MyPod/XCFrameworkPod/Headers/header.h'
How to integrate correctly the xcframework & headers?
I've tried setting 'Clang allow non-modular headers', but it doesn't work in a Swift project.
Thanks for your help !