Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove a Run Script phase from Xcode

Tags:

xcode

ios

iphone

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) :

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?

like image 272
DFG Avatar asked Oct 31 '08 08:10

DFG


People also ask

Where is run script in Xcode?

1 Select xcodeproj file of you project -> Select Target -> Select Build Phases -> Click on plus button (upper left corner) -> Select New Run Script Phase. 2If you want to run a script while it is being installed on the device then please check a little checkbox just below the script box.

How do I compile and run a script in one step Swift?

Compiling your Swift file and executing it from Xcode is as easy as doing it from the terminal. All you need to do is define a New Run Script Phase and add the commands you executed on the terminal into it. From the Project navigator, select the project file.

What is Srcroot?

$(SRCROOT) (aka $(SOURCE_ROOT) ) is a path to your location where a .


3 Answers

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

Delete

like image 171
Jesús A. Álvarez Avatar answered Oct 18 '22 01:10

Jesús A. Álvarez


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

like image 35
iOSAndroidWindowsMobileAppsDev Avatar answered Oct 18 '22 01:10

iOSAndroidWindowsMobileAppsDev


  1. In the Project Navigator go to the upper left hand corner and select the blue icon

enter image description here

  1. In the top center of the screen select Build Phases

enter image description here

  1. When you see the Run Script that you want to delete look all the way on the right hand corner of it and you'll see an X

enter image description here

  1. Press the X and you'll see a menu appear asking if you want to delete it

enter image description here

  1. Choose Delete
like image 1
Lance Samaria Avatar answered Oct 18 '22 03:10

Lance Samaria