尝试在 TestFlight 上上传时显示错误。资产验证失败无效的可执行文件。 AgoraRtmKit' 包含位码

问题描述 投票:0回答:1

Upload error message我收到此错误表明 AgoraRtmKit.framework 和 FBSDKCoreKit 中的位码存在问题。 我确实更改了 podfile 参考 对此。还对

AgoraRtmKit
FBSDKCoreKit
进行更改,但它甚至没有构建我的应用程序。

这是我的 podfile。我还需要做其他改变吗?有了这个 podfile,我至少可以存档构建。还要在我的 Xcode 中将

ENABLE_BITCODE
设置为
NO

# Uncomment this line to define a global platform for your project
platform :ios, '16.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
  'Debug' => :debug,
  'Debug-dev' => :debug,
  'Profile' => :release,
  'Release' => :release,
}

def flutter_root
  generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
  unless File.exist?(generated_xcode_build_settings_path)
    raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
  end

  File.foreach(generated_xcode_build_settings_path) do |line|
    matches = line.match(/FLUTTER_ROOT\=(.*)/)
    return matches[1].strip if matches
  end
  raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

target 'Runner' do
  use_frameworks!
  use_modular_headers!

  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
  end
end

我也尝试过使用下面的 podfile。我可以存档,但仍然是 bitCode 错误

    # Uncomment this line to define a global platform for your project
platform :ios, '16.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
  'Debug' => :debug,
  'Profile' => :release,
  'Release' => :release,
}

def flutter_root
  generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
  unless File.exist?(generated_xcode_build_settings_path)
    raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
  end

  File.foreach(generated_xcode_build_settings_path) do |line|
    matches = line.match(/FLUTTER_ROOT\=(.*)/)
    return matches[1].strip if matches
  end
  raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

target 'Runner' do
  use_frameworks!
  use_modular_headers!

  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

post_install do |installer|
  installer.generated_projects.each do |project|
    project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
         end
    end
end
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
     if target.name == 'MapboxMobileEvents'
        `xcrun -sdk iphoneos bitcode_strip -r Pods/MapboxMobileEvents/MapboxMobileEvents.xcframework/ios-arm64_armv7/MapboxMobileEvents.framework/MapboxMobileEvents -o Pods/MapboxMobileEvents/MapboxMobileEvents.xcframework/ios-arm64_armv7/MapboxMobileEvents.framework/MapboxMobileEvents`
      end

      if target.name == 'MapboxCommon'
        `xcrun -sdk iphoneos bitcode_strip -r Pods/MapboxCommon/MapboxCommon.xcframework/ios-arm64/MapboxCommon.framework/MapboxCommon -o Pods/MapboxCommon/MapboxCommon.xcframework/ios-arm64/MapboxCommon.framework/MapboxCommon`
      end

      if target.name == 'MapboxCoreMaps'
        `xcrun -sdk iphoneos bitcode_strip -r Pods/MapboxCoreMaps/MapboxCoreMaps.xcframework/ios-arm64/MapboxCoreMaps.framework/MapboxCoreMaps -o Pods/MapboxCoreMaps/MapboxCoreMaps.xcframework/ios-arm64/MapboxCoreMaps.framework/MapboxCoreMaps`
      end

      if target.name == 'AgoraRtmKit'
        `xcrun -sdk iphoneos bitcode_strip -r Pods/AgoraRtmKit/AgoraRtmKit.xcframework/ios-arm64/AgoraRtmKit.framework/AgoraRtmKit -o Pods/AgoraRtmKit/AgoraRtmKit.xcframework/ios-arm64/AgoraRtmKit.framework/AgoraRtmKit`
      end

      if target.name == 'FBAEMKit'
        `xcrun -sdk iphoneos bitcode_strip -r Pods/FBAEMKit/FBAEMKit.xcframework/ios-arm64/FBAEMKit.framework/FBAEMKit -o Pods/FBAEMKit/FBAEMKit.xcframework/ios-arm64/FBAEMKit.framework/FBAEMKit`
      end

      if target.name == 'FBSDKCoreKit'
        `xcrun -sdk iphoneos bitcode_strip -r Pods/FBSDKCoreKit/FBSDKCoreKit.xcframework/ios-arm64/FBSDKCoreKit.framework/FBSDKCoreKit -o Pods/FBSDKCoreKit/FBSDKCoreKit.xcframework/ios-arm64/FBSDKCoreKit.framework/FBSDKCoreKit`
      end

      if target.name == 'FBSDKCoreKit_Basics'
        `xcrun -sdk iphoneos bitcode_strip -r Pods/FBSDKCoreKit_Basics/FBSDKCoreKit_Basics.xcframework/ios-arm64/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics -o Pods/FBSDKCoreKit_Basics/FBSDKCoreKit_Basics.xcframework/ios-arm64/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics`
      end

      if target.name == 'FBSDKLoginKit'
        `xcrun -sdk iphoneos bitcode_strip -r Pods/FBSDKLoginKit/FBSDKLoginKit.xcframework/ios-arm64/FBSDKLoginKit.framework/FBSDKLoginKit -o Pods/FBSDKLoginKit/FBSDKLoginKit.xcframework/ios-arm64/FBSDKLoginKit.framework/FBSDKLoginKit`
      end
  end
