1***@qq.com
1***@qq.com
  • 发布:2026-05-18 22:14
  • 更新:2026-05-18 22:15
  • 阅读:30

【报Bug】ios云打包uts插件报错,➜ Implicit dependency on target

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Mac

PC开发环境操作系统版本号: mac air m4

手机系统: iOS

手机系统版本号: iOS 26

手机厂商: 苹果

手机机型: iphone 14

页面类型: vue

vue版本: vue3

打包方式: 云端

项目创建方式: CLI

CLI版本号: 3.0.0-4080720251210001

示例代码:

ios config.json

{  
  "deploymentTarget": "11.0",  
  "validArchitectures": [  
    "arm64"  
  ],  
  "frameworks": [  
    "UIKit.framework",  
    "Foundation.framework",  
    "AVFoundation.framework",  
    "CoreMedia.framework",  
    "CoreVideo.framework",  
    "AudioToolbox.framework",  
    "VideoToolbox.framework",  
    "Photos.framework",  
    "libc++.tbd",  
    "libsqlite3.tbd",  
    "libz.tbd"  
  ],  
  "dependencies-pods": [  
    {  
      "name": "TIoTLinkVideo",  
      "repo": {  
        "git": "https://github.com/tencentyun/iot-link-ios.git",  
        "branch": "video-v2.4.x"  
      }  
    },  
    {  
      "name": "TIoTLinkKit_XP2P",  
      "version": "2.4.66-beta.202601200312"  
    },  
    {  
      "name": "TIoTLinkKit_IJKPlayer",  
      "version": "2.0.16-beta.202502200213"  
    }  
  ],  
  "components": [  
    {  
      "name": "tx-iot-video-view",  
      "class": "UTSSDKModulesTxIotVideoTxIotVideoViewComponent"  
    }  
  ]  
}  

操作步骤:

云打包

预期结果:

打包成功

实际结果:

ios config.json

{  
  "deploymentTarget": "11.0",  
  "validArchitectures": [  
    "arm64"  
  ],  
  "frameworks": [  
    "UIKit.framework",  
    "Foundation.framework",  
    "AVFoundation.framework",  
    "CoreMedia.framework",  
    "CoreVideo.framework",  
    "AudioToolbox.framework",  
    "VideoToolbox.framework",  
    "Photos.framework",  
    "libc++.tbd",  
    "libsqlite3.tbd",  
    "libz.tbd"  
  ],  
  "dependencies-pods": [  
    {  
      "name": "TIoTLinkVideo",  
      "repo": {  
        "git": "https://github.com/tencentyun/iot-link-ios.git",  
        "branch": "video-v2.4.x"  
      }  
    },  
    {  
      "name": "TIoTLinkKit_XP2P",  
      "version": "2.4.66-beta.202601200312"  
    },  
    {  
      "name": "TIoTLinkKit_IJKPlayer",  
      "version": "2.0.16-beta.202502200213"  
    }  
  ],  
  "components": [  
    {  
      "name": "tx-iot-video-view",  
      "class": "UTSSDKModulesTxIotVideoTxIotVideoViewComponent"  
    }  
  ]  
}  

bug描述:

之前写了 一个uts插件——腾讯云iot设备视频推流插件,本来是可以正常打包的,但现在打包报错
以下是 HBuilderX 云打包编译错误信息。请结合当前 uni-app / uni-app x 项目上下文分析失败原因,指出最可能的问题代码或配置,并给出可执行的修复步骤。

Error code = -5000
Error message:
UTS plugin uni_modules/tx-iot-video compile error!

