访问用XCFramework包裹的静态库

发布于 2025-02-07 02:17:47 字数 823 浏览 1 评论 0原文

我们的静态库(*.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 names ios-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?

XCFramework directory structure

Info.plist

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

大姐,你呐 2025-02-14 02:17:47

可能您需要一个bridging-header.h然后导入iOS标头:

#import "iOS/ADBMobile.h"

Possibly you need a Bridging-Header.h then import your iOS header as:

#import "iOS/ADBMobile.h"
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文