如何从 Xcode 中删除运行脚本阶段

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/252848/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 18:25:23  来源:igfitidea点击:

How to remove a Run Script phase from Xcode

iphoneiosxcode

提问by DFG

I tried this step:

我试过这一步:

Select the menu options "Project > New Build Phase > New Run Script Build Phase", and enter the following script (don't forget to replace /Users/youruser/bin by the correct path to gen_entitlements.py) :

选择菜单选项“Project > New Build Phase > New Run Script Build Phase”,然后输入以下脚本(不要忘记用gen_entitlements.py的正确路径替换/Users/youruser/bin):

export CODESIGN_ALLOCATE=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate
if [ "${PLATFORM_NAME}" == "iphoneos" ]; then
    /Users/youruser/bin/gen_entitlements.py "my.company.${PROJECT_NAME}" "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/${PROJECT_NAME}.xcent";
    codesign -f -s "iPhone developer" --resource-rules "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/ResourceRules.plist" \
         --entitlements "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/${PROJECT_NAME}.xcent"  "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/"
fi

(from link)

(来自链接

Now I want to remove this script from my project. How do I remove the "Run Script Build Phase" build phase from Xcode?

现在我想从我的项目中删除这个脚本。如何从 Xcode 中删除“运行脚本构建阶段”构建阶段?

回答by Jesús A. álvarez

Select the Run Script phase in your target and delete it.

在目标中选择 Run Script 阶段并将其删除。

Delete

删除

回答by iOSAndroidWindowsMobileAppsDev

for xcode 4.5.1, the appearance is slightly different, click once on the run script phase and simultaneously press function + backspace (on a mac) to delete. When the dialog box pops up, click delete.enter image description here

对于xcode 4.5.1,外观略有不同,在运行脚本阶段单击一次,同时按功能+退格键(在mac上)删除。弹出对话框,点击删除。在此处输入图片说明

回答by Lance Samaria

  1. In the Project Navigator go to the upper left hand corner and select the blue icon
  1. 在 Project Navigator 中,转到左上角并选择蓝色图标

enter image description here

在此处输入图片说明

  1. In the top center of the screen select Build Phases
  1. 在屏幕的顶部中央选择 Build Phases

enter image description here

在此处输入图片说明

  1. When you see the Run Scriptthat you want to delete look all the way on the right hand corner of it and you'll see an X
  1. 当您看到Run Script要删除的那个时,请一直查看它的右上角,您会看到一个X

enter image description here

在此处输入图片说明

  1. Press the Xand you'll see a menu appear asking if you want to delete it
  1. X,您会看到一个菜单出现,询问您是否要删除它

enter image description here

在此处输入图片说明

  1. Choose Delete
  1. 选择 Delete