uni_modules/tx-iot-video

    ➜ Implicit dependency on target 'Pods-unimoduleTxIotVideo' in project 'Pods' via file 'Pods_unimoduleTxIotVideo.framework' in build phase 'Link Binary'  

    ➜ Implicit dependency on target 'CocoaAsyncSocket' in project 'Pods' via options '-framework CocoaAsyncSocket' in build setting 'OTHER_LDFLAGS'  

    ➜ Implicit dependency on target 'TIoTLinkVideo' in project 'Pods' via options '-framework TIoTLinkVideo' in build setting 'OTHER_LDFLAGS'  

    ➜ Implicit dependency on target 'TPCircularBuffer' in project 'Pods' via options '-framework TPCircularBuffer' in build setting 'OTHER_LDFLAGS'  

    ➜ Explicit dependency on target 'CocoaAsyncSocket' in project 'Pods'  

    ➜ Explicit dependency on target 'TIoTLinkKit_FLV' in project 'Pods'  

    ➜ Explicit dependency on target 'TIoTLinkKit_GVoice' in project 'Pods'  

    ➜ Explicit dependency on target 'TIoTLinkKit_IJKPlayer' in project 'Pods'  

    ➜ Explicit dependency on target 'TIoTLinkKit_SoundTouch' in project 'Pods'  

    ➜ Explicit dependency on target 'TIoTLinkKit_XP2P' in project 'Pods'  

    ➜ Explicit dependency on target 'TIoTLinkVideo' in project 'Pods'  

    ➜ Explicit dependency on target 'TPCircularBuffer' in project 'Pods'  

    ➜ Explicit dependency on target 'CocoaAsyncSocket' in project 'Pods'  

    ➜ Explicit dependency on target 'TIoTLinkKit_FLV' in project 'Pods'  

    ➜ Explicit dependency on target 'TIoTLinkKit_GVoice' in project 'Pods'  

    ➜ Explicit dependency on target 'TIoTLinkKit_SoundTouch' in project 'Pods'  

    ➜ Explicit dependency on target 'TIoTLinkKit_XP2P' in project 'Pods'  

    ➜ Explicit dependency on target 'TPCircularBuffer' in project 'Pods'  

| `- note: in file included from <module-includes>:1:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from [SourcePath]/libs/UniSDK/Base/DCUniBase.framework/Headers/DCUniBase.h:31:

| `- warning: 'UILocalNotification' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNNotificationRequest

| `- note: in file included from <module-includes>:1:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from [PackagePath]/uni_modules/tx-iot-video/Pods/TIoTLinkKit_IJKPlayer/Source/IJKPlayer-iOS/IJKMediaFramework.framework/Headers/IJKMediaFramework.h:34:

| `- warning: 'MPMoviePlayerController' is deprecated: first deprecated in iOS 9.0 - Use AVPlayerViewController in AVKit

| `- note: in file included from <module-includes>:1:

| `- note: in file included from [PackagePath]/uni_modules/tx-iot-video/Pods/TIoTLinkKit_IJKPlayer/Source/IJKPlayer-iOS/IJKMediaFramework.framework/Headers/IJKMediaFramework.h:40:

| `- note: in file included from <module-includes>:1:

| `- note: in file included from [PackagePath]/uni_modules/tx-iot-video/build/Release-iphoneos/TIoTLinkVideo/TIoTLinkVideo.framework/Headers/TIoTLinkVideo-umbrella.h:16:Ld [PackagePath]/uni_modules/tx-iot-video/build/Release-iphoneos/unimoduleTxIotVideo.framework/unimoduleTxIotVideo normal (in target 'unimoduleTxIotVideo' from project 'UTS')

Undefined symbols for architecture arm64:

\"_vDSP_vclip\", referenced from:

  record_callback(unsigned char*, int, void*) in TIoTLinkVideo[4](TIoTAVCaptionFLV.o)  

\"_vDSP_vfix16\", referenced from:

  record_callback(unsigned char*, int, void*) in TIoTLinkVideo[4](TIoTAVCaptionFLV.o)  

\"_vDSP_vflt16\", referenced from:

  record_callback(unsigned char*, int, void*) in TIoTLinkVideo[4](TIoTAVCaptionFLV.o)  

\"_vDSP_vsmul\", referenced from:

  record_callback(unsigned char*, int, void*) in TIoTLinkVideo[4](TIoTAVCaptionFLV.o)  

ld: symbol(s) not found for architecture arm64

clang++: error: linker command failed with exit code 1 (use -v to see invocation)

STDERR ERROR:
2026-05-18 22:03:39.034 xcodebuild[84877:2964262] [MT] IDERunDestination: Supported platforms for the buildables in the current scheme is empty.
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device }
{ platform:macOS, arch:arm64, variant:Designed for [iPad,iPhone], id:00008112-000D29A41AFB401E, name:My Mac }
{ platform:macOS, arch:arm64, variant:Mac Catalyst, id:00008112-000D29A41AFB401E, name:My Mac }
{ platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device }
{ platform:macOS, variant:Mac Catalyst, name:Any Mac }
BUILD FAILED The following build commands failed:
Ld [PackagePath]/uni_modules/tx-iot-video/build/Release-iphoneos/unimoduleTxIotVideo.framework/unimoduleTxIotVideo normal (in target 'unimoduleTxIotVideo' from project 'UTS')
Building workspace UTS with scheme unimoduleTxIotVideo and configuration Release
(2 failures)

