[英]Accessing Static Library wrapped in XCFramework
We have Static library (*.a) wrapped in XCFramework distributed by a third-party SDK.我们有 Static 库 (*.a) 包装在 XCFramework 中,由第三方 SDK 分发。 Attached is screenshot of the SDK's directory structure and info.plist.附上SDK目录结构和info.plist截图。
Our project structure -> Main App - SubProject - SDK我们的项目结构 -> 主应用程序 - 子项目 - SDK
Existing integration was with static library.现有的集成是与 static 库。 We had SDK's header file imported in sub-project's headers.我们在子项目的标题中导入了 SDK 的 header 文件。
What is not working?什么不工作?
No such module $FRAMEWORK
导入 XCFramework No such module $FRAMEWORK
Cannot find $FRAMEWORK in scope
-- Expected as import is not working.访问 SDK 内容会导致Cannot find $FRAMEWORK in scope
- 预计导入不起作用。What I have tried so far?到目前为止我尝试了什么?
-ObjC -all_load
Linker 标志-ObjC -all_load
ios-arm64_armv7_armv7s
& ios-arm64_i386_x86_64-simulator
设置库和 header 搜索路径 -- header 文件的路径对于目录名称ios-arm64_armv7_armv7s
和ios-arm64_i386_x86_64-simulator
有点棘手 Only way I can get this working is copying .h
file from XCFramework to the project and updating sub-project's header file.我可以让这个工作的唯一方法是将.h
文件从 XCFramework 复制到项目并更新子项目的 header 文件。
That seems wrong though.但这似乎是错误的。 Any ideas what I am missing?有什么我想念的想法吗?
Possibly you need a Bridging-Header.h
then import your iOS header as:可能您需要一个Bridging-Header.h
然后将您的 iOS header 导入为:
#import "iOS/ADBMobile.h"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.