访问用XCFramework包裹的静态库
我们的静态库(*.A)包裹在第三方SDK分发的XCFramework中。附件是SDK目录结构和info.plist的屏幕截图。
我们的项目结构 - >主应用程序 - 子标记-SDK
现有集成与静态库。我们将SDK的标头文件导入了子项目的标题。
什么不起作用?
- 导入xcframework给出
否这样的模块$ framework
- 访问SDK内容提供
无法在范围中找到$ framework
- 预期的是导入不起作用。
到目前为止,我尝试了什么?
- 链接器标志
-OBJC -All_load
- 设置库&标题搜索路径 - 标头文件的路径有点棘手,目录名称
ios-arm64_armv7_armv7s
&ios-ARM64_I386_X86_64-SIMULATOR
- 为框架创建SPM Repo。
我能得到此工作的唯一方法是将.h
文件从xcframework复制到项目并更新子项目的标题文件。
那似乎是错误的。有什么想法我缺少什么?
” png“ alt =“ info.plist”>
We have Static library (*.a) wrapped in XCFramework distributed by a third-party SDK. Attached is screenshot of the SDK's directory structure and info.plist.
Our project structure -> Main App - SubProject - SDK
Existing integration was with static library. We had SDK's header file imported in sub-project's headers.
What is not working?
- Importing XCFramework gives
No such module $FRAMEWORK
- Accessing SDK content gives
Cannot find $FRAMEWORK in scope
-- Expected as import is not working.
What I have tried so far?
- Linker flags
-ObjC -all_load
- Setting Library & header search paths
-- Path for header file is bit tricky with directory namesios-arm64_armv7_armv7s
&ios-arm64_i386_x86_64-simulator
- Creating SPM repo for the framework.
Only way I can get this working is copying .h
file from XCFramework to the project and updating sub-project's header file.
That seems wrong though. Any ideas what I am missing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
可能您需要一个
bridging-header.h
然后导入iOS标头:Possibly you need a
Bridging-Header.h
then import your iOS header as: