Xcode 中的运行脚本和构建阶段在哪里? [英] Where is the Run Script and Build Phase in Xcode?

查看:26
本文介绍了Xcode 中的运行脚本和构建阶段在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

要设置 Carthage,

To get Carthage set up, the documentation says that you need to add a Run Script.

On your application targets’ "Build Phases" settings tab, click the "+" icon and choose "New Run Script Phase". Create a Run Script in which you specify your shell (ex: bin/sh), add the following contents to the script area below the shell:

/usr/local/bin/carthage copy-frameworks

and add the paths to the frameworks you want to use under "Input Files", e.g.:

$(SRCROOT)/Carthage/Build/iOS/Box.framework
$(SRCROOT)/Carthage/Build/iOS/Result.framework
$(SRCROOT)/Carthage/Build/iOS/ReactiveCocoa.framework

This script works around an App Store submission bug triggered by universal binaries and ensures that necessary bitcode-related files and dSYMs are copied when archiving.

However, I can't find the Build Phases tab anymore or Run Script in the Build Settings search. The Xcode 8 Release Notes mention

Xcode 8 provides completely rewritten AppleScript support. A new scripting dictionary provides the ability to automate Xcode workflows.

Does that mean there is no more Run Script? I looked at AppleScript but honestly it looks overwhelmingly complex. Do I need to learn AppleScript just to add the simple one liner that I used to do in Xcode?

/usr/local/bin/carthage copy-frameworks

解决方案

It is still there. Make sure you click everywhere indicated in red in the image below.

这篇关于Xcode 中的运行脚本和构建阶段在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