Xcode 11 archive gives PhaseScriptExecution failed

前端 未结 4 872
小鲜肉
小鲜肉 2021-01-04 21:59

After I migrate my project from swift 3.2 to swift 4 in Xcode 10 I try to archive in Xcode 11 and give me this error:

PhaseScriptExecution Run\\ Scrip

4条回答
  •  感情败类
    2021-01-04 22:30

    All the above answers weren't doing the trick by themselves, I had to compute a bunch of them, including the Apple documentation (see references below). So here are the steps I did if it helps someone to have all the steps.

    In Info.plist, set:

    • CFBundleShortVersionString to $(MARKETING_VERSION)
    • CFBundleVersion to $(CURRENT_PROJECT_VERSION)

    In target build settings:

    • set Versioning System to "Apple Generic"
    • set Current Project Version to 1 (or whatever version you want)
    • set Marketing Version to 1.0.0 (or whatever version you want)

    In the scheme > Archive:

    • add a post-action "Run Script Action":
      • Provide build settings from: your app
      • in the script: cd ${PROJECT_DIR} ; xcrun agvtool next-version -all ;

    1. Apple doc mentioned by cuimingda : https://developer.apple.com/library/archive/qa/qa1827/_index.html
    2. Some of the steps mentioned by moucheg

提交回复
热议问题