【问题标题】:xcodebuild gives signing error when it shouldn'txcodebuild 在不应该出现签名错误时给出错误
【发布时间】:2019-08-26 17:58:24
【问题描述】:

我执行以下xcodebuild命令行:

xcodebuild CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO 
 -workspace "MyThing.xcworkspace" -scheme "MyScheme" 
 -configuration 'Debug' -sdk iphoneos clean build

并得到这个错误:

error: An empty identity is not valid when signing a binary
 for the product type 'Application'. (in target 'MyTarget')

这曾经有效。我该如何解决?

这是使用 Xcode 10.2.1。

【问题讨论】:

    标签: xcode xcodebuild


    【解决方案1】:

    无论出于何种原因,这似乎是(又一个)使用 Xcode 新构建系统的奇怪副作用。您可以从xcodebuild 命令行通过使用以下标志强制使用旧版构建系统来解决此问题:

    -UseModernBuildSystem=0
    

    要设置您的项目/工作区以对所有内容使用旧版构建系统,请参阅here

    【讨论】:

    • 我不得不求助于这个修复程序,但它确实解决了问题。不知道为什么。一定要爱上 Apple 的生态系统..
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-11-21
    • 1970-01-01
    相关资源
    最近更新 更多