You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

iOS集成ffmpegkit提交App Store失败:不支持的架构与无效段对齐等问题求助

iOS集成ffmpegkit提交App Store失败:不支持的架构与无效段对齐等问题求助

各位开发者好,我在自己的iOS App里使用ffmpegkit做音视频处理,但提交到App Store验证时,直接收到了一堆失败提示,折腾好一阵都没解决,来求助大家!

一、遇到的具体错误

1. 不支持的架构错误

多个ffmpeg相关framework被检测出包含App Store不支持的x86_64架构:

  • Validation failed Unsupported Architectures. The executable for MyApp.app/Frameworks/ffmpegkit.framework contains unsupported architectures '[x86_64]'. (ID: 3e35bca7-7b8f-4c2b-bfb2-a27c8ad70c45)
  • Validation failed Unsupported Architectures. The executable for MyApp.app/Frameworks/libavcodec.framework contains unsupported architectures '[x86_64]'. (ID: fd864260-dae3-4816-bdf3-ca7389374242)
  • Validation failed Unsupported Architectures. The executable for MyApp.app/Frameworks/libavdevice.framework contains unsupported architectures '[x86_64]'. (ID: fd743847-5d46-4679-8193-51db9445fde1)
  • Validation failed Unsupported Architectures. The executable for MyApp.app/Frameworks/libavfilter.framework contains unsupported architectures '[x86_64]'. (ID: 54492aff-601e-471a-aef7-25f0549a6364)
  • Validation failed Unsupported Architectures. The executable for MyApp.app/Frameworks/libavformat.framework contains unsupported architectures '[x86_64]'. (ID: 37bcd80d-7b17-4f95-a20f-577dbb29fc36)
  • Validation failed Unsupported Architectures. The executable for MyApp.app/Frameworks/libavutil.framework contains unsupported architectures '[x86_64]'. (ID: ead0bd08-84e6-475e-9ce3-9e1c012bafa5)
  • Validation failed Unsupported Architectures. The executable for MyApp.app/Frameworks/libswresample.framework contains unsupported architectures '[x86_64]'. (ID: fe647420-760c-4404-a039-30c102d7d313)
  • Validation failed Unsupported Architectures. The executable for MyApp.app/Frameworks/libswscale.framework contains unsupported architectures '[x86_64]'. (ID: 7c8946d8-d75f-455c-b6fd-1bd555abb99f)

2. 无效段对齐错误

同样是这些framework,还都报了段对齐不正确的问题,提示我用最新Xcode重建,但我已经使用当前最新版本的Xcode了:

  • Validation failed Invalid Segment Alignment. The app binary at 'MyApp.app/Frameworks/ffmpegkit.framework/ffmpegkit' does not have proper segment alignment. Try rebuilding the app with the latest Xcode version. (ID: 8603e3f0-0235-4f3c-a87f-c263945a11d9)
  • Validation failed Invalid Segment Alignment. The app binary at 'MyApp.app/Frameworks/libavcodec.framework/libavcodec' does not have proper segment alignment. Try rebuilding the app with the latest Xcode version. (ID: f10b4561-0a9c-4aa6-969a-9d3a892be9ec)
  • Validation failed Invalid Segment Alignment. The app binary at 'MyApp.app/Frameworks/libavdevice.framework/libavdevice' does not have proper segment alignment. Try rebuilding the app with the latest Xcode version. (ID: 2e6d495a-9131-43da-b6a8-8c23b8d10415)
  • Validation failed Invalid Segment Alignment. The app binary at 'MyApp.app/Frameworks/libavfilter.framework/libavfilter' does not have proper segment alignment. Try rebuilding the app with the latest Xcode version. (ID: 40016424-045d-470f-b40a-fba391de2c98)
  • Validation failed Invalid Segment Alignment. The app binary at 'MyApp.app/Frameworks/libavformat.framework/libavformat' does not have proper segment alignment. Try rebuilding the app with the latest Xcode version. (ID: f8cc4367-25bb-4932-bd03-af6729fe7587)
  • Validation failed Invalid Segment Alignment. The app binary at 'MyApp.app/Frameworks/libavutil.framework/libavutil' does not have proper segment alignment. Try rebuilding the app with the latest Xcode version. (ID: 495572f9-2dcb-472b-97ea-d16ba6e239a9)
  • Validation failed Invalid Segment Alignment. The app binary at 'MyApp.app/Frameworks/libswresample.framework/libswresample' does not have proper segment alignment. Try rebuilding the app with the latest Xcode version. (ID: 5722d5f0-0f81-422f-8389-e744c73cfd67)
  • Validation failed Invalid Segment Alignment. The app binary at 'MyApp.app/Frameworks/libswscale.framework/libswscale' does not have proper segment alignment. Try rebuilding the app with the latest Xcode version. (ID: 1e4bf706-5e56-423d-b600-a8298eff698f)

3. 加密信息错误

还有一条单独的二进制无效错误:

Validation failed The binary is invalid. The encryption info in the LC_ENCRYPTION_INFO load command is either missing or invalid, or the binary is already encrypted. This binary does not seem to have been built with Apple's linker. (ID: 8695bbb6-991f-46cd-9b70-bd86dcef4212)

二、我已经尝试的方法

为了移除多余架构,我在项目的Run Script中添加了这段脚本,但执行后问题依旧:

APP_PATH="${TARGET_BUILD_DIR}/${WRAPPER_NAME}"
find "$APP_PATH" -name '*.framework' -type d | while read -r FRAMEWORK
do
FRAMEWORK_EXECUTABLE_PATH="$FRAMEWORK/$(defaults read "$FRAMEWORK/Info.plist" CFBundleExecutable)"
EXTRACT_ARCHS=$(lipo -info "$FRAMEWORK_EXECUTABLE_PATH" | rev | cut -d ':' -f1 | rev)
ARCHS_TO_REMOVE=""
for ARCH in $EXTRACT_ARCHS; do
if [ "$ARCH" != "arm64" ]; then
ARCHS_TO_REMOVE="$ARCHS_TO_REMOVE -remove $ARCH"
fi
done
if [ ! -z "$ARCHS_TO_REMOVE" ]; then
lipo $ARCHS_TO_REMOVE "$FRAMEWORK_EXECUTABLE_PATH" -o "$FRAMEWORK_EXECUTABLE_PATH" || exit 1
fi
done

我也搜了不少网上的解决方案,但都没解决这些问题,有没有大佬遇到过类似情况,能给我指点一下怎么解决吗?

内容来源于stack exchange

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.08 08:30:31