end
ios flutter xcode dart agora-implementation
1个回答
0
投票

我能够通过在终端上运行每个框架的所有推荐来解决这个问题

这里我如何获取框架路径(这给了我位代码错误,你的路径可能不同)。右键单击并复制路径。

  • 然后运行: xcrun bitcode_strip -r
    YourFrameWorkPath
  • 示例 (
    xcrun bitcode_strip -r AgoraRtm_iOS/AgoraRtmKit.xcframework/ios-arm64_armv7/AgoraRtmKit.framework/AgoraRtmKit -o AgoraRtm_iOS/AgoraRtmKit.xcframework/ios-arm64_armv7/AgoraRtmKit.framework/AgoraRtmKit
    )

Copy the path

  • 然后开始对我所有的工作进行赞扬(对我来说,它的 5 个框架给了我错误)

BitCode 错误:需要在终端中运行此命令。

xcrun bitcode_strip -r AgoraRtm_iOS/AgoraRtmKit.xcframework/ios-arm64_armv7/AgoraRtmKit.framework/AgoraRtmKit -o AgoraRtm_iOS/AgoraRtmKit.xcframework/ios-arm64_armv7/AgoraRtmKit.framework/AgoraRtmKit

xcrun bitcode_strip -r FBSDKLoginKit/XCFrameworks/FBSDKLoginKit.xcframework/ios-arm64/FBSDKLoginKit.framework/FBSDKLoginKit -o FBSDKLoginKit/XCFrameworks/FBSDKLoginKit.xcframework/ios-arm64/FBSDKLoginKit.framework/FBSDKLoginKit

xcrun bitcode_strip -r FBSDKCoreKit_Basics/XCFrameworks/FBSDKCoreKit_Basics.xcframework/ios-arm64/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics -o FBSDKCoreKit_Basics/XCFrameworks/FBSDKCoreKit_Basics.xcframework/ios-arm64/FBSDKCoreKit_Basics.framework/FBSDKCore套件_基础知识

xcrun bitcode_strip -r FBAEMKit/XCFrameworks/FBAEMKit.xcframework/ios-arm64/FBAEMKit.framework/FBAEMKit -o FBAEMKit/XCFrameworks/FBAEMKit.xcframework/ios-arm64/FBAEMKit.framework/FBAEMKit

xcrun bitcode_strip -r FBSDKCoreKit/XCFrameworks/FBSDKCoreKit.xcframework/ios-arm64/FBSDKCoreKit.framework/FBSDKCoreKit -o FBSDKCoreKit/XCFrameworks/FBSDKCoreKit.xcframework/ios-arm64/FBSDKCoreKit.framework/FBSDKCoreKit

© www.soinside.com 2019 - 2024. All rights reserved.