.swiftinterface'没有这样的模块在xcframework中
我一直在尝试从程序中构建XCFramework将C代码包装到SWIFT中,我需要它支持X86_64和ARM64 Archs用于MacOS。我已经成功地创建了一个.framework,将两个架构的两个二进制文件结合到单个通用脂肪文件中(如下所示),使用lipo -create -create -output
任何Xcode项目都可以在开箱即用,我可以将其导入并使用它而无需大量问题。
sebasmontero@Sebastians-MBP faspio % lipo -info _builds/apple-universal/FaspIO.framework/FaspIO
Architectures in the fat file: _builds/apple-universal/FaspIO.framework/FaspIO are: x86_64 arm64
当我尝试使用完全相同的Universal .FrameWork生成XCFramework时,问题开始时开始。我正在运行xcodebuild -create -xcframework -framework /myframework.framework -output myxcframework.xcframework.xcframework < /code < /code < /code < /code>,并且XCFRAMEWORK成功地生成了。当我尝试将其包含在XCode项目中时,我在.swiftinterface文件上获得了一个“无模块”,特别是在将我的C代码包装并将其映射到Swift的导入模块中。
.../FaspIO.framework/Modules/FaspIO.swiftmodule/arm64-apple-macos.swiftinterface:4:8: No such module 'CFaspIO'
感谢任何帮助或指示!
I've been trying to build an XCFramework from my program that wraps C code into Swift and I need it to support both x86_64 and arm64 archs for MacOS. I have succeeded in creating a .framework that combines the two binaries from both architectures into a single universal fat file (as you can see below) using lipo -create -output
and once I implement this .framework into any Xcode project, it works right out of the box and I'm able to import it and use it without major issue.
sebasmontero@Sebastians-MBP faspio % lipo -info _builds/apple-universal/FaspIO.framework/FaspIO
Architectures in the fat file: _builds/apple-universal/FaspIO.framework/FaspIO are: x86_64 arm64
The trouble begins when I try to generate an XCFramework using this exact same universal .framework. I'm running xcodebuild -create-xcframework -framework /myFramework.framework -output myXCFramework.xcframework
as you do normally and the XCFramework is generated successfully, but. when I try including it in an Xcode Project, I get a 'No such module' on the .swiftinterface file, specifically in the imported module that wraps my C code and maps it into Swift.
.../FaspIO.framework/Modules/FaspIO.swiftmodule/arm64-apple-macos.swiftinterface:4:8: No such module 'CFaspIO'
I appreciate any help or pointers!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论