ios 未分类(Xcode):命令CodeSign失败,退出代码为非零

bcs8qyzn  于 12个月前  发布在  iOS
关注(0)|答案(3)|浏览(162)

Image of the Errorhelp me out here当更新到最新的Xcode 15时,我开始收到这个错误。
我还更新了我的mac到索诺马os。我已经卡在这个错误3天了,现在尝试了一切。
Flutter Code在Xcode 14上运行良好。
Pod update pod install pod degenerated and installed again IOS文件夹被删除,然后使用Flutter Create重新创建。
Noting Works帮助我

dauxcl2d

dauxcl2d1#

尝试在您的podfile中添加以下内容:

xcode_base_version = `xcodebuild -version | grep 'Xcode' | awk '{print $2}' | cut -d . -f 1`

  post_install do |installer|
    installer.pods_project.targets.each do |target|
      target.build_configurations.each do |config|
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
        # For xcode 15+ only
         if config.base_configuration_reference && Integer(xcode_base_version) >= 15
          xcconfig_path = config.base_configuration_reference.real_path
          xcconfig = File.read(xcconfig_path)
          xcconfig_mod = xcconfig.gsub(/DT_TOOLCHAIN_DIR/, "TOOLCHAIN_DIR")
           File.open(xcconfig_path, "w") { |file| file << xcconfig_mod }
        end
      end
    end
  end

如果您已经有一个post_install do |installer|,那么只添加if条件沿着end

7vhp5slm

7vhp5slm2#

这对我很有效

xcode_base_version = `xcodebuild -version | grep 'Xcode' | awk '{print $2}' | cut -d . -f 1`

  post_install do |installer|
     installer.pods_project.targets.each do |target|
      flutter_additional_ios_build_settings(target)
    end
    installer.pods_project.targets.each do |target|
      target.build_configurations.each do |config|
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
        # For xcode 15+ only
         if config.base_configuration_reference && Integer(xcode_base_version) >= 15
          xcconfig_path = config.base_configuration_reference.real_path
          xcconfig = File.read(xcconfig_path)
          xcconfig_mod = xcconfig.gsub(/DT_TOOLCHAIN_DIR/, "TOOLCHAIN_DIR")
           File.open(xcconfig_path, "w") { |file| file << xcconfig_mod }
        end
      end
    end
  end
bakd9h0s

bakd9h0s3#

升级到Mac OS索诺马后,我得到了这个错误。在尝试了几十种技巧后,我删除了所有内容,并试图删除所有隐藏的文件。然后我重新安装了Xcode,Flutter和Visual Studio Code,完全按照Flutter网站上的指南。对我很有效。

相关问题