升级到xcode16,上传到 TF,声网 sdk报错提示 bitcode

223 阅读7分钟

升级到xcode16,上传到 TF报错提示,Agora 声网 sdk关联插件需要升级适配

报错日志如下,主要表现是是Agora依赖的 sdk包含了 bitCode。而在新版 xcode16上传到 TF时,强制校验需要移除

20:25:47   [Application Loader Error Output]: [ContentDelivery.Uploader.600000A08200] Validation failed (409) Invalid Executable. The executable 'Runner.app/Frameworks/AgoraAiEchoCancellationExtension.framework/AgoraAiEchoCancellationExtension' contains bitcode. (ID: 21220063-861f-4071-8548-4c596b8c573b)
20:25:47  [Application Loader Error Output]: [ContentDelivery.Uploader.600000A08200] Validation failed (409) Invalid Executable. The executable 'Runner.app/Frameworks/AgoraAiNoiseSuppressionExtension.framework/AgoraAiNoiseSuppressionExtension' contains bitcode. (ID: 93ab3812-ee3d-4e5e-8783-403f018c7c9d)
20:25:47  [Application Loader Error Output]: [ContentDelivery.Uploader.600000A08200] Validation failed (409) Invalid Executable. The executable 'Runner.app/Frameworks/AgoraAudioBeautyExtension.framework/AgoraAudioBeautyExtension' contains bitcode. (ID: 09df17a6-ae5a-4aa1-9023-d01fa585f77a)
20:25:47  [Application Loader Error Output]: [ContentDelivery.Uploader.600000A08200] Validation failed (409) Invalid Executable. The executable 'Runner.app/Frameworks/AgoraClearVisionExtension.framework/AgoraClearVisionExtension' contains bitcode. (ID: 285d9f8d-1552-4a83-ae73-3dce54664c11)
20:25:47  [Application Loader Error Output]: [ContentDelivery.Uploader.600000A08200] Validation failed (409) Invalid Executable. The executable 'Runner.app/Frameworks/AgoraContentInspectExtension.framework/AgoraContentInspectExtension' contains bitcode. (ID: 7de4201e-0873-4cbe-8bc9-b10f31792728)
20:25:47  [Application Loader Error Output]: [ContentDelivery.Uploader.600000A08200] Validation failed (409) Invalid Executable. The executable 'Runner.app/Frameworks/AgoraDav1d.framework/AgoraDav1d' contains bitcode. (ID: ffc62a04-3c81-4b5e-9186-f043c4d28b35)
20:25:47  [Application Loader Error Output]: [ContentDelivery.Uploader.600000A08200] Validation failed (409) Invalid Executable. The executable 'Runner.app/Frameworks/AgoraDrmLoaderExtension.framework/AgoraDrmLoaderExtension' contains bitcode. (ID: 5e063bcf-5e70-459e-a748-235e6c1a0a76)
20:25:47  [Application Loader Error Output]: [ContentDelivery.Uploader.600000A08200] Validation failed (409) Invalid Executable. The executable 'Runner.app/Frameworks/AgoraReplayKitExtension.framework/AgoraReplayKitExtension' contains bitcode. (ID: fe777376-1461-4298-b31c-fd9b4585c925)
20:25:47  [Application Loader Error Output]: [ContentDelivery.Uploader.600000A08200] Validation failed (409) Invalid Executable. The executable 'Runner.app/Frameworks/AgoraRtcKit.framework/AgoraRtcKit' contains bitcode. (ID: f584de8a-11f4-4678-bc28-cd947eed7926)
20:25:47  [Application Loader Error Output]: [ContentDelivery.Uploader.600000A08200] Validation failed (409) Invalid Executable. The executable 'Runner.app/Frameworks/AgoraRtcWrapper.framework/AgoraRtcWrapper' contains bitcode. (ID: a3c10481-0947-4fb4-8fda-587b37feec40)
20:25:47  [Application Loader Error Output]: [ContentDelivery.Uploader.600000A08200] Validation failed (409) Invalid Executable. The executable 'Runner.app/Frameworks/AgoraSoundTouch.framework/AgoraSoundTouch' contains bitcode. (ID: a33328c2-e14f-4597-a2cb-5cd680eccaa2)
20:25:47  [Application Loader Error Output]: [ContentDelivery.Uploader.600000A08200] Validation failed (409) Invalid Executable. The executable 'Runner.app/Frameworks/AgoraSpatialAudioExtension.framework/AgoraSpatialAudioExtension' contains bitcode. (ID: 6c3e666d-7171-4d21-9249-c33b0595f385)
20:25:47  [Application Loader Error Output]: [ContentDelivery.Uploader.600000A08200] Validation failed (409) Invalid Executable. The executable 'Runner.app/Frameworks/AgoraSuperResolutionExtension.framework/AgoraSuperResolutionExtension' contains bitcode. (ID: 0f6c9253-9c04-4686-a39c-17a6c78eb019)
20:25:47  [Application Loader Error Output]: [ContentDelivery.Uploader.600000A08200] Validation failed (409) Invalid Executable. The executable 'Runner.app/Frameworks/AgoraVideoQualityAnalyzerExtension.framework/AgoraVideoQualityAnalyzerExtension' contains bitcode. (ID: beddedd7-5678-4be1-aa4a-0ba19363214a)
20:25:47  [Application Loader Error Output]: [ContentDelivery.Uploader.600000A08200] Validation failed (409) Invalid Executable. The executable 'Runner.app/Frameworks/AgoraVideoSegmentationExtension.framework/AgoraVideoSegmentationExtension' contains bitcode. (ID: 56f19c64-f97d-4ecc-bb75-d239da407b00)
20:25:47  [Application Loader Error Output]: [ContentDelivery.Uploader.600000A08200] Validation failed (409) Invalid Executable. The executable 'Runner.app/Frameworks/Agorafdkaac.framework/Agorafdkaac' contains bitcode. (ID: 38e774f7-5b84-4d30-a03f-b2f93ef25dcb)
20:25:47  [Application Loader Error Output]: [ContentDelivery.Uploader.600000A08200] Validation failed (409) Invalid Executable. The executable 'Runner.app/Frameworks/Agoraffmpeg.framework/Agoraffmpeg' contains bitcode. (ID: 61247cce-776a-44aa-ae19-9c93ad815e9b)
20:25:47  [Application Loader Error Output]: Error uploading '/var/folders/zk/xlsqgcln3xnblm9r7zwpxl5m0000gn/T/c83485ef-9b49-468f-be58-febb00d7973d.ipa'.
20:25:47  [Application Loader Error Output]: Validation failed Invalid Executable. The executable 'Runner.app/Frameworks/AgoraAiEchoCancellationExtension.framework/AgoraAiEchoCancellationExtension' contains bitcode. (ID: 21220063-861f-4071-8548-4c596b8c573b) (409)
20:25:47  [Application Loader Error Output]: Validation failed Invalid Executable. The executable 'Runner.app/Frameworks/AgoraAiNoiseSuppressionExtension.framework/AgoraAiNoiseSuppressionExtension' contains bitcode. (ID: 93ab3812-ee3d-4e5e-8783-403f018c7c9d) (409)
20:25:47  [Application Loader Error Output]: Validation failed Invalid Executable. The executable 'Runner.app/Frameworks/AgoraAudioBeautyExtension.framework/AgoraAudioBeautyExtension' contains bitcode. (ID: 09df17a6-ae5a-4aa1-9023-d01fa585f77a) (409)
20:25:47  [Application Loader Error Output]: Validation failed Invalid Executable. The executable 'Runner.app/Frameworks/AgoraClearVisionExtension.framework/AgoraClearVisionExtension' contains bitcode. (ID: 285d9f8d-1552-4a83-ae73-3dce54664c11) (409)
20:25:47  [Application Loader Error Output]: Validation failed Invalid Executable. The executable 'Runner.app/Frameworks/AgoraContentInspectExtension.framework/AgoraContentInspectExtension' contains bitcode. (ID: 7de4201e-0873-4cbe-8bc9-b10f31792728) (409)
20:25:47  [Application Loader Error Output]: Validation failed Invalid Executable. The executable 'Runner.app/Frameworks/AgoraDav1d.framework/AgoraDav1d' contains bitcode. (ID: ffc62a04-3c81-4b5e-9186-f043c4d28b35) (409)
20:25:47  [Application Loader Error Output]: Validation failed Invalid Executable. The executable 'Runner.app/Frameworks/AgoraDrmLoaderExtension.framework/AgoraDrmLoaderExtension' contains bitcode. (ID: 5e063bcf-5e70-459e-a748-235e6c1a0a76) (409)
20:25:47  [Application Loader Error Output]: Validation failed Invalid Executable. The executable 'Runner.app/Frameworks/AgoraReplayKitExtension.framework/AgoraReplayKitExtension' contains bitcode. (ID: fe777376-1461-4298-b31c-fd9b4585c925) (409)
20:25:47  [Application Loader Error Output]: Validation failed Invalid Executable. The executable 'Runner.app/Frameworks/AgoraRtcKit.framework/AgoraRtcKit' contains bitcode. (ID: f584de8a-11f4-4678-bc28-cd947eed7926) (409)
20:25:47  [Application Loader Error Output]: Validation failed Invalid Executable. The executable 'Runner.app/Frameworks/AgoraRtcWrapper.framework/AgoraRtcWrapper' contains bitcode. (ID: a3c10481-0947-4fb4-8fda-587b37feec40) (409)
20:25:47  [Application Loader Error Output]: Validation failed Invalid Executable. The executable 'Runner.app/Frameworks/AgoraSoundTouch.framework/AgoraSoundTouch' contains bitcode. (ID: a33328c2-e14f-4597-a2cb-5cd680eccaa2) (409)
20:25:47  [Application Loader Error Output]: Validation failed Invalid Executable. The executable 'Runner.app/Frameworks/AgoraSpatialAudioExtension.framework/AgoraSpatialAudioExtension' contains bitcode. (ID: 6c3e666d-7171-4d21-9249-c33b0595f385) (409)
20:25:47  [Application Loader Error Output]: Validation failed Invalid Executable. The executable 'Runner.app/Frameworks/AgoraSuperResolutionExtension.framework/AgoraSuperResolutionExtension' contains bitcode. (ID: 0f6c9253-9c04-4686-a39c-17a6c78eb019) (409)
20:25:47  [Application Loader Error Output]: Validation failed Invalid Executable. The executable 'Runner.app/Frameworks/AgoraVideoQualityAnalyzerExtension.framework/AgoraVideoQualityAnalyzerExtension' contains bitcode. (ID: beddedd7-5678-4be1-aa4a-0ba19363214a) (409)
20:25:47  [Application Loader Error Output]: Validation failed Invalid Executable. The executable 'Runner.app/Frameworks/AgoraVideoSegmentationExtension.framework/AgoraVideoSegmentationExtension' contains bitcode. (ID: 56f19c64-f97d-4ecc-bb75-d239da407b00) (409)
20:25:47  [Application Loader Error Output]: Validation failed Invalid Executable. The executable 'Runner.app/Frameworks/Agorafdkaac.framework/Agorafdkaac' contains bitcode. (ID: 38e774f7-5b84-4d30-a03f-b2f93ef25dcb) (409)
20:25:47  [Application Loader Error Output]: Validation failed Invalid Executable. The executable 'Runner.app/Frameworks/Agoraffmpeg.framework/Agoraffmpeg' contains bitcode. (ID: 61247cce-776a-44aa-ae19-9c93ad815e9b) (409)

经测试,验证通过 ✅ debug ✅ adhoc ✅ Validate App


post_install do |installer|  
    #...
    execute_bitcode_stripping()  
    #...
end

$$
\TeX
$$
def execute_bitcode_stripping()
  # 配置分层路径参数
  frameworks_config = [
    {
      base_dir: "/Pods/AgoraRtcEngine_iOS",
      modules: [
        "AgoraAiEchoCancellationExtension",
        "AgoraAiNoiseSuppressionExtension",
        "AgoraAudioBeautyExtension",
        "AgoraClearVisionExtension",
        "AgoraContentInspectExtension",
        "AgoraDav1d",
        "AgoraDrmLoaderExtensionAgoraDrmLoaderExtension",
        "Agorafdkaac",
        "Agoraffmpeg",
        "AgoraReplayKitExtension",
        "AgoraRtcKit",
        "AgoraRtcKit",
        "AgoraSpatialAudioExtension",
        "AgoraSuperResolutionExtension",
        "AgoraVideoQualityAnalyzerExtension",
        "AgoraVideoSegmentationExtension"
      ]
    },
    {
      base_dir: "/Pods/AgoraIrisRTC_iOS",
      modules: [
        "AgoraRtcWrapper"
      ]
    }
  ]

  # 公共路径组件
  xcframework_suffix = "xcframework"
  arch_subpath = "ios-arm64_armv7"
  framework_suffix = "framework"

  # 动态生成路径列表
  framework_paths = frameworks_config.flat_map do |config|
    config[:modules].map do |mod|
      [
        config[:base_dir],
        "#{mod}.#{xcframework_suffix}",
        arch_subpath,
        "#{mod}.#{framework_suffix}",
        mod
      ].join("/")
    end
  end

  # 工具路径获取
  bitcode_strip_path = `xcrun --find bitcode_strip`.chop!

  # 保持剥离方法不变
  def strip_bitcode_from_framework(bitcode_strip_path, framework_relative_path)
    framework_path = File.join(Dir.pwd, framework_relative_path)
    command = "#{bitcode_strip_path} #{framework_path} -r -o #{framework_path}"
    puts "Stripping bitcode: #{command}"
    system(command)
  end

  # 执行剥离操作
  framework_paths.each do |framework_relative_path|
    strip_bitcode_from_framework(bitcode_strip_path, framework_relative_path)
  end
end

在 flutter_boost中提到的问题# [Bug]: Xcode16 Asset validation failed (90668),该解决方式,并未出现其他异常