2026-05-18 22:14 负责人:无 分享
已邀请:
Ask小助手

Ask小助手 - Ask社区AI助手

欢迎到专业群( uni-app x技术交流群 ) 咨询,群中有相关专业的管理员和群友。

从您的反馈来看,您遇到的问题是 uts 插件在云打包时依赖解析失败,导致编译报错。

bug 反馈评审

这个反馈整体上属于有效反馈,问题描述明确,错误日志清晰,定位到了具体的编译失败原因。下面展开详细评审:

1. 反馈内容完整性分析

  • BUG 描述:质量很高。清晰地指出了问题是“一个之前能正常打包的 uts 插件现在打包报错”,并提供了完整的、关键的错误日志。这让我们能直接定位问题。
  • 代码示例:提供了 ios config.json 的代码片段,这对于排查 iOS 平台的依赖问题至关重要,内容很完整。
  • 复现步骤:这部分需要补充完善。目前只写了“云打包”,建议您补充更详细的操作,例如:
    • 使用的 HBuilderX 具体版本号(比如从哪个版本开始出现问题)。
    • 从哪个版本升级后出现此问题。
    • 打包类型是自定义基座还是正式包。
    • 是否更新过插件中的 config.json 或相关依赖库的版本。
  • 预期结果实际结果:描述都清晰且合理。
  • 分类信息:比较完整,包含了操作系统、HBuilderX类型、手机平台等信息,为我们提供了基础判断依据。

2. 问题根因分析

根据您提供的错误信息,这个 bug 是成立的,问题根源可以定位到您 uts 插件的 iOS 原生依赖配置上。核心错误是:

Undefined symbols for architecture arm64:  
  "_vDSP_vclip", referenced from: ...  
  "_vDSP_vfix16", referenced from: ...  
  // ... 其他 _vDSP_ 开头的符号

本助手使用国产模型,生成代码准确率较低。强烈建议使用uni-agent生成代码
这些 _vDSP_ 开头的符号都属于 iOS 的 Accelerate.framework 系统库。这个报错明确表示,在云打包的链接阶段,链接器找不到这个系统库。

检查您提供的 config.json 中的 frameworks 节点,确实缺少了 "Accelerate.framework"。这就是打包失败的直接原因。

关于“之前可以正常打包”的现象,比较合理的解释是:您所依赖的 TIoTLinkVideoTIoTLinkKit_XP2P 等 Pod 库在较早的版本中可能不需要 Accelerate 库,或者旧版 HBuilderX 的云打包环境通过其他依赖间接链接了这个库。但库更新后,新版代码直接调用了这些函数,因此必须在 config.json 中显式声明依赖。

3. 修复方案

问题定位非常清晰,修复方案也很直接。请按以下步骤操作:

在你 uts 插件的 uni_modules/tx-iot-video/utssdk/app-ios/ 目录下,找到 config.json 文件。
"frameworks" 数组中,添加 "Accelerate.framework"

修改后的 config.json 文件 frameworks 部分应类似于:

{  
  "deploymentTarget": "11.0",  
  "validArchitectures": [  
    "arm64"  
  ],  
  "frameworks": [  
    "UIKit.framework",  
    "Foundation.framework",  
    "AVFoundation.framework",  
    "CoreMedia.framework",  
    "CoreVideo.framework",  
    "AudioToolbox.framework",  
    "VideoToolbox.framework",  
    "Photos.framework",  
    "libc++.tbd",  
    "libsqlite3.tbd",  
    "libz.tbd",  
    "Accelerate.framework"  // 添加这行  
  ],  
  "dependencies-pods": [ /* ... */ ],  
  "components": [ /* ... */ ]  
}

本助手使用国产模型,生成代码准确率较低。强烈建议使用uni-agent生成代码
修改完成后,重新提交云打包即可。

如果修改后问题依旧,或者您需要了解更多关于配置项的细节,可以查阅以下文档:

另外,建议您关注一下 HBuilderX 的更新日志,特别是与“Dead Code Stripping”相关的调整项,了解打包策略的变化也有助于排查此类兼容性问题。您可以参考这个 Issue 案例来加深理解:4.57 云打包 IOS,正常。 升级 4.66 后打包异常

内容为 AI 生成,仅供参考

要回复问题请先登录注册